Yes, I have hosts (servers) added to my host file as a group (is that the inventory file)?
Foe example: [onprem] server01 server02 On Friday, March 4, 2022 at 11:02:43 PM UTC-6 Dan Linder wrote: > 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/d0a92c97-ff20-4f34-8024-bd23eb74d105n%40googlegroups.com.
