We have this requirement as well. We just put a when condition on the task 
in the handler to only restart the service if it's not prod. You need to 
have the environment in a variable for this to work.  e.g. this may not be 
the 100% correct syntax as I'm not at work, but we do something like:


handler:
    - service: name=httpd start=restarted
      when: {{environment}} != 'prod'

-- 
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/8a05691b-9768-4c56-b7e7-16e43144f9ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to