varible hosts

18 views
Skip to first unread message

rupesh alasundkar

unread,
Feb 8, 2019, 5:39:55 AM2/8/19
to Ansible Project
[1] peer{{ peer_number }}.peers   and   [2]peer{{ peer_number }}.peers.cluster{{ cluster }} are my 2 hosts.

NOTE:   {{ peer_number }}   and   {{ cluster }} is there any way i can use these both and can use in hosts: position????


my condition is

if i am passing ansible-playbook text.yml -e cluster=1 peer-number=1  [2] host will be in use. ((  peer1.peers.cluster1  ))

if i am passing ansible-playbook text.yml -e cluster=0 peer-number=1  [1] host will be in use  (( peer1.peers ))

bottom line is i want to use 2 varibles in hosts:
and want to pass  only 2 argument i.e.   {{ peer_number }} & {{ cluster }}


thanks





















Reply all
Reply to author
Forward
0 new messages