55 lines
1.4 KiB
Django/Jinja
55 lines
1.4 KiB
Django/Jinja
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
|
|
}
|
|
|