algo/roles
Dan Guido 146e2dcf24
Fix IPv6 address selection on BSD systems (#14786)
* fix: Fix IPv6 address selection on BSD systems (#1843)

BSD systems return IPv6 addresses in the order they were added to the interface,
not sorted by scope like Linux. This causes ansible_default_ipv6 to contain
link-local addresses (fe80::) with interface suffixes (%em0) instead of global
addresses, breaking certificate generation.

This fix:
- Adds a new task file to properly select global IPv6 addresses on BSD
- Filters out link-local addresses and interface suffixes
- Falls back to ansible_all_ipv6_addresses when needed
- Ensures certificates are generated with valid global IPv6 addresses

The workaround is implemented in Algo rather than waiting for the upstream
Ansible issue (#16977) to be fixed, which has been open since 2016.

Fixes #1843

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore: Remove duplicate condition in BSD IPv6 facts

Removed redundant 'global_ipv6_address is not defined' condition
that was checked twice in the same when clause.

* improve: simplify regex for IPv6 interface suffix removal

Change regex from '(.*)%.*' to '%.*' for better readability
and performance when stripping interface suffixes from IPv6 addresses.

The simplified regex is equivalent but more concise and easier to understand.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve yamllint trailing spaces in BSD IPv6 test

Remove trailing spaces from test_bsd_ipv6.yml to ensure CI passes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: resolve yamllint issues across repository

- Remove trailing spaces from server.yml, WireGuard test files, and keys.yml
- Add missing newlines at end of test files
- Ensure all YAML files pass yamllint validation for CI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-03 17:15:27 -07:00
..
client Ansible upgrade 6.1 (#14500) 2022-07-30 15:01:24 +03:00
cloud-azure Fix AWS CloudFormation linter warnings (#14294) (#14782) 2025-08-03 04:49:40 -04:00
cloud-cloudstack/tasks feat: Add comprehensive performance optimizations to reduce deployment time by 30-60% 2025-08-03 16:42:17 -07:00
cloud-digitalocean/tasks Fix DigitalOcean cloud-init compatibility and deprecation warnings (#14801) 2025-08-03 14:25:47 -04:00
cloud-ec2 feat: Add AWS credentials file support (#14778) 2025-08-03 15:07:57 -06:00
cloud-gce/tasks feat: Add comprehensive performance optimizations to reduce deployment time by 30-60% 2025-08-03 16:42:17 -07:00
cloud-hetzner/tasks Fix hetzner module (#14698) 2024-03-14 09:25:09 +01:00
cloud-lightsail Optimize GitHub Actions workflows for security and performance (#14769) 2025-08-02 23:31:54 -04:00
cloud-linode Ansible upgrade 6.1 (#14500) 2022-07-30 15:01:24 +03:00
cloud-openstack/tasks feat: Add comprehensive performance optimizations to reduce deployment time by 30-60% 2025-08-03 16:42:17 -07:00
cloud-scaleway Ansible upgrade 6.1 (#14500) 2022-07-30 15:01:24 +03:00
cloud-vultr/tasks feat: add support for vultr api v2 (#14773) 2025-08-03 14:56:40 -06:00
common Fix IPv6 address selection on BSD systems (#14786) 2025-08-03 17:15:27 -07:00
dns feat: Add comprehensive performance optimizations to reduce deployment time by 30-60% 2025-08-03 16:42:17 -07:00
local/tasks fix: Fix shellcheck POSIX sh issue and make ansible-lint stricter (#14789) 2025-08-03 07:04:04 -04:00
ssh_tunneling Fix DigitalOcean cloud-init compatibility and deprecation warnings (#14801) 2025-08-03 14:25:47 -04:00
strongswan feat: Add comprehensive performance optimizations to reduce deployment time by 30-60% 2025-08-03 16:42:17 -07:00
wireguard Fix IPv6 address selection on BSD systems (#14786) 2025-08-03 17:15:27 -07:00