Hi,
Long-time lurker, first time poster. First off, thanks for this excellent project.
I'd like to know, is it possible to run the 'notify' handler as a different user from the task which notified it? E.g.
---
# deploy.yml
- hosts: webservers
remote_user: project_user
roles:
- webapp
---
# webapp/tasks/main.yml
# This should be run as project_user
- name: Pull sources from the repository.
git: repo={{project_repo}}
dest={{project_root}}
version={{branch}}
notify:
- Restart supervisord
---
# webapp/handler/main.yml
# This should be run as root
- name: Restart supervisord
supervisorctl: name={{ item }}
state=restarted
with_items:
- celeryd
- celerybeat
If it's not possible, what's the best way to structure the project?
Thanks in advance!