Multiple Hostnames in AWS Dynamic Inventory list

19 views
Skip to first unread message

Kishor Ramanan

unread,
Jan 24, 2017, 10:37:09 AM1/24/17
to Ansible Project
I have configured Ansible to use dynamic inventory list but  I am able to use only one hostname instead of multiple hostnames.

Even if I give multiple hostname, it takes only one

Is there a way to add dynamic multiple host to a single play?

Simon Wydooghe

unread,
Jan 24, 2017, 12:37:43 PM1/24/17
to Ansible Project
What exactly do you mean? Do you mean running a play on multiple hosts? Maybe you should put your playbook and inventory here + output when running it.

Kishor Ramanan

unread,
Jan 24, 2017, 1:05:24 PM1/24/17
to Ansible Project
I am using a dynamic inventory so I don't have option of placing all host in a single file

For dynamic host the syntax is 

  hosts: tag_Name_us_east_1a_weblogic_dev*

What I want to use is 

 
 hosts: tag_Name_us_east_1a_weblogic_dev*, tag_Name_us_east_1a_apache_qa*

But when i pass the above syntax, Ansible takes only one host

How do I use multiple syntax is my question.

Sonny Heer

unread,
Jan 24, 2017, 2:49:13 PM1/24/17
to Ansible Project
I believe its colon (:)

Kishor Ramanan

unread,
Jan 27, 2017, 8:22:00 AM1/27/17
to Ansible Project
Worked like a charm! Thanks :) 
Reply all
Reply to author
Forward
0 new messages