From 36ee8b2dc05caff156dcb3b8d97fe1edb022343d Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Fri, 13 Jan 2023 13:58:30 +0100 Subject: [PATCH] Create relative links to root instead of absolute We don't really need to create an absolute links for root/intermediate certificates since original file is placed at the same place. In case of storing PKI dir in git these links are considered as out-of-bound which results in sanity checks failure. Also we're eliminating risk of broken links in case when PKI directory is being moved on the filesystem Change-Id: Ia7f4f4726bf4d73c6c0071bef52fd6eb58d662a3 --- tasks/standalone/create_ca.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/standalone/create_ca.yml b/tasks/standalone/create_ca.yml index 64fd4d5..44bd16d 100644 --- a/tasks/standalone/create_ca.yml +++ b/tasks/standalone/create_ca.yml @@ -131,7 +131,7 @@ - name: Symlink the certificate name to the most recently generated file: - src: "{{ ca_selfsigned_crt.filename | default(ca_ownca_crt.filename) }}" + src: "{{ (ca_selfsigned_crt.filename | default(ca_ownca_crt.filename)) | basename }}" dest: "{{ ca_cert_prefix ~ '.crt' }}" state: link when: ca_ownca_crt is changed or ca_selfsigned_crt is changed