I'm trying to write a rolling-update.yml playbook that calls other playbooks and makes use of the serial: attribute.
It goes something like this:
rolling-update.yml:
- hosts: nonprod-app-servers
serial: "30%"
pre_tasks:
- name: disable node in the F5 Pool
- include: peoplesoft.yml
post_tasks:
- name: enable node in the F5 Pool
peoplesoft.yml playbook calls multiple roles with different host targets
- hosts: peoplesoft-nonprod-servers
roles:
- ps-common
- hosts: nonprod-app-servers:nonprod-unixprcs-servers
roles:
- ps-tuxedo
- hosts: nonprod-app-servers
roles:
- ps-app-domains
... and so on...
What I want is to call rolling-update.yml and target a cluster so that it runs through the entire rolling-update playbook on 30% of the targeted group at a time. However, as I understand it, there's two problems with this.
A) you can't apply serial: to an included playbook and
B) even if you could, it would be a different play and starts the next set of hosts before moving on to the next play.
I'm kinda hoping my only recourse isn't to explicitly call all my roles in the rolling-update playbook, since I have a list of 7 roles that apply to various parts of the infrastructure and that list is growing weekly. I'd prefer to just reuse the existing peoplesoft.yml playbook and call that from other playbooks.
Appreciate any thoughts/insight, even if only to tell me i'm hosed and to suck it up stop reusing the peoplesoft.yml playbook.