Batch/Parallel Playbook Execution

Hi,

I would like to know if it’s possible to deploy X number of projects at a time.

In my top-level play called run-deploy.yml, the project data is loaded from a json file:

`

There is no top-level parallel execution of playbooks available directly in ansible, but there are lots of other ways to achieve this.

This was discussed a little while back here: https://github.com/ansible/proposals/issues/31

There are some suggestions here: http://www.slideshare.net/bcoca/more-tips-n-tricks

In the end I wound up using gnu parallels.

Hope this helps,

Jon

Thanks Jon,

I’ve made a few changes this morning and seem to have found another way around it using delegation and host vars. It isn’t the most elegant solution, but so far it seems like it could work. Would appreciate any feedback if possible.

Hosts file:

`

[websites]
site1.example.com
site2.example.coms
site3.example.com

`

group_vars/websites:

`

ansible_host: 127.0.0.1

web_servers:

app_servers:

db_server: db1.example.com

`

run_deploy.yml:

`