I would recommend using a dynamic inventory script that would provide the
information, assuming it can be found via some local command or API?


On Mon, May 12, 2014 at 6:15 PM, Noah Parker <neat...@gmail.com> wrote:

> Hello,
>
> The way I am implementing Ansible will mean that I will not know the IP of
> the server I am configuring until I am launching the Playbook. I have tried
> passing in a variable for the IP for Ansible complains with:
>
> ERROR: provided hosts list is empty
>
> Here is a look at my .yml and command line:
>
> ---
> - hosts: '{{ test }}'
>
> ansible-playbook test.yml --extra-vars "test=192.168.1.24"
>
> Is it possible to pass this in as a command line argument?
>
> I am currently using Ubuntu 12.04 as the Ansible server with Ansible
> v.1.4.4.
>
> Thanks!
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/9cde569e-b5c3-40d6-b9cc-81e20f0d95f0%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/9cde569e-b5c3-40d6-b9cc-81e20f0d95f0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAMFyvFii6Lop9o9v08h2aW7JU-TVKYjVLqhgdRRxOSowVzp0kw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to