mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-03 23:26:58 +02:00
Update to 2022-09-02 18:00
This commit is contained in:
54
roles/nomad/templates/consul-template.hcl.j2
Normal file
54
roles/nomad/templates/consul-template.hcl.j2
Normal file
@@ -0,0 +1,54 @@
|
||||
vault {
|
||||
address = "{{ nomad_vault.address }}"
|
||||
token = "{{ nomad_vault.token }}"
|
||||
unwrap_token = false
|
||||
}
|
||||
|
||||
template {
|
||||
source = "{{ nomad_root_dir }}/consul-template/agent.crt.tpl"
|
||||
left_delimiter = "[["
|
||||
right_delimiter = "]]"
|
||||
destination = "{{ nomad_conf.tls.cert_file }}"
|
||||
perms = 0644
|
||||
exec {
|
||||
command = "systemctl reload nomad"
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
source = "{{ nomad_root_dir }}/consul-template/agent.key.tpl"
|
||||
left_delimiter = "[["
|
||||
right_delimiter = "]]"
|
||||
destination = "{{ nomad_conf.tls.key_file }}"
|
||||
perms = 0640
|
||||
exec {
|
||||
command = ["sh", "-c", "chgrp {{ nomad_user }} {{ nomad_conf.tls.key_file }} && systemctl reload nomad"]
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
source = "{{ nomad_root_dir }}/consul-template/ca.crt.tpl"
|
||||
left_delimiter = "[["
|
||||
right_delimiter = "]]"
|
||||
destination = "{{ nomad_conf.tls.ca_file }}"
|
||||
perms = 0644
|
||||
exec {
|
||||
command = "systemctl reload nomad"
|
||||
}
|
||||
}
|
||||
|
||||
template {
|
||||
source = "{{ nomad_root_dir }}/consul-template/cli.crt.tpl"
|
||||
left_delimiter = "[["
|
||||
right_delimiter = "]]"
|
||||
destination = "{{ nomad_root_dir }}/tls/cli.crt"
|
||||
}
|
||||
|
||||
template {
|
||||
source = "{{ nomad_root_dir }}/consul-template/cli.key.tpl"
|
||||
left_delimiter = "[["
|
||||
right_delimiter = "]]"
|
||||
destination = "{{ nomad_root_dir }}/tls/cli.key"
|
||||
perms = 0640
|
||||
}
|
||||
|
Reference in New Issue
Block a user