Update to 2022-08-11 11:00

This commit is contained in:
Daniel Berteaud
2022-08-11 11:00:17 +02:00
parent 617c1583eb
commit 9d4a3e4947
9 changed files with 80 additions and 2 deletions

View File

@@ -156,6 +156,15 @@ nomad_base_conf:
publish_allocation_metrics: True
publish_node_metrics: True
# Consul integration
# See https://www.nomadproject.io/docs/configuration/consul
consul:
# address: http://localhost:8500
# allow_unauthenticated: True
# tags: []
# You can override part of the default config without rewriting everything else
# the dict will get merged
nomad_extra_conf: {}

Binary file not shown.

View File

@@ -60,3 +60,16 @@
when: nomad_conf_validation.rc != 0
tags: nomad
# Now we remove the backup config to prevent nomad warning about invalid config files
- name: List backup conf
shell: ls -1 {{ nomad_root_dir }}/etc/*.hcl.*
failed_when: False
changed_when: False
register: nomad_backup_configs
tags: nomad
- name: Remove backup configs
file: path={{ item }} state=absent
loop: "{{ nomad_backup_configs.stdout_lines }}"
tags: nomad

View File

@@ -164,3 +164,19 @@ telemetry {
publish_allocation_metrics = {{ nomad_conf.telemetry.publish_allocation_metrics | ternary('true', 'false') }}
publish_node_metrics = {{ nomad_conf.telemetry.publish_node_metrics | ternary('true', 'false') }}
}
consul {
{% if nomad_conf.consul.address is defined %}
address = "{{ nomad_conf.consul.address }}"
{% endif %}
{% if nomad_conf.consul.allow_unauthenticated is defined %}
allow_unauthenticated = {{ nomad_conf.consul.allow_unauthenticated | ternary('true', 'false') }}
{% endif %}
{% if nomad_conf.consul.tags is defined and nomad_conf.consul.tags is iterable %}
tags = [
{% for tag in nomad_conf.consul.tags %}
"{{ tag }}"
]
{% endfor %}
{% endif %}
}