Skip to content

Commit

Permalink
fix for when ansible_default_ipv6.address doesn't exist
Browse files Browse the repository at this point in the history
Signed-off-by: Rafael Matias <[email protected]>
  • Loading branch information
skylenet authored Jun 20, 2024
1 parent 262bedd commit 41f2efd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansible/group_vars/all/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ fail2ban_ignoreips:
docker_network_name: shared
docker_network_enable_ipv6: "{{ global_ipv6_enabled }}"
docker_network_ipam_config: >-
{{ global_ipv6_enabled | ternary(
[ { 'subnet': ansible_default_ipv6.address | ansible.utils.ipsubnet(global_ipv6_subnet_ranges[hostvars[inventory_hostname]['cloud']]) } ]
{{ global_ipv6_enabled | default(false) | ternary(
[ { 'subnet': ansible_default_ipv6.address | default('::1') | ansible.utils.ipsubnet(global_ipv6_subnet_ranges[hostvars[inventory_hostname]['cloud']]) } ]
, [])
}}
Expand Down

0 comments on commit 41f2efd

Please sign in to comment.