0

Can I run a different role against a different host as a dependency of a role?

My use case for this is to reconfigure "postfwd" on my mail server when running the "postfix" role against a new server (which will relay all mail thru the mail server).

1 Answer 1

0

This is possible since ansible 1.3 using role dependencies and delegate_to

To run the postfwd role against host mail.example.com whenever the postfix role is run against any host, add the following to meta/main.yml within the postfix role:

dependencies:
  - role: postfwd
    delegate_to: mail.example.com

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .