From 7240d90bc56618eb17037a10a98cee13b8930705 Mon Sep 17 00:00:00 2001 From: Arky Date: Fri, 20 Oct 2017 12:11:33 +0700 Subject: [PATCH] Using file module instead of chmod (Fixes #326) New pull request to fix following warning. [WARNING]: Consider using file module with mode rather than running chmod --- roles/iiab-admin/tasks/admin-user.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/iiab-admin/tasks/admin-user.yml b/roles/iiab-admin/tasks/admin-user.yml index c08af46bc..eb74687b6 100644 --- a/roles/iiab-admin/tasks/admin-user.yml +++ b/roles/iiab-admin/tasks/admin-user.yml @@ -33,7 +33,8 @@ # backup=yes - name: edit the sudoers file--first make it editable - shell: chmod 0640 /etc/sudoers + file: path=/etc/sudoers + mode=0640 - name: have sudo log all commands it handles lineinfile: regexp=logfile @@ -52,4 +53,5 @@ dest=/etc/sudoers - name: end editing the sudoers file-- protect it again - shell: chmod 0440 /etc/sudoers + file: path=/etc/sudoers + mode=0440