Many tasks in handlers.

23 views
Skip to first unread message

Marcin Prączko

unread,
Jun 26, 2014, 8:33:03 AM6/26/14
to ansible...@googlegroups.com
Hello,

I have question whether is possible to have many tasks in one handler.

For example, there is possible using SSL passprahse during restarting apache. This automatically not allow ansible progress, because by default apache expecting pass passphrases from STDIN.
However there is simple trick which can help to automate this. In apche documentation (http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslpassphrasedialog) there is inno that passphrases can be passed from external sources (file / application).

So let say that by defualt apache (httpd.conf / ssl.conf) is configured to read passphrase from STDIN.
But ansible has handler (restart apache) and then doing following tasks:

- Modify httpd.conf to use application for passphrase
- Copy file (application) with valid passphrases
- Restart apache - so passphrases will be read from app/file
- Remove application file
- Modify httpd.conf to expecting passphrase from STDIN.


This is typical scenario which I would expect that handler doesn't mean one task.

Best regards,
Marcin Praczko

Michael DeHaan

unread,
Jun 26, 2014, 9:04:56 AM6/26/14
to ansible...@googlegroups.com
No, but a task can notify many different handlers.

- module_name: foo param1=bar param2=baz
  notify: 
     - one
     - two

etc




--
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 ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b075d168-a168-4ff7-9008-130feb6d8f3d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages