From 09f3d86b12492f9838278b23940a924a4a4fae6b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 5 Aug 2022 15:00:15 +0200 Subject: [PATCH] Update to 2022-08-05 15:00 --- roles/nomad/defaults/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/roles/nomad/defaults/main.yml b/roles/nomad/defaults/main.yml index 16e75aa..7ebc833 100644 --- a/roles/nomad/defaults/main.yml +++ b/roles/nomad/defaults/main.yml @@ -50,7 +50,7 @@ nomad_base_conf: # The default is to act as a client if the hostname is not listed in nomad servers client: # Should client be enabled - enabled: "{{ (inventory_hostname in nomad_servers) | ternary(False, True) }}" + enabled: "{{ (inventory_hostname in nomad_servers | map('regex_replace', ':\\d+$', '')) | ternary(False, True) }}" # host_volumes: # - name: mysql # path: /data/mysql @@ -103,7 +103,7 @@ nomad_base_conf: server: # Should server be enabled # The default is to act as a server if the hostname is listed in nomad_servers - enabled: "{{ (inventory_hostname in nomad_servers) | ternary(True, False) }}" + enabled: "{{ (inventory_hostname in nomad_servers | map('regex_replace', ':\\d+$', '')) | ternary(True, False) }}" # Expected number of servers to bootstrap the cluster. The default is to wait for all the servers # listed in nomad_servers to be ready, and then to do the bootstrap @@ -121,7 +121,7 @@ nomad_base_conf: # UI related settings ui: # Default is to enable the UI on server only - enabled: "{{ (inventory_hostname in nomad_servers) | ternary(True, False) }}" + enabled: "{{ (inventory_hostname in nomad_servers | map('regex_replace', ':\\d+$', '')) | ternary(True, False) }}" # Consul and vault optional URL. This is just to add a shortcut in Nomad's UI # consul_ui: https://consul.example.org # vault_ui: https://vault.example.org