Jerry Sun 0aa76b50b8 Enable certificate tasks for enrollment
This commit enables the certificate tasks for the enrollment playbook.
- rehome-subcloud/update-ca-cert
- common/update-sc-cert

We install the file admin-ep-cert.pem through ansible because cert-mon
is running in a "regular system" mode as opposed to DC mode at the
moment, and does not monitor the admin-ep-cert or install a new
copy.

Test Cases:

The test environment is a standard system controller with a single
node subcloud, installed with the existing factory install procedure.

PASS: get certificate on the subcloud, ensure sc-adminep-certificate
      is updated
PASS: ensure /etc/ssl/private/admin-ep-cert.pem contains the cert
      and key, like a regular DC deployment

Story: 2011100
Task: 50226

Change-Id: I12b5fb8a7b13fdcec6985a599347ff184e6287e0
Signed-off-by: Jerry Sun <jerry.sun@windriver.com>
2024-05-31 12:51:56 -04:00

33 lines
806 B
YAML

---
#
# Copyright (c) 2021-2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
- hosts: all
gather_facts: no
vars_files:
- vars/common/main.yml
- host_vars/rehome-subcloud/default.yml
roles:
- common/prepare-env
- common/validate-target
- common/recover-subcloud-certificates
- rehome-subcloud/validate-before-rehome
- common/check-services-status
- rehome-enroll-common/prepare-env
- rehome-subcloud/update-ca-cert
- common/update-sc-admin-endpoints
- role: common/update-sc-cert
when: subcloud_dc_admin_ep_cert_chain_recovered is undefined
- rehome-subcloud/update-network-config
- role: rehome-subcloud/update-keystone-data
become: yes
- rehome-subcloud/validate-after-rehome
vars:
mode: 'rehoming'