Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow-up to #372 or ansible.utils.ipaddr('net') should return /32 CIDRs as-is instead of empty string #386

Open
lucendio opened this issue Jan 31, 2025 · 0 comments
Assignees

Comments

@lucendio
Copy link

Since I dont have permission to reopen issue #372, I hope, you dont mind taking a shortcut here as the entire description of #372 applies, except the option the author mentions. I'm referring to net (instead of host/prefix).

Putting a /32 CIDR through ipaddr('net') yields an empty string, too. So, it's the same behavior described by @ijajmulani, except the option doesn't match.

Is the described behavior mentioned in #372 also intended for the net option? I'm asking because the documentation seems to suggest otherwise:

# Example list of values
test_list: ['192.24.2.1', 'host.fqdn', '::1', '192.168.32.0/24', 'fe80::100/10', True, '', '42540766412265424405338506004571095040/64']

# {{ test_list | ansible.utils.ipaddr('net') }}
['192.168.32.0/24', '2001:db8:32c:faad::/64']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants