diff --git a/README.md b/README.md index 5b9271b..8cce206 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ Name | Description [ansible.utils.from_xml](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.from_xml_filter.rst)|Convert given XML string to native python dictionary. [ansible.utils.get_path](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.get_path_filter.rst)|Retrieve the value in a variable using a path [ansible.utils.index_of](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.index_of_filter.rst)|Find the indices of items in a list matching some criteria +[ansible.utils.ipwrap](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipwrap_filter.rst)|This filter is designed to Wrap IPv6 addresses in [ ] brackets. [ansible.utils.network_in_usable](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.network_in_usable_filter.rst)|The network_in_usable filter returns whether an address passed as an argument is usable in a network. [ansible.utils.network_in_network](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.network_in_network_filter.rst)|This filter returns whether an address or a network passed as argument is in a network. [ansible.utils.next_nth_usable](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.next_nth_usable_filter.rst)|This filter returns the next nth usable ip within a network described by value. diff --git a/changelogs/fragments/add_ipwrap_filter_plugin.yaml b/changelogs/fragments/add_ipwrap_filter_plugin.yaml new file mode 100644 index 0000000..9c0c3ee --- /dev/null +++ b/changelogs/fragments/add_ipwrap_filter_plugin.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - Add ipwrap filter plugin. diff --git a/docs/ansible.utils.ipwrap_filter.rst b/docs/ansible.utils.ipwrap_filter.rst new file mode 100644 index 0000000..8e4771e --- /dev/null +++ b/docs/ansible.utils.ipwrap_filter.rst @@ -0,0 +1,198 @@ +.. _ansible.utils.ipwrap_filter: + + +******************** +ansible.utils.ipwrap +******************** + +**This filter is designed to Wrap IPv6 addresses in [ ] brackets.** + + +Version added: 2.5.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Some configuration files require IPv6 addresses to be "wrapped" in square brackets ([ ]).To accomplish that, +- you can use the ipwrap() filter.It will wrap all IPv6 addresses and leave any other strings intact. + + + + +Parameters +---------- + +.. raw:: html + +
Key | +Returned | +Description | +
---|---|---|
+
+ data
+
+
+ list
+ / elements=string
+
+ |
+ + |
+ Returns list with values valid for a particular query.
+ + |
+