diff --git a/README.md b/README.md index f76b280..57d5e8f 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,8 @@ The Ansible ``ansible.utils`` collection includes a variety of plugins that aid This collection has been tested against following Ansible versions: **>=2.9.10**. +For collections that support Ansible 2.9, please ensure you update your `network_os` to use the +fully qualified collection name (for example, `cisco.ios.ios`). Plugins and modules within a collection may be tested with only specific Ansible versions. A collection may contain metadata that identifies these versions. PEP440 is the schema used to describe the versions of Ansible. @@ -26,28 +28,25 @@ Name | Description [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.hwaddr](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.hwaddr_filter.rst)|HWaddr / MAC address filters [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.keep_keys](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.keep_keys_filter.rst)|Keep specific keys from a data recursively. -[ansible.utils.nthhost](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.nthhost_filter.rst)|This filter returns the nth host within a network described by value. -[ansible.utils.ipv4](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipv4_filter.rst)|To filter only Ipv4 addresses Ipv4 filter is used. -[ansible.utils.param_list_compare](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.param_list_compare_filter.rst)|Generate the final param list combining/comparing base and provided parameters. -[ansible.utils.remove_keys](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.remove_keys_filter.rst)|Remove specific keys from a data recursively. -[ansible.utils.replace_keys](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.replace_keys_filter.rst)|Replaces specific keys with their after value from a data recursively. -[ansible.utils.macaddr](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.macaddr_filter.rst)|macaddr / MAC address filters -[ansible.utils.slaac](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.slaac_filter.rst)|This filter returns the SLAAC address within a network for a given HW/MAC address. -[ansible.utils.ipaddr](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipaddr_filter.rst)|This filter is designed to return the input value if a query is True, else False. -[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. -[ansible.utils.ipsubnet](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipsubnet_filter.rst)|This filter can be used to manipulate network subnets in several ways. -[ansible.utils.ipv6](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipv6_filter.rst)|To filter only Ipv6 addresses Ipv6 filter is used. [ansible.utils.ip4_hex](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ip4_hex_filter.rst)|This filter is designed to convert IPv4 address to Hexadecimal notation with optional delimiter. +[ansible.utils.ipaddr](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipaddr_filter.rst)|This filter is designed to return the input value if a query is True, else False. [ansible.utils.ipmath](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipmath_filter.rst)|This filter is designed to do simple IP math/arithmetic. -[ansible.utils.nthhost](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.nthhost_filter.rst)|This filter returns the nth host within a network described by value. +[ansible.utils.ipsubnet](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipsubnet_filter.rst)|This filter can be used to manipulate network subnets in several ways. [ansible.utils.ipv4](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipv4_filter.rst)|To filter only Ipv4 addresses Ipv4 filter is used. +[ansible.utils.ipv6](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.ipv6_filter.rst)|To filter only Ipv6 addresses Ipv6 filter is used. +[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.keep_keys](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.keep_keys_filter.rst)|Keep specific keys from a data recursively. +[ansible.utils.macaddr](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.macaddr_filter.rst)|macaddr / MAC address filters +[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.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.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. +[ansible.utils.nthhost](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.nthhost_filter.rst)|This filter returns the nth host within a network described by value. [ansible.utils.param_list_compare](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.param_list_compare_filter.rst)|Generate the final param list combining/comparing base and provided parameters. [ansible.utils.previous_nth_usable](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.previous_nth_usable_filter.rst)|This filter returns the previous nth usable ip within a network described by value. [ansible.utils.reduce_on_network](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.reduce_on_network_filter.rst)|This filter reduces a list of addresses to only the addresses that match a given network. +[ansible.utils.remove_keys](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.remove_keys_filter.rst)|Remove specific keys from a data recursively. +[ansible.utils.replace_keys](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.replace_keys_filter.rst)|Replaces specific keys with their after value from a data recursively. +[ansible.utils.slaac](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.slaac_filter.rst)|This filter returns the SLAAC address within a network for a given HW/MAC address. [ansible.utils.to_paths](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.to_paths_filter.rst)|Flatten a complex object into a dictionary of paths and values [ansible.utils.to_xml](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.to_xml_filter.rst)|Convert given JSON string to XML [ansible.utils.usable_range](https://github.com/ansible-collections/ansible.utils/blob/main/docs/ansible.utils.usable_range_filter.rst)|Expand the usable IP addresses diff --git a/changelogs/fragments/docfix_minor_corrections.yaml b/changelogs/fragments/docfix_minor_corrections.yaml new file mode 100644 index 0000000..2282e6b --- /dev/null +++ b/changelogs/fragments/docfix_minor_corrections.yaml @@ -0,0 +1,3 @@ +--- +doc_changes: + - "Enhancement in documentation and docstring." diff --git a/docs/ansible.utils.cidr_merge_filter.rst b/docs/ansible.utils.cidr_merge_filter.rst index ebb001d..c13daa7 100644 --- a/docs/ansible.utils.cidr_merge_filter.rst +++ b/docs/ansible.utils.cidr_merge_filter.rst @@ -85,7 +85,7 @@ Examples #### examples - name: cidr_merge with merge action - ansible.builtin.set_fact: + ansible.builtin.set_fact: value: - 192.168.0.0/17 - 192.168.128.0/17 @@ -93,7 +93,7 @@ Examples - debug: msg: "{{ value|ansible.utils.cidr_merge }}" - # TASK [cidr_merge with merge action] ****************************************************************************************************************************** + # TASK [cidr_merge with merge action] ********************************************************************************** # ok: [localhost] => { # "ansible_facts": { # "value": [ @@ -104,7 +104,7 @@ Examples # }, # "changed": false # } - # TASK [debug] ***************************************************************************************************************************************************** + # TASK [debug] ********************************************************************************************************* # ok: [loalhost] => { # "msg": [ # "192.168.0.0/16" @@ -112,7 +112,7 @@ Examples # } - name: Cidr_merge with span. - ansible.builtin.set_fact: + ansible.builtin.set_fact: value: - 192.168.1.1 - 192.168.1.2 diff --git a/docs/ansible.utils.keep_keys_filter.rst b/docs/ansible.utils.keep_keys_filter.rst index 78071cf..c281088 100644 --- a/docs/ansible.utils.keep_keys_filter.rst +++ b/docs/ansible.utils.keep_keys_filter.rst @@ -277,8 +277,8 @@ Examples ansible.builtin.set_fact: data: "{{ interfaces }}" - - debug: - msg: "{{ data|ansible.utils.keep_keys(target=['desc', 'name'], matching_parameter= 'starts_with') }}" + - debug: + msg: "{{ data|ansible.utils.keep_keys(target=['desc', 'name'], matching_parameter= 'starts_with') }}" ##Output # TASK [keep selective keys from python dict/list of dict] ************************** diff --git a/docs/ansible.utils.update_fact_module.rst b/docs/ansible.utils.update_fact_module.rst index 675cbc4..27676ab 100644 --- a/docs/ansible.utils.update_fact_module.rst +++ b/docs/ansible.utils.update_fact_module.rst @@ -101,7 +101,7 @@ Examples .. code-block:: yaml - # Update an exisitng fact, dot or bracket notation + # Update an existing fact, dot or bracket notation - name: Set a fact ansible.builtin.set_fact: a: diff --git a/docs/ansible.utils.validate_filter.rst b/docs/ansible.utils.validate_filter.rst index 91b5b16..7e1a840 100644 --- a/docs/ansible.utils.validate_filter.rst +++ b/docs/ansible.utils.validate_filter.rst @@ -90,7 +90,7 @@ Parameters
config_data|ansible.utils.validate(config_criteria, engine='ansible.utils.jsonschema'
), in this case the value ansible.utils.jsonschema
represents the engine to be use for data validation. If the value is not provided the default value that is ansible.uitls.jsonschema
will be used.config_data|ansible.utils.validate(config_criteria, engine='ansible.utils.jsonschema'
), in this case the value ansible.utils.jsonschema
represents the engine to be use for data validation. If the value is not provided the default value that is ansible.utils.jsonschema
will be used.<org-name>.<collection-name>.<validator-plugin-name>
.lookup(config_data, config_criteria, engine='ansible.utils.jsonschema'
), in this case the value ansible.utils.jsonschema
represents the engine to be use for data validation. If the value is not provided the default value that is ansible.uitls.jsonschema
will be used.lookup(config_data, config_criteria, engine='ansible.utils.jsonschema'
), in this case the value ansible.utils.jsonschema
represents the engine to be use for data validation. If the value is not provided the default value that is ansible.utils.jsonschema
will be used.<org-name>.<collection-name>.<validate-plugin-name>
.