1744
This commit is contained in:
@@ -535,6 +535,41 @@
|
||||
when: not (dhcp_migrated_ok | bool)
|
||||
ansible.builtin.meta: end_host
|
||||
|
||||
- name: CASE A DEV2 run config-test check before reboot cancellation
|
||||
when: dhcp_migrated_ok | bool
|
||||
delegate_to: localhost
|
||||
ansible.builtin.shell: |
|
||||
set -e
|
||||
export DEV2_CMD="/usr/sbin/config-test.lua -c >/dev/null 2>&1 && echo OK || echo FAIL"
|
||||
{{ dev2_exec_cmd }}
|
||||
args: { executable: /bin/bash }
|
||||
register: config_test_check
|
||||
changed_when: false
|
||||
failed_when: false
|
||||
|
||||
- name: CASE A set config-test check status
|
||||
when: dhcp_migrated_ok | bool
|
||||
delegate_to: localhost
|
||||
ansible.builtin.set_fact:
|
||||
config_test_ok: "{{ (config_test_check.stdout | default('') | trim) == 'OK' }}"
|
||||
changed_when: false
|
||||
|
||||
- name: CASE A append config-test check result
|
||||
when: dhcp_migrated_ok | bool
|
||||
delegate_to: localhost
|
||||
ansible.builtin.set_fact:
|
||||
cleanup_report: >-
|
||||
{{
|
||||
cleanup_report
|
||||
~ ', '
|
||||
~ (
|
||||
'config-test -c ok'
|
||||
if (config_test_ok | bool)
|
||||
else 'config-test -c failed'
|
||||
)
|
||||
}}
|
||||
changed_when: false
|
||||
|
||||
- name: CASE A Initialize cumulative cleanup report
|
||||
when: dhcp_migrated_ok | bool
|
||||
delegate_to: localhost
|
||||
@@ -555,7 +590,7 @@
|
||||
failed_when: false
|
||||
|
||||
- name: CASE A DEV2 cancel reboot if present
|
||||
when: dhcp_migrated_ok | bool and (reboot_present.stdout | default('') | trim) == "FOUND"
|
||||
when: dhcp_migrated_ok | bool and (config_test_ok | bool) and (reboot_present.stdout | default('') | trim) == "FOUND"
|
||||
delegate_to: localhost
|
||||
ansible.builtin.shell: |
|
||||
set -e
|
||||
|
||||
Reference in New Issue
Block a user