in Ansible, a host key is a unique thing.

You'd want this

ex1 ansible_ssh_host=example.com ansible_ssh_port=1234
ex2 ansible_ssh_host=example.com ansible_ssh_port=1235

Which would define two hosts, with two different unique keys.




On Thu, Apr 17, 2014 at 4:22 AM, <[email protected]> wrote:

> Hi all,
>
> In my setup with ansible 1.5.4 if I have the following inventory:
>
> [first]
> example.com:1234
> [second]
> example.com:1235
>
> and a play:
> hosts:
>   - first
>   - second
> roles:
>   - do_stuff
>
> Ansible will only execute tasks on of those, I believe it was the top one.
> I have no problems with that after changing inventory to:
> [first]
> firstserver ansible_ssh_host=example.com ansible_ssh_port=1234
> etc,
>
> Don't know if this is expected behaviour, but wanted to inform just in
> case.
> cheers.
>
> --
> 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/c79eb8f4-8176-4033-bee5-3d31a6319a77%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/c79eb8f4-8176-4033-bee5-3d31a6319a77%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 [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/CA%2BnsWgyvikdBMAZrRQ6Gyb04X7yJpn7CYzcUCGsY1TopUzVw4A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to