Do you have an inventory file setup that has "server01" and "server02" 
setup in group(s)?  For instance, instead of running the two examples 
above, setup an inventory file with both servers listed:

# inventory.ini
server01
server02

Then run your playbook like this:
ansible-playbook playbooks/newonpremserver.yml -i inventory.ini -vvvv

Your playbook will run on both 01 and 02 at the same time.  If you have 
"server01" through "server99", then just add them to the inventory file and 
the playbook will run on all of them in parallel.
On Wednesday, March 2, 2022 at 9:34:43 AM UTC-6 Nitrous wrote:

> So, we build alot of servers with different specs, and our YAML file 
> variables for the build specs differ (like different CPU/RAM/HDD etc) , but 
> the playbooks remain the same.
>
> Currently, to run multiple builds concurrently, I have to open new ssh 
> session to the Ansible server everytime and run the builds for each server 
> using:
>
> So first ssh session will run the build for the firsr server like this: 
> ansible-playbook playbooks/newonpremserver.yml -e "hostname=server01" -vvvv
>
> Second ssh session will run the build for the second server like this: 
> ansible-playbook playbooks/newonpremserver.yml -e "hostname=server02" -vvvv
>
> and so on..
>
> Please suggest a better way to run builds concurrently.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/92bb3b1d-c7e8-4d79-82c2-e3e7c56566b2n%40googlegroups.com.

Reply via email to