Add a passphrase to the pkcs12.

This commit is contained in:
Andrea Dell'Amico 2023-12-06 19:47:53 +01:00
parent 9c497992c3
commit ad8eae987b
Signed by: adellam
GPG Key ID: 147ABE6CEB9E20FF
1 changed files with 9 additions and 1 deletions

View File

@ -25,6 +25,7 @@
certificate_path: "{{ mkcert_cert_dest_path }}"
privatekey_path: "{{ mkcert_key_dest_path }}"
other_certificates: '{{ java_trusted_certificates_list }}'
passphrase: "{{ java_keystore_pwd }}"
owner: root
group: root
mode: "0600"
@ -33,9 +34,12 @@
- name: Import the CA certificate
community.general.java_cert:
pkcs12_path: "{{ pki_dir }}/keys/{{ ansible_fqdn }}.pkcs12"
pkcs12_alias: "{{ java_keystore_cert_alias }}"
pkcs12_password: "{{ java_keystore_pwd }}"
cert_alias: "{{ java_keystore_cert_alias }}"
keystore_path: "{{ java_keystore_file }}"
keystore_pass: "{{ java_keystore_pwd }}"
keystore_type: JKS
keystore_create: true
state: present
@ -50,10 +54,11 @@
action: export
friendly_name: "{{ java_keystore_cert_alias }}"
path: "{{ letsencrypt_acme_sh_certificates_install_path }}/{{ letsencrypt_acme_sh_certificates_install_dir }}.pkcs12"
certificate_path: "{{ letsencrypt_acme_sh_certificates_install_path }}/cert"
privatekey_path: "{{ letsencrypt_acme_sh_certificates_install_path }}/privkey"
other_certificates:
- '{{ letsencrypt_acme_sh_certificates_install_path }}/fullchain'
other_certificates_parse_all: true
passphrase: "{{ java_keystore_pwd }}"
owner: root
group: root
mode: "0600"
@ -63,7 +68,10 @@
community.general.java_cert:
pkcs12_path: "{{ letsencrypt_acme_sh_certificates_install_path }}/{{ letsencrypt_acme_sh_certificates_install_dir }}.pkcs12"
cert_alias: "{{ java_keystore_cert_alias }}"
pkcs12_alias: "{{ java_keystore_cert_alias }}"
pkcs12_password: "{{ java_keystore_pwd }}"
keystore_path: "{{ java_keystore_file }}"
keystore_pass: "{{ java_keystore_pwd }}"
keystore_type: JKS
keystore_create: true
state: present