We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ipaddr('prefix') returns [prefix] instead of just prefix like ansible.netcommon.ipaddr did before the migration.
[prefix]
prefix
ipaddr('prefix')
ansible [core 2.12.3] python version = 3.9.10 (main, Jan 15 2022, 11:40:53) [Clang 13.0.0 (clang-1300.0.29.3)] jinja version = 3.0.3 libyaml = True
# /Users/.../ansible/.venv-ansible/lib/python3.9/site-packages/ansible_collections Collection Version ------------- ------- ansible.utils 2.5.0 # /Users/.../.ansible/collections/ansible_collections Collection Version ------------- ------- ansible.utils 2.5.1
DEFAULT_STDOUT_CALLBACK(/Users/.../ansible/ansible.cfg) = yaml
- set_fact: ansible_default_ipv4: address: "10.10.184.252" netmask: "255.255.240.0" - debug: msg: "{{ (ansible_default_ipv4.address + '/' + ansible_default_ipv4.netmask) | ansible.netcommon.ipaddr('prefix') }}"
Result of debug: 20
20
Result of debug: [20]
[20]
The text was updated successfully, but these errors were encountered:
@SRv6d This has been fixed in version 2.5.2 released a few hours ago, issue and Merge Requests can be found here
I had issues similar to this with the "address" filter returning a list as opposed to a string and can confirm that 2.5.2 fixed both issues.
Do note that this has been moved from ansible.netcommon to ansible.utils so your filter reference may need to be updated.
Sorry, something went wrong.
Thanks, the latest release does fix it. Closing the issue.
No branches or pull requests
SUMMARY
ipaddr('prefix') returns
[prefix]
instead of justprefix
like ansible.netcommon.ipaddr did before the migration.ISSUE TYPE
COMPONENT NAME
ipaddr('prefix')
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
Result of debug:
20
ACTUAL RESULTS
Result of debug:
[20]
The text was updated successfully, but these errors were encountered: