Fixing alt_names for vault cert generation

pull/2059/head
Brad Beam 2017-12-11 17:28:18 -06:00
parent 18a616f57c
commit d3850a4da5
2 changed files with 2 additions and 6 deletions

View File

@ -84,11 +84,7 @@ vault_ca_options:
format: pem format: pem
ttl: "{{ vault_max_lease_ttl }}" ttl: "{{ vault_max_lease_ttl }}"
exclude_cn_from_sans: true exclude_cn_from_sans: true
alt_names: alt_names: "vault.{{ system_namespace }}.svc.{{ dns_domain }},vault.{{ system_namespace }}.svc,vault.{{ system_namespace }},vault"
- "vault.{{ system_namespace }}.svc.{{ dns_domain }}"
- "vault.{{ system_namespace }}.svc"
- "vault.{{ system_namespace }}"
- "vault"
etcd: etcd:
common_name: etcd common_name: etcd
format: pem format: pem

View File

@ -2,7 +2,7 @@
- include: ../shared/issue_cert.yml - include: ../shared/issue_cert.yml
vars: vars:
issue_cert_common_name: "{{ vault_pki_mounts.vault.roles[0].name }}" issue_cert_common_name: "{{ vault_pki_mounts.vault.roles[0].name }}"
issue_cert_alt_names: "{{ groups['vault'] + ['localhost'] + vault_ca_options.vault.alt_names|default() | join(',') }}" issue_cert_alt_names: "{{ groups['vault'] + ['localhost'] + (vault_ca_options['vault']['alt_names'].split(','))|default() }}"
issue_cert_hosts: "{{ groups['vault'] }}" issue_cert_hosts: "{{ groups['vault'] }}"
issue_cert_ip_sans: >- issue_cert_ip_sans: >-
[ [