Compare commits
2 Commits
53214a61c8
...
d942a71269
| Author | SHA1 | Date | |
|---|---|---|---|
| d942a71269 | |||
| f2b2447b84 |
@@ -50,6 +50,11 @@
|
|||||||
changed_when: false
|
changed_when: false
|
||||||
|
|
||||||
- name: Read DEV1 hostname (busybox-safe)
|
- name: Read DEV1 hostname (busybox-safe)
|
||||||
|
- name: Init ptsd migrate report accumulator
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: ""
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
ansible.builtin.raw: >
|
ansible.builtin.raw: >
|
||||||
{{ pathprefix }}
|
{{ pathprefix }}
|
||||||
(cat /proc/sys/kernel/hostname 2>/dev/null || echo "")
|
(cat /proc/sys/kernel/hostname 2>/dev/null || echo "")
|
||||||
@@ -532,6 +537,11 @@
|
|||||||
- "lldp ipv4={{ lldp_dev2_ip | default('') }}"
|
- "lldp ipv4={{ lldp_dev2_ip | default('') }}"
|
||||||
- "lldp ipv6={{ lldp_dev2_ip6 | default('') }}"
|
- "lldp ipv6={{ lldp_dev2_ip6 | default('') }}"
|
||||||
|
|
||||||
|
- name: Report milestone connectivity selected
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: "{{ (ptsd_migrate_report ~ 'conn ' ~ dev2_conn_final ~ '; ') }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Build DEV2 exec wrapper (controller-side) for Phase 1 commands
|
- name: Build DEV2 exec wrapper (controller-side) for Phase 1 commands
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.set_fact:
|
ansible.builtin.set_fact:
|
||||||
@@ -751,6 +761,11 @@
|
|||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
|
|
||||||
|
- name: Report milestone marker set
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: "{{ (ptsd_migrate_report ~ 'marker set; ') }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: PHASE 1 | Download /tmp/config.json from DEV2 to controller (tunnel)
|
- name: PHASE 1 | Download /tmp/config.json from DEV2 to controller (tunnel)
|
||||||
when: dev2_conn_final == "tunnel"
|
when: dev2_conn_final == "tunnel"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
@@ -1020,6 +1035,11 @@
|
|||||||
args: { executable: /bin/bash }
|
args: { executable: /bin/bash }
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
|
- name: Report milestone config converted and staged
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: "{{ (ptsd_migrate_report ~ 'config backed up, converted, uploaded; ') }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: PHASE 1 | DEV2 arm parachute reboot delayed 600 seconds
|
- name: PHASE 1 | DEV2 arm parachute reboot delayed 600 seconds
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
@@ -1028,6 +1048,11 @@
|
|||||||
args: { executable: /bin/bash }
|
args: { executable: /bin/bash }
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
|
- name: Report milestone parachute armed
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: "{{ (ptsd_migrate_report ~ 'parachute reboot armed; ') }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: PHASE 1 | DEV2 simulate upgrade marker /tmp/AA_startedupgrade
|
- name: PHASE 1 | DEV2 simulate upgrade marker /tmp/AA_startedupgrade
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
@@ -1045,6 +1070,11 @@
|
|||||||
args: { executable: /bin/bash }
|
args: { executable: /bin/bash }
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
|
- name: Report milestone lld restart scheduled
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: "{{ (ptsd_migrate_report ~ 'lld restart scheduled; ') }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: PHASE 1 | initiating actual upgrade
|
- name: PHASE 1 | initiating actual upgrade
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
ansible.builtin.shell: |
|
ansible.builtin.shell: |
|
||||||
@@ -1053,6 +1083,11 @@
|
|||||||
args: { executable: /bin/bash }
|
args: { executable: /bin/bash }
|
||||||
changed_when: true
|
changed_when: true
|
||||||
|
|
||||||
|
- name: Report milestone upgrade started
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: "{{ (ptsd_migrate_report ~ 'upgrade started; ') }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- name: Cleanup note
|
- name: Cleanup note
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
@@ -1097,6 +1132,22 @@
|
|||||||
and ('Cannot assign requested address' not in (del_ip.stdout | default('')))
|
and ('Cannot assign requested address' not in (del_ip.stdout | default('')))
|
||||||
and ('Cannot assign requested address' not in (del_ip.stderr | default('')))
|
and ('Cannot assign requested address' not in (del_ip.stderr | default('')))
|
||||||
|
|
||||||
|
- name: Report milestone cleanup completed
|
||||||
|
when: dev2_conn_method | default('') == "tunnel"
|
||||||
|
ansible.builtin.set_fact:
|
||||||
|
ptsd_migrate_report: "{{ (ptsd_migrate_report ~ 'cleanup done; ') }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
|
- name: PHASE Y | Final cumulative migrate report
|
||||||
|
hosts: all
|
||||||
|
gather_facts: false
|
||||||
|
tasks:
|
||||||
|
- name: Migrate final cumulative report
|
||||||
|
delegate_to: localhost
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: "{{ ptsd_migrate_report | default('') | regex_replace('\\s+', ' ') | trim }}"
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: PHASE X | Wait 45 seconds after config activation
|
- name: PHASE X | Wait 45 seconds after config activation
|
||||||
hosts: all
|
hosts: all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
@@ -1104,4 +1155,5 @@
|
|||||||
- ansible.builtin.pause:
|
- ansible.builtin.pause:
|
||||||
seconds: 45
|
seconds: 45
|
||||||
|
|
||||||
- import_playbook: ptsd_reacquire_attempt.yml
|
- import_playbook: ptsd_reacquire_attempt.yml
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user