From 938bf3c804ef28e3a68e8d3eddc6cb97c03ee3b2 Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Tue, 16 Dec 2014 17:11:22 +0100 Subject: Use sudo to deploy and run ansible as a regular user --- roles/local_deploy/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'roles/local_deploy/tasks') 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 -- cgit