Hi all,
From the docs, I read that by default, tasks within a playbook are executed in parallel. This behavior can be changed by using the serial directive.
Now I have simple playbook to update Red Hat servers. It looks like this:
---
# file: RedHat.yml
- name: update all packages
yum:
name: '*'
state: latest
notify:
- reboot server
- wait for server to restart
tags:
- update_all
The handlers look like this:
---
# file reboot.yml
- name: reboot server
shell: shutdown -r now "Reboot triggered by Ansible."
async: 0
poll: 0
ignore_errors: true
- name: wait for server to restart
local_action: wait_for host="{{ec2_private_ip_address}}" port=22 delay=10 timeout=600 search_regex=OpenSSH
become: false
This all works fine. However, from the sshd and yum logs, it looks like the update process was not executed in parallel on all hosts. Why would this be?
Kind regards,
Tom