Copy the TLS private key from memory

This change should avoid storing plain private keys on disk due to
security risks. It also makes it easier to encrypt the data with SOPS.
This commit is contained in:
Footur 2024-05-05 11:58:19 +00:00
commit 320a5f0d9a
5 changed files with 7 additions and 7 deletions

View file

@ -161,7 +161,7 @@
- name: "Copy private key to target"
ansible.builtin.copy:
src: "{{ keycloak_quarkus_key_file_src }}"
content: "{{ keycloak_quarkus_key_content }}"
dest: "{{ keycloak_quarkus_key_file }}"
owner: "{{ keycloak.service_user }}"
group: "{{ keycloak.service_group }}"
@ -170,7 +170,7 @@
when:
- keycloak_quarkus_https_key_file_enabled is defined and keycloak_quarkus_https_key_file_enabled
- keycloak_quarkus_key_file_copy_enabled is defined and keycloak_quarkus_key_file_copy_enabled
- keycloak_quarkus_key_file_src | length > 0
- keycloak_quarkus_key_content | length > 0
- name: "Copy certificate to target"
ansible.builtin.copy: