python - Is it possible to queue a handler from within an ansible module? -


i'm developing ansible module inside role (that module lives in library directory of role). wondering if it's possible queue handler within module?

here's example of i'd do, without using notify bit on task.

- name: build , install application   custom_module:     path=/opt/web_app   notify:     - restart web server 

ideally i'd have custom_module somehow queue handler, usage this:

- name: build , install application   custom_module:     path=/opt/web_app 

i'm pretty sure sort of thing isn't possible. modules are, in effect, standalone applications ansible copies remote host, executes provided parameters, interprets exit value & output before proceeding on next module. module runs on remote host has no knowledge of ansible process that's running on master node, has no way hook it. using notify property in playbook proper way of invoking handler. why want try other way?


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -