summaryrefslogtreecommitdiffstats
path: root/roles/local_deploy/tasks
diff options
context:
space:
mode:
authorMichael Scherer <misc@zarb.org>2014-12-16 17:11:22 +0100
committerMichael Scherer <misc@zarb.org>2014-12-16 17:11:22 +0100
commit938bf3c804ef28e3a68e8d3eddc6cb97c03ee3b2 (patch)
tree3bcf196c3244146ac5bb352777c51cafa217eaa5 /roles/local_deploy/tasks
parente9b939228d5a6e41652963615e7a4cebd671fece (diff)
Use sudo to deploy and run ansible as a regular user
Diffstat (limited to 'roles/local_deploy/tasks')
-rw-r--r--roles/local_deploy/tasks/main.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/roles/local_deploy/tasks/main.yml b/roles/local_deploy/tasks/main.yml
index 22d0b03..9215d53 100644
--- a/roles/local_deploy/tasks/main.yml
+++ b/roles/local_deploy/tasks/main.yml
@@ -8,8 +8,16 @@
- public
- private
+- template: src=extract.sudoers dest=/etc/sudoers.d/extract_{{ item }}
+ with_items:
+ - public
+ - private
+
- copy: src={{ item }} dest=/usr/local/bin/{{ item }} mode=0755
with_items:
- ansible_run.sh
+ - extract_wrapper.sh
+
+- copy: src=ansible_run.sudoers dest=/etc/sudoers.d/ansible_run
- cron: name="ansible run" job="/usr/local/bin/ansible_run.sh" minute=*/30