New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Allow synchronous delegation of restart to alternative init system #76
[RFC] Allow synchronous delegation of restart to alternative init system #76
Conversation
... in order to allow alternative init systems to implement handler. See also: * https://docs.ansible.com/ansible/playbooks_intro.html#handlers-running-operations-on-change * https://docs.ansible.com/ansible/meta_module.html
Travis CI failure:
(looks similar to failure in #75 (comment) ) |
Issue is not caused by this PR - see #77 |
@@ -2,6 +2,10 @@ | |||
- name: run riak_disk_tune | |||
command: /bin/bash /usr/local/bin/riak_disk_tune.sh | |||
|
|||
- name: restart riak and ensure enabled | |||
service: name=riak enabled=yes state=restarted | |||
when: riak_init_system == 'system' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I became concerned with variable scope at execution time of the handler. Do you know if this riak_init_system
is safe here? I am considering templating the trigger with the variable, and in turn specifying trigger name with system
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better not to change this to variable in notify, because of ansible/ansible#17922
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant note is that tasks/main.yml flushes handlers, so variable scope is more predictable in principle in this case
Semantics of handlers in Ansible - at least as of 2.2.1.0 - appears to me to be under active development yet e.g. wrt notification of extra-role handlers. So delegating task to handler seems not a wise change at this stage. Closing this then. For using runit I ended up forking and applying minimal addition:
|
Depends on #75
Closes #70