From 820c7659b0d82053757d196e1962b8cfcd13499d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Thu, 7 Sep 2017 13:46:52 +0200 Subject: [PATCH] Ensure to add only one time the sudoers line in `/etc/nsswitch.conf` file (fix #3). --- CHANGELOG.md | 1 + tasks/main.yml | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) 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