Add the ability to install sudoers file
Change-Id: Ie4edfa60ca0defd9074f84f7ce6bf71b93d95959
diff --git a/tasks/main.yml b/tasks/main.yml
index 92f7ca2..c0b2b39 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -42,3 +42,13 @@
key: "{{ lookup('file', item.username ~ '.pub') }}"
exclusive: true
with_items: "{{ userlist }}"
+
+- name: Add users_sudoers file (if specified)
+ when: "users_sudoers | length > 0"
+ template:
+ src: "users_sudoers.j2"
+ dest: "/etc/sudoers.d/users_sudoers"
+ owner: "root"
+ group: "root"
+ mode: 0440
+ validate: "visudo -c -s -f %s"