Update to 2022-07-29 15:00

This commit is contained in:
Daniel Berteaud
2022-07-29 15:00:16 +02:00
parent 2737485b20
commit f44895157e
14 changed files with 83 additions and 50 deletions

View File

@@ -0,0 +1,34 @@
data_dir = "{{ nomad_root_dir }}/data"
log_level = "{{ nomad_log_level }}"
bind_addr = "0.0.0.0"
advertise {
{% for service in nomad_services.keys() | list %}
{% if nomad_services[service].advertise is defined %}
{{ service }} = {{ nomad_services[service].advertise }}
{% endif %}
{% endfor %}
}
ports {
{% for service in nomad_services.keys() | list %}
{{ service }} = {{ nomad_services[service].port }}
{% endfor %}
}
server {
enabled = {{ nomad_server_enabled | ternary('true','false') }}
bootstrap_expect = {{ nomad_servers | length }}
server_join {
retry_join = [
{% for server in consul_servers %}
"{{ server }}",
{% endfor %}
]
}
}
client {
enabled = {{ nomad_client_enabled | ternary('true','false') }}
servers = [
{% for server in consul_servers %}
"{{ server }}",
{% endfor %}
]
}

View File

@@ -3,13 +3,13 @@ Description=Nomad
Documentation=https://nomadproject.io/docs/
Wants=network-online.target
After=network-online.target
ConditionFileNotEmpty={{ nomad_root_dir }}/etc/nomad.json
ConditionFileNotEmpty={{ nomad_root_dir }}/etc/nomad.hcl
[Service]
EnvironmentFile=-{{ nomad_root_dir }}/etc/nomad.env
User={{ nomad_user }}
Group={{ nomad_user }}
ExecStart={{ nomad_root_dir }}/bin/nomad agent -config={{ nomad_root_dir }}/etc/
ExecStart={{ nomad_root_dir }}/bin/nomad agent -config={{ nomad_root_dir }}/etc/nomad.hcl
ExecReload=/bin/kill --signal HUP $MAINPID
KillMode=process
KillSignal=SIGINT