ansible-nomad/templates/config.hcl.j2
2022-04-03 20:42:01 +02:00

44 lines
764 B
Django/Jinja

data_dir = "{{ nomad_data_dir}}"
bind_addr = "{{ nomad_bind_addr }}"
datacenter = "{{ nomad_datacenter }}"
server {
enabled = {{ nomad_server |lower }}
bootstrap_expect = {{ nomad_bootstrap_expect }}
}
client {
enabled = true
}
plugin "raw_exec" {
config {
enabled = true
}
}
plugin "docker"{
config{
volumes {
enabled = true
selinuxlabel = "z"
}
}
}
consul {
address = "127.0.0.1:8500"
}
{% if nomad_vault_enabled %}
vault {
enabled = true
address = "{{ nomad_vault_address}}"
create_from_role = "{{ nomad_vault_role }}"
{% if nomad_server %}
token = "{{ nomad_vault_token }}"
namespace = "{{ nomad_vault_namespace}}"
task_token_ttl = "{{ nomad_vault_token_ttl }}"
{% endif %}
}
{% endif %}