Retrieve system-local-ca old values in legacy restore

Included code to retrieve the values during legacy restore,
avoiding changes in system-local-ca secret values.

Test plan:
PASS: Bootstrap AIO-DX w/ system-local-ca overrides.
      Run backup playbook.
      Reinstall system.
      Run restore playbook (legacy).
      Observe that system-local-ca maintained same values.

Story: 2009811
Task: 49797

Change-Id: Ifdb1458a95dbf96639a08d6ca06637d82c5d7784
Signed-off-by: Marcelo Loebens <Marcelo.DeCastroLoebens@windriver.com>
This commit is contained in:
Marcelo Loebens 2024-04-02 09:50:39 -04:00 committed by Marcelo de Castro Loebens
parent 9c4a5ef225
commit 351aa195f9

View File

@ -1,6 +1,6 @@
---
#
# Copyright (c) 2023 Wind River Systems, Inc.
# Copyright (c) 2023-2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -21,9 +21,10 @@
- system_local_ca_overrides
- not upgrade_in_progress
# When bootstrapping subclouds or upgrading we have to retrieve the current values
# in the Standalone controller or in the DC's SystemController.
# We must install the RCA as a Trusted CA if bootstrapping.
# When bootstrapping subclouds, upgrading or restoring, we have to
# retrieve the current values in the Standalone controller or in
# the DC's SystemController.
# We must install the RCA as a Trusted CA if bootstrapping/rehoming.
- block:
- name: Check if 'system-local-ca' secret exists
shell: |
@ -68,7 +69,7 @@
when: system_local_ca_exists.stdout | bool
when:
- distributed_cloud_role == 'subcloud' or upgrade_in_progress
- distributed_cloud_role == 'subcloud' or upgrade_in_progress or mode == 'restore'
- not system_local_ca_data_obtained
connection: local