2020-08-30 00:25:30 +00:00
|
|
|
datacenter = "{{ main_dc_name }}"
|
|
|
|
data_dir = "/opt/nomad"
|
|
|
|
|
|
|
|
client {
|
|
|
|
enabled = true
|
2020-10-04 00:35:33 +00:00
|
|
|
options {
|
|
|
|
"docker.volumes.enabled" = true
|
|
|
|
}
|
2020-10-03 21:22:04 +00:00
|
|
|
meta {
|
|
|
|
{% for nomad_meta in nomad_meta_values %}
|
|
|
|
"{{ nomad_meta.name }}" = "{{ nomad_meta.value }}"
|
|
|
|
{% endfor %}
|
|
|
|
}
|
2020-08-30 00:25:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
consul {
|
|
|
|
token = "{{ lookup('hashi_vault', 'secret=kv/data/nomad:data')['consul-acl-client'] }}"
|
|
|
|
}
|
2020-10-01 00:59:50 +00:00
|
|
|
|
2020-10-13 02:39:23 +00:00
|
|
|
vault {
|
|
|
|
enabled = true
|
|
|
|
ca_file = "/etc/pki/certs/{{ vault_ca_cert_name }}"
|
|
|
|
token = "{{ lookup('hashi_vault', 'secret=kv/data/nomad:data')['vault-token'] }}"
|
|
|
|
address = "https://vault.service.{{ consul_domain }}:8200"
|
|
|
|
create_from_role = "nomad-cluster"
|
|
|
|
unwrap_token = true
|
|
|
|
}
|
|
|
|
|
2020-10-01 02:37:18 +00:00
|
|
|
tls {
|
|
|
|
http = true
|
|
|
|
rpc = true
|
|
|
|
ca_file = "/etc/pki/certs/{{ vault_ca_cert_name }}"
|
|
|
|
cert_file = "/etc/nomad.d/certs/nomad.pem"
|
|
|
|
key_file = "/etc/nomad.d/certs/nomad.key"
|
|
|
|
}
|
|
|
|
|
2020-10-01 00:59:50 +00:00
|
|
|
plugin_dir = "/opt/nomad_plugins"
|
|
|
|
|
|
|
|
plugin "nomad-driver-podman" {
|
|
|
|
enabled = true
|
2021-08-16 01:30:56 +00:00
|
|
|
config {
|
2022-03-26 22:06:26 +00:00
|
|
|
socket_path = "unix:///run/user/{{ getent_passwd.podman[1] }}/podman/podman.sock"
|
2021-08-16 01:30:56 +00:00
|
|
|
}
|
2020-10-01 00:59:50 +00:00
|
|
|
}
|