patternMinor
Execute the whole Playbook serially
Viewed 0 times
theseriallywholeplaybookexecute
Problem
Adding
That is, all plays will execute only in one host, and when they are finished then all plays will execute on the next host, an so on.
serial: 1 to a Play will execute that one Play one host at a time. Is there something similar for the whole playbook?That is, all plays will execute only in one host, and when they are finished then all plays will execute on the next host, an so on.
Solution
I think Ansible serial works only for the entire play, have you tried to use roles ?
For example:
For example:
- hosts:
- web
- db
serial: 1
roles:
- { role: nginx, when: ansible_os_family == 'Debian' }
- role2
- role3Code Snippets
- hosts:
- web
- db
serial: 1
roles:
- { role: nginx, when: ansible_os_family == 'Debian' }
- role2
- role3Context
StackExchange DevOps Q#1106, answer score: 1
Revisions (0)
No revisions yet.