I run a playbook, which contains a role, and executes so it runs once against the first server in the host file, it then executes against 25% of servers in the host file, finally, it executes against the rest of the servers.
What I want to achieve is:
- If I run the playbook without any tags or
task1, it should run against all servers in one go. - If I run the playbook with tags
task2it runs the playbook in batches (as per theserial).
At the moment, it will always run in batches regardless.
I have the following playbooks:
Playbook:
- hosts: all
serial:
- 1
- "25%"
- "100%"
roles:
- playbook2
playbook2 role:
- name: task 1
shell: [do something]
tags: task1
- name: task 2
shell: [do more]
tags: task2