diff --git a/ansible/disable-selinux.yml b/ansible/disable-selinux.yml index 5a1e93987..e5f3cad8d 100644 --- a/ansible/disable-selinux.yml +++ b/ansible/disable-selinux.yml @@ -3,3 +3,4 @@ hosts: controllers:seed roles: - role: disable-selinux + disable_selinux_reboot_timeout: "{{ 600 if ansible_virtualization_role == 'host' else 300 }}" diff --git a/ansible/roles/disable-selinux/defaults/main.yml b/ansible/roles/disable-selinux/defaults/main.yml new file mode 100644 index 000000000..979f3f93a --- /dev/null +++ b/ansible/roles/disable-selinux/defaults/main.yml @@ -0,0 +1,4 @@ +--- +# Number of seconds to wait for hosts to become accessible via SSH after being +# rebooted. +disable_selinux_reboot_timeout: diff --git a/ansible/roles/disable-selinux/tasks/main.yml b/ansible/roles/disable-selinux/tasks/main.yml index 5d0055904..f101e60c8 100644 --- a/ansible/roles/disable-selinux/tasks/main.yml +++ b/ansible/roles/disable-selinux/tasks/main.yml @@ -51,6 +51,7 @@ state: started # Wait for 10 seconds before polling to ensure the node has shutdown. delay: 10 + timeout: "{{ disable_selinux_reboot_timeout }}" when: - "{{ selinux_result | changed }}" - "{{ not is_local | bool }}"