summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Fenzi <kevin@scrye.com>2013-04-17 22:56:28 +0000
committerKevin Fenzi <kevin@scrye.com>2013-04-17 22:56:28 +0000
commitea7d9bd3efc5954d67fc40e6604dd5ed35fd72cf (patch)
tree43bb0e3117a432b1eacefda0fc792a2f703e96f6
parent7b0e2d913a0ba9e84226ac9449d7a57d931b0672 (diff)
Add a simple sudo task.
-rw-r--r--playbooks/groups/arm-qa.yml2
-rw-r--r--tasks/sudo.yml23
2 files changed, 25 insertions, 0 deletions
diff --git a/playbooks/groups/arm-qa.yml b/playbooks/groups/arm-qa.yml
index d44e00138..696aae183 100644
--- a/playbooks/groups/arm-qa.yml
+++ b/playbooks/groups/arm-qa.yml
@@ -17,3 +17,5 @@
- include: $tasks/hosts.yml
# This task includes our common scripts
- include: $tasks/common_scripts.yml
+ # This task includes our sudo config
+ - include: $tasks/sudo.yml
diff --git a/tasks/sudo.yml b/tasks/sudo.yml
new file mode 100644
index 000000000..d025c3d7f
--- /dev/null
+++ b/tasks/sudo.yml
@@ -0,0 +1,23 @@
+---
+#
+# This task sets up /etc/sudoers.d/fedora on a machine.
+#
+
+#
+# Put in place the default sysadmin-main sudoers file.
+#
+- name: setup /etc/sudoers.d/sysadmin-main-sudoers
+ action: copy src=$private/files/sudo/sysadmin-main-sudoers dest=/etc/sudoers.d/ owner=root group=root mode=0600
+ tags:
+ - config
+#
+# This will move a /etc/sudoers.d/ file in place
+#
+- name: setup /etc/sudoers.d/fedora for client use
+ action: copy src=$item dest=/etc/sudoers.d/ owner=root group=root mode=0600
+ with_first_found:
+ - $private/files/sudo/${ansible_fqdn}-sudoers
+ - $private/files/sudo/${ansible_hostname}-sudoers
+ - $private/files/sudo/${ansible_domain}-sudoers
+ tags:
+ - config