Merge "Delete certs spec file after migration playbook"

This commit is contained in:
Zuul 2023-02-28 18:04:53 +00:00 committed by Gerrit Code Review
commit 23b8cfc1e3
3 changed files with 14 additions and 4 deletions

View File

@ -1,6 +1,6 @@
---
#
# Copyright (c) 2022 Wind River Systems, Inc.
# Copyright (c) 2022-2023 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -74,3 +74,5 @@
template:
src: platform_certificates.yml.j2
dest: "{{ destination }}"
mode: '0640'
become: yes

View File

@ -1,6 +1,6 @@
---
#
# Copyright (c) 2021-2022 Wind River Systems, Inc.
# Copyright (c) 2021-2023 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
@ -59,10 +59,10 @@
include_role:
name: common/generate-platform-certificates-template
vars:
destination: /tmp/platform_certificates.yaml
destination: "{{ cert_manager_spec_file }}"
- name: Apply kubernetes yaml to create cert-manager clusterissuer and certificates
command: kubectl apply -f /tmp/platform_certificates.yaml
command: kubectl apply -f "{{ cert_manager_spec_file }}"
environment:
KUBECONFIG: /etc/kubernetes/admin.conf
register: create_k8_apply_ep
@ -70,6 +70,12 @@
retries: 10
delay: 30
- name: Delete kubernetes yaml with certificate spec
file:
path: "{{ cert_manager_spec_file }}"
state: absent
become: yes
- name: Force certificate renewals
include_tasks: delete-kubernetes-objects.yml
with_items:

View File

@ -0,0 +1,2 @@
---
cert_manager_spec_file: /tmp/platform_certificates.yaml