Update SX to DX migration playbook to support IPsec

This change updated SX to DX migration playbook to support IPsec when
migrated to DX. The migration playbook is supposed to run on System
Controller to migrate subclouds.

Test Plan:
PASS: In a DC system, define an overrides file, then run the migration
      playbook in System Controller to migrate a SX subcloud, verify
      the migration is successful, and verify IPsec is configured and
      enabled in the migrated DX subcloud.

Story: 2010940
Task: 50791

Change-Id: I76666b8c29cbd3f84bfa8f6ab4f03e7c26bd0fe4
Signed-off-by: Andy Ning <andy.ning@windriver.com>
This commit is contained in:
Andy Ning 2024-08-08 13:38:37 -04:00
parent da9468c6df
commit b1e846a35f
2 changed files with 13 additions and 0 deletions

View File

@ -1,6 +1,7 @@
---
{
"ansible_ssh_pass": "St8rlingXCloud*",
"ansible_become_pass": "St8rlingXCloud*",
"external_oam_node_0_address": "10.10.10.13",
"external_oam_node_1_address": "10.10.10.14",
}

View File

@ -69,6 +69,8 @@
admin_if.stdout == 'lo'
- set_fact:
ansible_port: "{{ ansible_port | default(22) }}"
ansible_host: "{{ inventory_hostname }}"
duplex_mode: "{{ duplex_mode | default('duplex') }}"
kubernetes_duplex_migration_flag: '/var/run/.kubernetes_duplex_migration_complete'
@ -124,6 +126,16 @@
name: common/host-unlock
vars:
target_host: 'controller-0'
wait_for_unlock: true
distributed_cloud_role: 'subcloud'
- name: Config and enable IPsec
command: /usr/bin/ipsec-client pxecontroller
register: result
until: result.rc == 0
retries: 3
delay: 5
become: yes
when: current_system_mode.stdout == 'simplex' or
current_oam_c0_ip.stdout != external_oam_node_0_address or