inventory with different ports, same address

16 views
Skip to first unread message

jorrit...@scilifelab.se

unread,
Apr 17, 2014, 4:22:47 AM4/17/14
to ansible...@googlegroups.com
Hi all,

In my setup with ansible 1.5.4 if I have the following inventory:

[first]
[second]

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.

Michael DeHaan

unread,
Apr 17, 2014, 7:55:42 AM4/17/14
to ansible...@googlegroups.com
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.




--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c79eb8f4-8176-4033-bee5-3d31a6319a77%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages