I’m new to Ansible, and trying to write a state to set up and bootstrap a Consul cluster.
I seem to have the basics down (downloading packages, and all.) However, I’m stuck on the components of the bootstrap process (http://www.consul.io/docs/guides/bootstrapping.html). Specifically:
- How can I ensure that a given set of tasks only executes if a command succeeds/fails on all the target servers?
- How can I run a command on only one server, followed by all the rest?
Starting servers in consul is pretty easy. But the bootstrap process is a delicate little dance right now, one which I feel Ansible could deal with pretty well. But without these two things, is there any way it could be done?