How to declare group variables for host inventory in Ansible Tower

25 views
Skip to first unread message

Saravanan Ponnusamy

unread,
Oct 21, 2018, 1:52:44 PM10/21/18
to Ansible Project
Hi All,
Need to declare few group variables in server Inventory of Ansible Tower and retrieve them in playbook.  Currently my host inventory looks as below.

server.ini
[mygroup]
host1    ansible_host
=host1    ansible_user=user1    ansible_password=password1
host2    ansible_host
=host2    ansible_user=user1    ansible_password=password1
host3    ansible_host
=host3    ansible_user=user1    ansible_password=password1
host4    ansible_host
=host4    ansible_user=user1    ansible_password=password1
host5    ansible_host
=host5    ansible_user=user1    ansible_password=password1

We may need to add new host inventory variables environment, application for each host along with these Ansible standard variables. Could you please recommend the right procedure to declare them in host inventory and retrieve them in playbook.

Regards
Saravanan
Reply all
Reply to author
Forward
0 new messages