A common issue I run into is, depending on group or host vars, I might make a configuration change to say php.ini or add php modules and want to reload relevant php services that arent always the same - this might be restarting httpd for mod_php on one host or it might be php-fpm or maybe both if we have nginx installed in front of apache.
I decided to write a meta role for handling this, so I can have this meta-role as dependency in another role and notify it to restart the relevant service if it exists and is running. So if I have a role for making a php change and I want it to reload php-fpm if its installed or httpd if its installed how should I go about this? What I was trying to do is in the meta role have a few tasks that register variables based on shell command with ps and grep. Then use the result of the variable in the handler with a where clause but thats not allowed in a handler. Any advice for how I should alternatively approach this? -- 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/ee07131f-1122-4cf7-9666-25f668fc7741%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
