diff --git a/CHANGELOG.md b/CHANGELOG.md index 40ec820..d0dab52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Fix * For Debian Stretch ensure to also install `ca-certificates` (fix #2). +* Ensure to add only one time the sudoers line in `/etc/nsswitch.conf` file (fix #3). ## v1.1.1 diff --git a/tasks/main.yml b/tasks/main.yml index b40cab9..bac5173 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -19,8 +19,12 @@ - name: CONFIG sudoers nsswitch.conf lineinfile: dest: /etc/nsswitch.conf - regexp: '^sudoers:.*sss' + state: present + regexp: '^sudoers:' line: 'sudoers: files' + owner: root + group: root + mode: 0644 when: not sssd_sudoers_ldap # Configuration file