Merge "Block addition of ssl_ca certs with same subject"
This commit is contained in:
commit
3605a388f9
@ -316,12 +316,27 @@
|
||||
when: use_docker_proxy
|
||||
|
||||
|
||||
# Install certificate if SSL CA certifcate is configured
|
||||
# Install certificate if SSL CA certificate is configured
|
||||
- block:
|
||||
- name: Set source for copying certificate
|
||||
set_fact:
|
||||
ssl_ca_source: "{{ mode == 'restore' }}"
|
||||
|
||||
- block:
|
||||
- name: Check for existing ssl_ca certificates
|
||||
shell: |
|
||||
source /etc/platform/openrc
|
||||
system certificate-list | grep ssl_ca | awk '{ print $2 }'
|
||||
register: existing_ssl_ca_certificates_uuid
|
||||
|
||||
- name: Delete existing ssl_ca certificates
|
||||
shell: source /etc/platform/openrc; system certificate-uninstall -m ssl_ca {{ item }}
|
||||
with_items:
|
||||
- "{{ existing_ssl_ca_certificates_uuid.stdout_lines }}"
|
||||
when: existing_ssl_ca_certificates_uuid.stdout_lines | length > 0
|
||||
|
||||
when: replayed and mode != 'restore'
|
||||
|
||||
- name: Copy ssl_ca certificate
|
||||
copy:
|
||||
src: "{{ ssl_ca_cert }}"
|
||||
|
Loading…
Reference in New Issue
Block a user