This commit is contained in:
2021-08-13 19:34:05 +02:00
parent 07d8821e07
commit 3b9f509c8e
6 changed files with 83 additions and 16 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