forgot some defaults

This commit is contained in:
nazunalika 2021-01-19 20:15:41 -07:00
parent 065bd48c58
commit a5367f126c
2 changed files with 6 additions and 4 deletions

View File

@ -2,6 +2,7 @@
# ansible default variables - most variables live here
ipa_getcert_key_default_location: "/etc/pki/tls/private/{{ ansible_fqdn }}.key"
ipa_getcert_cert_default_location: "/etc/pki/tls/certs/{{ ansible_fqdn }}.crt"
ipa_getcert_nss_default_location: "/etc/pki/tls/nss"
ipa_getcert_owner_default: root
# List of hostnames that should be requested

View File

@ -5,8 +5,9 @@
{% for ipahosts in ipa_getcert_requested_hostnames %}
{% if ipa_getcert_nss %}
if [ ! -d "{{ ipahosts.nss_db_dir }}" && ! -L "{{ ipahosts.nss_db_dir }}" ]; then
mkdir -p {{ ipa_getcert_nss }}
nss_db_path="{{ ipahosts.nss_db_dir | default(ipa_getcert_nss_default_location) }}"
if [ ! -d "${nss_db_path}" && ! -L "${nss_db_path}" ]; then
mkdir -p "${nss_db_path}"
fi
{% endif %}
@ -15,8 +16,8 @@ fi
-N "CN={{ ipahosts.name }}" \
-D "{{ ipahosts.name }}" \
{% if ipa_getcert_nss %}
-d {{ ipahosts.nss_db_dir }} \
-n {{ ipahosts.nss_nickname }} \
-d "${nss_db_path}" \
-n {{ ipahosts.nss_nickname | default(ansible_fqdn) }} \
{% else %}
-k "{{ ipahosts.key_location | default(ipa_getcert_key_default_location) }}" \
-f "{{ ipahosts.cert_location | default(ipa_getcert_cert_default_location) }}" \