0621
This commit is contained in:
@@ -14,17 +14,17 @@
|
|||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Wrapper | Stop host if nb_onedevice_update.py missing"
|
- name: "Wrapper | Assert iponly succeeded"
|
||||||
when: not (nb_script.stat.exists | default(false))
|
ansible.builtin.assert:
|
||||||
meta: end_host
|
that:
|
||||||
|
- nb_script is defined
|
||||||
- name: "Wrapper | Stop host if iponly did not return OK"
|
- nb_script.stat.exists | default(false)
|
||||||
when: not (nb_ok | default(false))
|
- nb_ok | default(false)
|
||||||
meta: end_host
|
- (nb_ip | default('') | trim) not in ('', 'NONE', 'null')
|
||||||
|
fail_msg: >-
|
||||||
- name: "Wrapper | Stop host if returned IP is empty/NONE"
|
Wrapper stop: iponly did not produce a usable IP.
|
||||||
when: (nb_ip | default('') | trim) in ('', 'NONE', 'null')
|
nb_ok={{ nb_ok | default('UNDEF') }},
|
||||||
meta: end_host
|
nb_ip='{{ nb_ip | default('UNDEF') }}'
|
||||||
|
|
||||||
- name: "Wrapper | Override ansible_host to refreshed IP ({{ nb_ip }})"
|
- name: "Wrapper | Override ansible_host to refreshed IP ({{ nb_ip }})"
|
||||||
set_fact:
|
set_fact:
|
||||||
@@ -33,5 +33,12 @@
|
|||||||
- name: "Wrapper | Reset SSH connection context (ensure new ansible_host is used)"
|
- name: "Wrapper | Reset SSH connection context (ensure new ansible_host is used)"
|
||||||
meta: reset_connection
|
meta: reset_connection
|
||||||
|
|
||||||
|
- name: "Wrapper | Debug effective target"
|
||||||
|
debug:
|
||||||
|
msg:
|
||||||
|
- "Effective ansible_host={{ ansible_host }}"
|
||||||
|
- "nb_ip={{ nb_ip }}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
- import_playbook: sot-updater.yml
|
- import_playbook: sot-updater.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user