Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you run more than one simultaneous job in Ansible Tower?

It seems that all jobs are enqueued, and only one will run at a time. How can we run more than one?

like image 827
Evan Avatar asked Jan 16 '15 18:01

Evan


People also ask

How do you pass extra variables in Ansible Tower?

To pass a value to nodes, use the --extra-vars or -e option while running the Ansible playbook, as seen below. This ensures you avoid accidental running of the playbook against hardcoded hosts.

What is limit in Ansible Tower?

A value of zero uses the Ansible default setting, which is 5 parallel processes unless overridden in /etc/ansible/ansible. cfg . Limit: A host pattern to further constrain the list of hosts managed or affected by the playbook. Multiple patterns can be separated by colons (“:”).


2 Answers

Tower is designed to parallelize jobs, but there are a couple of cases where it will not.

  1. If you have your inventory or SCM set up to "update on launch" with no cache or the cahche has expired, then any additional jobs will be stuck pending behind the inventory or SCM update. The inventory and SCM will not update until after the currently running job is done.
  2. If you are trying to run multiple jobs against the same host: Tower will not run multiple jobs against the same host at the same time in order to avoid race conditions. (localhost is a possible exception). If you need multiple jobs to run against the same host at the same time then you need to create two inventories and put that host in both inventories, running the two jobs against different inventories. In this situation, Tower does not know that you are running against the same host.
like image 130
MillerGeek Avatar answered Oct 03 '22 19:10

MillerGeek


Simultaneous jobs can be executed from Tower. Job templates have "Enable Concurrent Jobs" option. See section "15.4. Job Concurrency" at http://docs.ansible.com/ansible-tower/latest/html/userguide/jobs.html.

like image 30
Erkan Oztekin Avatar answered Oct 03 '22 20:10

Erkan Oztekin