[FEATURE REQUEST] Jinja filter for wrapping IPv6 addresses in brackets ([ ]) #61931
Labels
Feature
new functionality including changes to functionality and code refactors, etc.
Milestone
Is your feature request related to a problem? Please describe.
A great deal of software that IPv6 addresses for configuration files, especially when a port or url is specified, to be wrapped in brackets ([ ]). There's currently no clean or easy way to do this (that I'm aware of )
Describe the solution you'd like
A jinja filter like Ansibles ipwrap() ( https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters_ipaddr.html#wrapping-ipv6-addresses-in-brackets )
Describe alternatives you've considered
Using something like the following:
But this will wrap IPv6 addresses with CIDR masks incorrectly. ie
2001:db8::1/64
becomes[2001:db8::1/64]
instead of[2001:db8::1]/64
.The text was updated successfully, but these errors were encountered: