mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-31 03:35:45 +02:00
Update to 2024-07-05 17:01
This commit is contained in:
@@ -26,9 +26,14 @@ vault_agent_sinks: []
|
||||
# List of templates
|
||||
vault_agent_templates: []
|
||||
# vault_agent_templates:
|
||||
# # Use only one of source or contents
|
||||
# # Use only one of source contents or data can be used
|
||||
# - source: /srv/foo.tpl
|
||||
# contents: "{{ with secret \"kv/bar\" }}{{.Data.data.baz}}{{ end }}"
|
||||
# data: |
|
||||
# [[- with pkiCert "pki/nomad/issue/jenkins" "common_name=jenkins.nomad" ]]
|
||||
# [[ .Cert ]]
|
||||
# [[ .Key ]]
|
||||
# [[- end ]]
|
||||
# destination: /src/foo
|
||||
# left_delimiter = "[["
|
||||
# right_delimiter = "]]"
|
||||
|
@@ -31,3 +31,9 @@
|
||||
notify: restart vault-agent
|
||||
tags: vault,consul,nomad
|
||||
|
||||
- name: Deploy templates
|
||||
copy: content={{ item.data }} dest={{ vault_agent_root_dir }}/templates/ansible/{{ item.destination | regex_replace('/', '_') }}
|
||||
when: item.data is defined
|
||||
loop: "{{ vault_agent_templates }}"
|
||||
notify: restart vault-agent
|
||||
tags: vault,consul,nomad
|
||||
|
@@ -14,5 +14,7 @@
|
||||
- dir: bin
|
||||
- dir: templates/nomad
|
||||
- dir: templates/consul
|
||||
- dir: templates/ansible
|
||||
- dir: templates/custom
|
||||
tags: vault,consul,nomad
|
||||
|
||||
|
@@ -51,6 +51,8 @@ template {
|
||||
source = "{{ template.source }}"
|
||||
{% elif template.contents is defined %}
|
||||
contents = "{{ template.contents }}"
|
||||
{% elif template.data is defined %}
|
||||
source = "{{ vault_agent_root_dir }}/templates/ansible/{{ template.destination | regex_replace('/', '_') }}"
|
||||
{% endif %}
|
||||
destination = "{{ template.destination }}"
|
||||
{% for prop in ['left_delimiter', 'right_delimiter', 'perms'] %}
|
||||
|
Reference in New Issue
Block a user