I've got a play that ensures some servers are created, then ensures a
domain for those servers exists in DNS, then ensures A records exist
within that domain for each server.
I want the domain ensure to run once, not 10x time, so I have a
construct like:
when: inventory_hostname == play_hosts[0]
so that it only runs on the first host of the play.
This works, so long as that first host doesn't have a failure ensuring
that it exists.
This is pretty awkward, and I'm wondering what other folks have for a
"run once" construct.
I had thought about touching a file locally when the DNS API call is
done to create the domain, but that's racy, because this is a multi-fork
play so multiple forks would be attempting this at once.
-jlk
--
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/531F9097.3000108%40j2solutions.net.
For more options, visit https://groups.google.com/d/optout.