Does ansible-pull also provide the level of orchestration like the "ansible" push model?

67 views
Skip to first unread message

Xicheng Chang

unread,
Mar 18, 2015, 4:45:45 PM3/18/15
to ansible...@googlegroups.com
Hi,

I am wondering if "ansible-pull" also provides the orchestration like what ansible does in push model.
For example I have a site.yml that dictates all DB nodes have to be provisioned first, then web nodes can be provisioned. If I run ansible from the central machine, this order can be guaranteed. 
But for ansible-pull, does such kind of mechanism exist?

Thanks,
Xicheng

Brian Coca

unread,
Mar 18, 2015, 4:48:54 PM3/18/15
to ansible...@googlegroups.com
you can setup your web playbooks to check if the db hosts have been
provisioned first and fail if they have not.



--
Brian Coca

Xicheng Chang

unread,
Mar 18, 2015, 4:59:32 PM3/18/15
to ansible...@googlegroups.com
Thanks for the reply, I think that definitely works. But if I have to write the check-db-nodes code in web playbooks, I am not using the orchestration mechanism provided by ansible. This would probably make ansible no different from chef or puppet.

Brian Coca

unread,
Mar 18, 2015, 5:02:42 PM3/18/15
to ansible...@googlegroups.com
In pull mode, no, if you want something different you would need a
system that supports callback, like tower (http://ansible.com/tower).

--
Brian Coca

Xicheng Chang

unread,
Mar 18, 2015, 7:04:19 PM3/18/15
to ansible...@googlegroups.com
Thanks Brian. Looks like push would be a better answer if orchestration is needed. I am trying to integrate ansible with cobbler without 2nd touch(trigger ansible-playbook on the central machine when os installation completes). I also would like to use the orchestration mechanism provided by ansible. What I have in mind right now is to write a playbook that holds ansible from running on host until its port 22 is up, which means cobbler has done its job on this particular host. if, in this case, a web host(from my original question) gets installed first and the port 22 is up, will ansible ignore it until all db hosts get installed?

Brian Coca

unread,
Mar 18, 2015, 8:31:37 PM3/18/15
to ansible...@googlegroups.com
There are several ways to do it, I think the easiest is to run a
playbook with at least 2 plays, the first against the db hosts, the
second against the web hosts, since the 2nd won't start until the
first one is done, you should have what you want.


------------
Brian Coca
Reply all
Reply to author
Forward
0 new messages