This commit is contained in:
2021-08-13 19:34:20 +02:00
parent ddaac9259b
commit 99eae0bbbd
4 changed files with 47 additions and 12 deletions

View File

@ -179,7 +179,7 @@
- name: (nis-install-client.yml) Adjust file /etc/nsswitch.conf (set hosts)
replace:
path: /etc/nsswitch.conf
regexp: '(hosts:\s+files)\s+([^nis].*)'
regexp: '(hosts:\s+files)\s+((?!nis).*)$'
replace: '\1 nis \2'
tags:
- nis-install
@ -188,7 +188,7 @@
- name: (nis-install-client.yml) Adjust file /etc/nsswitch.conf (set passwd/group/shadow)
replace:
path: /etc/nsswitch.conf
regexp: '^({{ item }}:\s+.*)'
regexp: '^({{ item }}:\s+((?!nis).)*)$'
replace: '\1 nis'
with_items:
- passwd