4

Adding 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.

1

I think Ansible serial works only for the entire play, have you tried to use roles ?

For example:

- hosts:
    - web
    - db
  serial: 1
  roles:
    - { role: nginx, when: ansible_os_family == 'Debian' }
    - role2
    - role3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.