Execut playbook host after host

Hi all,

I have my principal playbook with this content :

  • hosts: all
    become: no
    gather_facts: no
    roles:
  • role

I have on file with content :

my_host_1 ansible_user: my_user

my_host_2 ansible_user: my_user

I want that when i run my task, ansible execute only on my_host_1
and when ansible fish execut task, he execut in second host of my inventory โ€œmy_host_2โ€

Someone have an idea please ?

Thanks community Ansible !!! :wink:

Regards,

https://docs.ansible.com/ansible/latest/user_guide/playbooks_delegation.html#rolling-update-batch-size

Use `serial: 1`

HTH,
Sebastian

Hi Sebastian Meyer,

You are the best !!

I do not know this module of Ansible โ€œserial: 1โ€

Thank you very much !! :wink:

I wish you a good day :slight_smile:

Regards,