So in Ansible now, localhost is implicitly added to inventory.   This means
you can reference it and it will work.

Now "-i host," is an ugly vestigial tail of Ansible, and I swear I want to
cut it off, but I'm not willing to deal with the people that have come to
rely on it being angry :)

We strongly encourage making inventory files and people should make
inventory files.

That being said, what you have above works exactly the same as if you did

[foo]
host

and did the same with regular Ansible, that was just my PSA about the evils
of "-i host," and this not being specific to that :)

So yes, this works exactly as it should.

You should defintely move to using inventory files, but "--limit hosts"
should not include localhost in the above case.







On Tue, Mar 4, 2014 at 10:30 AM, Dmitry Horbach <[email protected]>wrote:

> Hi,
>
> I guess it has something to do with new localhost feature of ansible 1.5
>
> In playbook with
>  hosts: localhost:host
>
> if i specify -i "host," the play will be done for both localhost and host
>
> GATHERING FACTS
> ***************************************************************
> ok: [localhost]
> ok: [oracle]
>
> Is there any workaround for this situation?
>
> --
> 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/24d03a2c-f50b-4e5f-ac24-e989f4116b7a%40googlegroups.com
> .
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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/CAEVJ8QOPSZ67AREyyaWYfKzKMTWsc2bs7Pmi8AKYraxmuq5-UA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to