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 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/CAF%3D2pTYBKJjLh5_5-nKhwUAL8ojx_OEgPa90%3Dz1-vEAJHb9YCw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to