From 27df88ae09b94509fa1fdc99ba913e0bd7d83018 Mon Sep 17 00:00:00 2001 From: Bertrand Lanson Date: Mon, 1 Jan 2024 21:16:44 +0100 Subject: [PATCH] feat(variables): fix listener not passing correct syntax --- playbooks/deploy.yml | 4 ++-- playbooks/group_vars/all.yml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/playbooks/deploy.yml b/playbooks/deploy.yml index 6285d6d..f7692a2 100644 --- a/playbooks/deploy.yml +++ b/playbooks/deploy.yml @@ -5,12 +5,12 @@ gather_facts: true become: true tasks: - - name: Debug + - name: "debug" ansible.builtin.debug: msg: "{{ hashi_vault_configuration.listener }}" - - name: "Vault" when: enable_vault | bool + when: "'vault_servers' in group_names" tags: - vault block: diff --git a/playbooks/group_vars/all.yml b/playbooks/group_vars/all.yml index 6ce72e6..07fad61 100644 --- a/playbooks/group_vars/all.yml +++ b/playbooks/group_vars/all.yml @@ -3,7 +3,7 @@ # General options ######## ########################## -enable_vault: "no" +enable_vault: "yes" enable_consul: "yes" enable_nomad: "yes" @@ -99,7 +99,7 @@ vault_storage_configuration: ################ # vault listener ################ -vault_enable_tls: true +vault_enable_tls: false vault_listener_configuration: tcp: address: "0.0.0.0:8200" @@ -139,7 +139,7 @@ hashi_vault_configuration: ui: true disable_mlock: false disable_cache: false - listener: "{{ vault_listener_configuration.tcp - | combine((vault_enable_tls | bool) | ternary(vault_tls_listener_configuration.tcp, {})) - | combine(vault_extra_listener_configuration.tcp | default({})) }}" + listener: "{{ vault_listener_configuration + | combine((vault_enable_tls | bool) | ternary(vault_tls_listener_configuration, {})) + | combine(vault_extra_listener_configuration | default({})) }}" storage: "{{ vault_storage_configuration }}"