A few options that don't involve ansible calling Cobbler: (A) admit defeat and run it in two steps - base OS install, trigger ansible
(B) trigger ansible-pull at the end of the cobbler run in kickstart %post. (C) trigger ansible at the end of the cobbler run in kickstart %post using provisioning callbacks in Tower. This doesn't work 100% smoothly though because Tower doesn't have a "automatically sync with cobbler" integration like it does with AWS and Rackspace. This will likely happen for arbitrary inventory scripts later. Though having ansible call the cobbler edit command with --force is not a bad idea. It could set up DHCP/DNS with a simple edit command and then wait for connectivity. You may also want to look into the "do/until" loop constructs if you'd like to also wait for another service to come online. In the past, I've seen people try to synchronize a config tool list of info with cobbler, and that usually gets complicated. But if it's just going to wrap "cobbler ___ edit" + a few commands, wait for SSH, and then do the rest that's ok. Ansible pull would be pretty simple though, provided you were ok with having some of the bootstrap stuff in an accessible git repo. Alternatively you could also package the playbook in a tarball, etc, extract it in post, etc. ansible-pull is really just a proof of concept that is completely usable in the real world in many cases :) On Wed, Apr 23, 2014 at 2:36 AM, Tomasz Kontusz <[email protected]>wrote: > > > Sean <[email protected]> napisał: > >My question is whether there is a way to make a barrier between Cobbler > >installation finished and the Ansible cookbook start to launch. Is > >there a > >notification mechanism so that I can wait all 5 machines' OS are ready? > > I don't know about cobbler, but you can wait for the machines with > wait_for module (http://docs.ansible.com/wait_for_module.html). Something > like this at the beginning of your playbook will wait until all the hosts > have port 22 open (but no longer than 900 seconds): > > - hosts: all > gather_facts: no # makes sure Ansible won't attempt connection too soon > tasks: > - local_action: wait_for host={{inventory_hostname}} port=22 > timeout=900 > > > > >Thanks, > >Sean > > -- > Wysłane za pomocą K-9 Mail. > > -- > 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/9c3288ab-4ec0-4072-81ca-ec95ba3049cb%40email.android.com > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CA%2BnsWgzTX9P5bKC3_pm20UOQDmg%3Dn%3D8nS9wOKQbDK_PdFaZTpg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
