I would like to make an ansible role that drops some credentials into /etc for a few services that are running. Each service is slightly different and requires different mechanisms for restarting to pick up the new credentials.

Is it possible to have a meta dependency somehow communicate back up to the consumer/parent to trigger a handler to restart the services that depend on the file?


I think you can use listen as explained here: https://medium.com/@george.shuklin/listen-feature-for-handlers-in-ansible-29183524c7e1

  • Ah! I started ansible pre-2.2! – rrauenza Oct 2 '20 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.