ansible-roles/roles/nomad/templates/consul_cert.tpl.j2

9 lines
582 B
Plaintext
Raw Normal View History

2022-09-06 18:00:22 +02:00
[[ 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 %} ]]
2022-09-04 18:00:17 +02:00
[[ .Data.{{ item.what }} ]]
[[ end ]]
{% if item.what == 'issuing_ca' %}
2022-09-06 18:00:22 +02:00
[[ with secret "{{ nomad_vault_secrets.consul_pki.root_path }}/cert/ca" ]]
2022-09-04 18:00:17 +02:00
[[ .Data.certificate ]]
[[ end ]]
{% endif %}