Add additional nullok check

Closes-bug: 1618551
Change-Id: Id1d2f86e8610605ae071447289315aab3d117496
This commit is contained in:
Mark Hooper 2016-08-30 13:21:07 -05:00 committed by Major Hayden
parent 427cd00acd
commit 83dd342b19
1 changed files with 4 additions and 1 deletions

View File

@ -119,10 +119,13 @@
lineinfile:
dest: "{{ pam_auth_file }}"
state: present
regexp: "^(auth.*sufficient.*)nullok(.*)$"
regexp: "^({{ item }}.*sufficient.*)nullok(.*)$"
line: '\1\2'
backup: yes
backrefs: yes
with_items:
- auth
- password
when:
- ansible_os_family == 'RedHat'
- security_pam_remove_nullok | bool