From 3515ce08b4a1caf0431dbad96b47cfe9388f5cae Mon Sep 17 00:00:00 2001 From: reliezer Date: Fri, 12 Mar 2021 00:47:28 +0200 Subject: [PATCH 1/3] Add reboot host parameters to infra/roles/hosts --- roles/infra/roles/hosts/README.md | 2 ++ roles/infra/roles/hosts/tasks/main.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/roles/infra/roles/hosts/README.md b/roles/infra/roles/hosts/README.md index d1d3008a..842f0689 100644 --- a/roles/infra/roles/hosts/README.md +++ b/roles/infra/roles/hosts/README.md @@ -19,6 +19,8 @@ The `hosts` list can contain the following parameters: | timeout | 1200 | Maximum wait time for the host to be in an UP state. | | poll_interval | 20 | Polling interval to check the host status. | | hosted_engine | UNDEF | Specifies whether to 'deploy' or 'undeploy' hosted-engine to node. | +| reboot_added_hosts_after_installation | UNDEF | If true reboot host after successful installation. | +| reboot_added_hosts_after_upgrade | UNDEF | If true reboot hosts after successful upgrade. | Example Playbook ---------------- diff --git a/roles/infra/roles/hosts/tasks/main.yml b/roles/infra/roles/hosts/tasks/main.yml index 6a39dc9e..e007c074 100644 --- a/roles/infra/roles/hosts/tasks/main.yml +++ b/roles/infra/roles/hosts/tasks/main.yml @@ -37,6 +37,8 @@ timeout: "{{ item.timeout | default(ovirt_hosts_add_timeout) }}" poll_interval: "{{ item.poll_interval | default(20) }}" hosted_engine: "{{ item.hosted_engine | default(omit) }}" + reboot_after_installation: "{{ reboot_added_hosts_after_installation | default(omit) }}" + reboot_after_upgrade: "{{ reboot_added_hosts_after_upgrade | default(omit) }}" with_items: "{{ ovirt_infra_hosts }}" loop_control: label: "{{ item.name }}" From 241e816ac8f4f8e62f6ac41500142a5559b9c553 Mon Sep 17 00:00:00 2001 From: reliezer Date: Sun, 14 Mar 2021 14:39:12 +0200 Subject: [PATCH 2/3] Set vars per host --- roles/infra/roles/hosts/README.md | 4 ++-- roles/infra/roles/hosts/tasks/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/infra/roles/hosts/README.md b/roles/infra/roles/hosts/README.md index 842f0689..251d5b5d 100644 --- a/roles/infra/roles/hosts/README.md +++ b/roles/infra/roles/hosts/README.md @@ -19,8 +19,8 @@ The `hosts` list can contain the following parameters: | timeout | 1200 | Maximum wait time for the host to be in an UP state. | | poll_interval | 20 | Polling interval to check the host status. | | hosted_engine | UNDEF | Specifies whether to 'deploy' or 'undeploy' hosted-engine to node. | -| reboot_added_hosts_after_installation | UNDEF | If true reboot host after successful installation. | -| reboot_added_hosts_after_upgrade | UNDEF | If true reboot hosts after successful upgrade. | +| reboot_added_host_after_installation | UNDEF | If true reboot host after successful installation. | +| reboot_added_host_after_upgrade | UNDEF | If true reboot host after successful upgrade. | Example Playbook ---------------- diff --git a/roles/infra/roles/hosts/tasks/main.yml b/roles/infra/roles/hosts/tasks/main.yml index e007c074..46d6e39b 100644 --- a/roles/infra/roles/hosts/tasks/main.yml +++ b/roles/infra/roles/hosts/tasks/main.yml @@ -37,8 +37,8 @@ timeout: "{{ item.timeout | default(ovirt_hosts_add_timeout) }}" poll_interval: "{{ item.poll_interval | default(20) }}" hosted_engine: "{{ item.hosted_engine | default(omit) }}" - reboot_after_installation: "{{ reboot_added_hosts_after_installation | default(omit) }}" - reboot_after_upgrade: "{{ reboot_added_hosts_after_upgrade | default(omit) }}" + reboot_after_installation: "{{ item.reboot_added_host_after_installation | default(omit) }}" + reboot_after_upgrade: "{{ item.reboot_added_host_after_upgrade | default(omit) }}" with_items: "{{ ovirt_infra_hosts }}" loop_control: label: "{{ item.name }}" From d544dcc3864e6ba27c923420feba6d6a28da2b7f Mon Sep 17 00:00:00 2001 From: reliezer Date: Sun, 14 Mar 2021 17:44:58 +0200 Subject: [PATCH 3/3] Rename reboot variables --- roles/infra/roles/hosts/README.md | 4 ++-- roles/infra/roles/hosts/tasks/main.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/infra/roles/hosts/README.md b/roles/infra/roles/hosts/README.md index 251d5b5d..bf4842e1 100644 --- a/roles/infra/roles/hosts/README.md +++ b/roles/infra/roles/hosts/README.md @@ -19,8 +19,8 @@ The `hosts` list can contain the following parameters: | timeout | 1200 | Maximum wait time for the host to be in an UP state. | | poll_interval | 20 | Polling interval to check the host status. | | hosted_engine | UNDEF | Specifies whether to 'deploy' or 'undeploy' hosted-engine to node. | -| reboot_added_host_after_installation | UNDEF | If true reboot host after successful installation. | -| reboot_added_host_after_upgrade | UNDEF | If true reboot host after successful upgrade. | +| reboot_after_installation | UNDEF | If true reboot host after successful installation. | +| reboot_after_upgrade | UNDEF | If true reboot host after successful upgrade. | Example Playbook ---------------- diff --git a/roles/infra/roles/hosts/tasks/main.yml b/roles/infra/roles/hosts/tasks/main.yml index 46d6e39b..16702e1e 100644 --- a/roles/infra/roles/hosts/tasks/main.yml +++ b/roles/infra/roles/hosts/tasks/main.yml @@ -37,8 +37,8 @@ timeout: "{{ item.timeout | default(ovirt_hosts_add_timeout) }}" poll_interval: "{{ item.poll_interval | default(20) }}" hosted_engine: "{{ item.hosted_engine | default(omit) }}" - reboot_after_installation: "{{ item.reboot_added_host_after_installation | default(omit) }}" - reboot_after_upgrade: "{{ item.reboot_added_host_after_upgrade | default(omit) }}" + reboot_after_installation: "{{ item.reboot_after_installation | default(omit) }}" + reboot_after_upgrade: "{{ item.reboot_after_upgrade | default(omit) }}" with_items: "{{ ovirt_infra_hosts }}" loop_control: label: "{{ item.name }}"