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!

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7002bf2f-dead-41f0-af85-5e808bfc6d03%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to