Hi, I am also looking for a similar solution. I have cobbler server setup that takes care of OS + Network Config. My cobbler server is now also my ansible control machine. So I have Cobbler + Ansible on the same server.
>From the 3 options mentioned by you, A is not a choice for me and C seems to be second choice for me. First choice would be (B) trigger ansible-pull at the end of the cobbler run in kickstart %post. Does this require ansible installation on the newly built node ? If not, can you please describe how should I achieve this ? If it requires ansible installation on the newly built instance, I have to work out something else. Thanks in advance, Hrishikesh On Wednesday, 23 April 2014 19:03:46 UTC+5:30, Michael DeHaan wrote: > > 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] > <javascript:>> wrote: > >> >> >> Sean <[email protected] <javascript:>> 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] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> 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/f11d0e8f-f27b-4a65-9ced-53e64149671b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
