add_host is what I use for this purpose.

Regards,
-scott

On May 22, 2014, at 3:05 PM, James Martin <[email protected]> wrote:

> Launch your playbooks in two stages -- one for  provisioning the VM,
> and one for configuring the VM.  Once the VM is provisioned, an  IP
> will be allocated and a dynamic inventory script would work.
> 
> You might also want to look at the add_host module:
> 
> http://docs.ansible.com/add_host_module.html
> 
> On Thu, May 22, 2014 at 1:08 PM, Scott Anderson
> <[email protected]> wrote:
>> Dynamic inventory scripts are not appropriate if the IP does not exist yet,
>> as in the case of creating a new VM.
>> 
>> Regards,
>> -scott
>> 
>> 
>> On Wednesday, May 21, 2014 6:08:20 PM UTC-4, James Martin wrote:
>>> 
>>> Use a dynamic inventory script if you don't know the IP.  That is what
>>> it is designed for.  If you want to pass ssh usernames and passwords
>>> (extremely extremely insecure, please use SSH Keys), you can do that
>>> with ansible_ssh_user and ansible_ssh_pass inventory variables.  You
>>> will need to have sshpass installed for this to work.
>>> 
>>> - James
>>> 
>> --
>> 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/4aced7ef-8a85-47dd-9eb8-f6ad1932560c%40googlegroups.com.
>> 
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "Ansible Project" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/ansible-project/G_9JRGp5jGE/unsubscribe.
> To unsubscribe from this group and all its topics, 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/CAF%3D2pTYBKJjLh5_5-nKhwUAL8ojx_OEgPa90%3Dz1-vEAJHb9YCw%40mail.gmail.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/EB7E383A-1B1B-4DC1-95FD-A9B94D3F88DA%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to