We are using a build-server that is delegating_to and deploying the build to the application servers. I am not sure how we are going to "serialize" since everything is being done on the build-server ( 1 host ) and there are numerous application servers. The build-server is the only server able to talk to the application servers. This wouldn't be a problem, but we need to make sure to deploy to the app servers one by one(kicking/re-entering them into the pool when everything looks okay). Any suggestions?
The number of hosts an Ansible play is run in parallel can be defined with the
- name: test play hosts: webservers serial: 3
From the Ansible documentation:
By default, Ansible will try to manage all of the machines referenced in a play in parallel. For a rolling updates use case, you can define how many hosts Ansible should manage at a single time by using the ‘’serial’’ keyword In the above example, if we had 100 hosts, 3 hosts in the group ‘webservers’ would complete the play completely before moving on to the next 3 hosts.
If you want to deploy your app server one by one you need to define something like this in your play:
- name: Deploy app servers one by one hosts: appservers serial: 1