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