From 83dd342b19b9982115ec22fd4cedcad7593baf4f Mon Sep 17 00:00:00 2001 From: Mark Hooper Date: Tue, 30 Aug 2016 13:21:07 -0500 Subject: [PATCH] Add additional nullok check Closes-bug: 1618551 Change-Id: Id1d2f86e8610605ae071447289315aab3d117496 --- tasks/auth.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks/auth.yml b/tasks/auth.yml index 3476a456..d12a0575 100644 --- a/tasks/auth.yml +++ b/tasks/auth.yml @@ -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