# Execute the ipaddr filter after installation

**URL:** <https://forum.ansible.com/t/execute-the-ipaddr-filter-after-installation/30328>\
**Category:** Ansible Project\
**Created:** [May 14, 2019, 2:38pm UTC](https://forum.ansible.com/t/execute-the-ipaddr-filter-after-installation/30328 "2019-05-14T14:38:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evgeniy\_Ivanov](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@Evgeniy\_Ivanov](https://forum.ansible.com/u/Evgeniy_Ivanov)\
**Post date:** [May 14, 2019, 2:38pm UTC](https://forum.ansible.com/t/execute-the-ipaddr-filter-after-installation/30328/1 "2019-05-14T14:38:50Z")

</div>

Hi there,

I’ve got a problem with the ipaddr filter. It doesn’t seem to be loaded after installed in the same playbook:

example:

`

- pip: name=netaddr state=latest

- debug: msg=“{{ ‘192.0.2.0’ | ipaddr }}”

`

gives an error:

> > TASK [debug] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
> 
> > fatal: [localhost]: FAILED! =\> {“msg”: “The ipaddr filter requires python-netaddr be installed on the ansible controller”}

It seems that netaddr should be in the system before evoking ansible.

Is there any workaround to load the filter in the same playbook?

Thanks!

---

<div class="post-metadata">

**Author:** ![David\_Rojas](https://avatars.discourse-cdn.com/v4/letter/d/85e7bf/32.png) [@David\_Rojas](https://forum.ansible.com/u/David_Rojas)\
**Post date:** [May 15, 2019, 3:53am UTC](https://forum.ansible.com/t/execute-the-ipaddr-filter-after-installation/30328/2 "2019-05-15T03:53:19Z")

</div>

You are installing it on the target device but it needs to be installed on the absolve engine node basically where you are running your playbook from. Just do a pip install for that module once then rerun your playbook but take out that pip install not needed on your target

---

<div class="post-metadata">

**Author:** ![Evgeniy\_Ivanov](https://avatars.discourse-cdn.com/v4/letter/e/3d9bf3/32.png) [@Evgeniy\_Ivanov](https://forum.ansible.com/u/Evgeniy_Ivanov)\
**Post date:** [May 15, 2019, 4:50am UTC](https://forum.ansible.com/t/execute-the-ipaddr-filter-after-installation/30328/3 "2019-05-15T04:50:44Z")

</div>

No, this is not the case, I’m running the playbook on localhost and deploying to localhost. The problem is that python is not reloading the cache for each task.

---

<div class="post-metadata">

**Author:** ![Jonathan\_Lozada\_De\_L](https://avatars.discourse-cdn.com/v4/letter/j/eb8c5e/32.png) [@Jonathan\_Lozada\_De\_L](https://forum.ansible.com/u/Jonathan_Lozada_De_L)\
**Post date:** [May 15, 2019, 10:46am UTC](https://forum.ansible.com/t/execute-the-ipaddr-filter-after-installation/30328/4 "2019-05-15T10:46:48Z")

</div>

are you using a virtualenv?
