The task importing the client certificate passed `certificate_authority_client_tls_crt_content` to `dest`, so the PEM payload itself was interpreted as a directory path. The certificate was written to a bogus location derived from its own content instead of the configured client directory. Use `certificate_authority_client_path` as destination, consistent with the private key import above. Co-authored-by: Copilot <copilot@github.com>
20 lines
627 B
YAML
20 lines
627 B
YAML
---
|
|
|
|
- name: Import private key of a client
|
|
ansible.builtin.copy:
|
|
content: "{{ certificate_authority_client_tls_key_content }}"
|
|
dest: "{{ certificate_authority_client_path }}/privkey.pem"
|
|
owner: "root"
|
|
group: "root"
|
|
mode: "0600"
|
|
when: certificate_authority_client_tls_key_content | length > 0
|
|
|
|
- name: Import certificate of a client
|
|
ansible.builtin.copy:
|
|
content: "{{ certificate_authority_client_tls_crt_content }}"
|
|
dest: "{{ certificate_authority_client_path }}/cert.pem"
|
|
owner: "root"
|
|
group: "root"
|
|
mode: "0644"
|
|
when: certificate_authority_client_tls_crt_content | length > 0
|