How to run several parallel games in parallel?

I have a player with several games:

--- - hosts: druid-realtime-1 sudo: true roles: - { role: druid-realtime, du_rt_id: 1 } - hosts: druid-realtime-2 sudo: true roles: - { role: druid-realtime, du_rt_id: 2 } 

How can I say that it is impossible to run both games in parallel, and not one after the other?

+8
ansible
source share
4 answers

You could do it that way

In your Ansible inventory, group the servers and assign a host variable:

 [druid-realtime] druid-realtime-1 id=1 druid-realtime-2 id=2 

Then specify the variable in the playbook:

 - hosts: druid-realtime sudo: true roles: - { role: druid-realtime, du_rt_id: {{ id }} } 
+7
source share

Not sure if this was possible when this post was created, but I believe that this is what you were looking for:

http://docs.ansible.com/ansible/playbooks_async.html

This allows you to stop the task lock, i.e. waiting for the task to complete before moving on to the next task.

+4
source share

Connect the hosts together (if you want them to do the same)

 - hosts: druid-realtime-1:druid-realtime-2 ... 
0
source share

If your pieces are isolated, you can share your piece: 1 play → 1 playbook. For example:

  • Druid-Realtime-1.yml:

- hosts: druid-realtime-1 sudo: true roles: - { role: druid-realtime, du_rt_id: 1 }

  • Druid-Realtime-2.yml:

- hosts: druid-realtime-2 sudo: true roles: - { role: druid-realtime, du_rt_id: 2 }

  • Keep the main playbook site.yml, which includes other players:

- include: druid-realtime-1.yml - include: druid-realtime-2.yml

With this approach, you can use the terminal for each player and continue to use your general ledger.

0
source share

All Articles