9 lines
582 B
Django/Jinja
9 lines
582 B
Django/Jinja
[[ with secret "{{ nomad_vault_secrets.consul_pki.path }}/issue/{{ nomad_vault_secrets.consul_pki.role }}" "common_name={{ ansible_fqdn | regex_replace('\\.', '-') }}.{{ (consul_conf is defined and consul_conf.domain is defined) | ternary(consul_conf.domain, 'consul') }}"{% if nomad_vault_secrets.consul_pki.ttl is defined %} "ttl={{ nomad_vault_secrets.consul_pki.ttl }}"{% endif %} ]]
|
|
[[ .Data.{{ item.what }} ]]
|
|
[[ end ]]
|
|
{% if item.what == 'issuing_ca' %}
|
|
[[ with secret "{{ nomad_vault_secrets.consul_pki.root_path }}/cert/ca" ]]
|
|
[[ .Data.certificate ]]
|
|
[[ end ]]
|
|
{% endif %}
|