From 5b2db93622f5a663806363d0f05a32439d1de034 Mon Sep 17 00:00:00 2001 From: Barnabas Busa Date: Thu, 20 Jun 2024 15:45:39 +0200 Subject: [PATCH] fix ternary logic --- ansible/group_vars/all/defaults.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ansible/group_vars/all/defaults.yaml b/ansible/group_vars/all/defaults.yaml index e15d0d0..11d4275 100644 --- a/ansible/group_vars/all/defaults.yaml +++ b/ansible/group_vars/all/defaults.yaml @@ -38,7 +38,11 @@ fail2ban_ignoreips: # role: ethpandaops.general.docker_network docker_network_name: shared docker_network_enable_ipv6: "{{ global_ipv6_enabled }}" -docker_network_ipam_config: [] +docker_network_ipam_config: >- + {{ global_ipv6_enabled | default(false) | ternary( + [ { 'subnet': ansible_default_ipv6.address | default('::1') | ansible.utils.ipsubnet(global_ipv6_subnet_ranges[hostvars[inventory_hostname]['cloud']]) } ] + , []) + }} docker_networks_shared: - name: "{{ docker_network_name }}"