From 256e787967f4352635dc12eb1e3c9b97d8b71d52 Mon Sep 17 00:00:00 2001 From: Ruchi Pakhle <72685035+Ruchip16@users.noreply.github.com> Date: Tue, 7 Jan 2025 16:17:53 +0530 Subject: [PATCH] Added netaddr as a requirement in ansible.utils.ipaddr (#385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Added requirement on netaddr * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Added changelog * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * minor changes * Added requirement on netaddr to ansible.utils.ipaddr * changes * minor change * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: BenoƮt Geeraerts <10222438+b-enoit-be@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- changelogs/fragments/ipaddr.yaml | 3 +++ docs/ansible.utils.ipaddr_filter.rst | 6 ++++++ plugins/filter/ipaddr.py | 2 ++ 3 files changed, 11 insertions(+) create mode 100644 changelogs/fragments/ipaddr.yaml diff --git a/changelogs/fragments/ipaddr.yaml b/changelogs/fragments/ipaddr.yaml new file mode 100644 index 00000000..26923f3f --- /dev/null +++ b/changelogs/fragments/ipaddr.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - Adds netaddr as requirements in ansible.utils.ipaddr. diff --git a/docs/ansible.utils.ipaddr_filter.rst b/docs/ansible.utils.ipaddr_filter.rst index 169caf6f..4c1f07f6 100644 --- a/docs/ansible.utils.ipaddr_filter.rst +++ b/docs/ansible.utils.ipaddr_filter.rst @@ -23,6 +23,12 @@ Synopsis +Requirements +------------ +The below requirements are needed on the local Ansible controller node that executes this filter. + +- netaddr>=0.10.1 + Parameters ---------- diff --git a/plugins/filter/ipaddr.py b/plugins/filter/ipaddr.py index 29dc1891..a61c087c 100644 --- a/plugins/filter/ipaddr.py +++ b/plugins/filter/ipaddr.py @@ -76,6 +76,8 @@ class mac_linux(netaddr.mac_unix): type: str description: type of filter. example ipaddr, ipv4, ipv6, ipwrap notes: + requirements: + - netaddr>=0.10.1 """ EXAMPLES = r"""