Multiple Hostnames in AWS Dynamic Inventory list

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?

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.

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.

I believe its colon (:slight_smile:

Worked like a charm! Thanks :slight_smile: