Hi, Brian. I'm trying to run a playbook file which by definition must 
contain a "hosts" entry. When I run the ansible-playbook command with the 
"-i" flag, I get this:

> ansible-playbook -i '10.10.10.155,' -u root  do_base_packages.yaml


PLAY [dummy] 
******************************************************************
skipping: no hosts matched


...where "dummy" is the hosts entry in the playbook file. The playbook file 
looks like this:

- hosts: dummy
  become: yes
  roles:
    - role: base
    - role: ntp
      ntp_server: [10.10.10.11, 10.10.10.12, 10.20.10.11]
      ntp_restrict:
        - "restrict 127.0.0.1"

How do I force a host on the command line without needing to define it in 
the playbook file or in the inventory? I'm on OSX 10.10.5 and Ansible 1.9.2.

Thanks!

-Pete

On Tuesday, August 18, 2015 at 9:26:04 PM UTC-7, Brian Coca wrote:
>
> -i 'myhost,'  will define an inventory on the command line where you 
> can add any host/ip you want. 
>
> ^ observe the , is needed even if only 1 host is defined to signify 
> this is a list and not a path to a file 
>
>
> -- 
> Brian Coca 
>

-- 
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/adc5edde-0542-4ed6-9c4a-3f227a8a6f48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to