# "This module requires the passlib Python library"}

**URL:** <https://forum.ansible.com/t/this-module-requires-the-passlib-python-library/24097>\
**Category:** Ansible Project\
**Created:** [March 29, 2017, 4:52pm UTC](https://forum.ansible.com/t/this-module-requires-the-passlib-python-library/24097 "2017-03-29T16:52:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Cooper](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Matthew\_Cooper](https://forum.ansible.com/u/Matthew_Cooper)\
**Post date:** [March 29, 2017, 4:52pm UTC](https://forum.ansible.com/t/this-module-requires-the-passlib-python-library/24097/1 "2017-03-29T16:52:28Z")

</div>

I’m hoping someone can help me out.

I have a playbook to install Graylog2 on an EC2 host. The playbook fails on:

‘TASK [graylog : setting nginx pass]’

with the following error:

‘FAILED! =\> {“changed”: false, “failed”: true, “msg”: “This module requires the passlib Python library”}’

Within the .yml file for this particular role I have:

- name: install python-passlib  
yum: name=python-passlib state=present  
tags: graylog2

which is before the setting nginx pass task:

- name: setting nginx pass  
htpasswd: path=/etc/nginx/htpasswd.users name=name password=password owner=root group=root mode=0640  
tags: graylog2

Has anyone else come across this issue previously? Any advice on how to resolve?

Thanks, Matt

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [March 29, 2017, 6:33pm UTC](https://forum.ansible.com/t/this-module-requires-the-passlib-python-library/24097/2 "2017-03-29T18:33:22Z")

</div>

what version of passlib? docs say 1.6 or better. IIRC EPEL6 has 1.5.something.  
EL7 should be ok.

---

<div class="post-metadata">

**Author:** ![Matthew\_Cooper](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@Matthew\_Cooper](https://forum.ansible.com/u/Matthew_Cooper)\
**Post date:** [March 30, 2017, 9:29am UTC](https://forum.ansible.com/t/this-module-requires-the-passlib-python-library/24097/3 "2017-03-30T09:29:32Z")

</div>

Hi Dick,

Thanks for the response. It looks like version 1.5 is installed.

How would I go about installing version 1.6 or 1.7?

Many thanks, Matt

---

<div class="post-metadata">

**Author:** ![Matt3](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@Matt3](https://forum.ansible.com/u/Matt3)\
**Post date:** [March 30, 2017, 3:10pm UTC](https://forum.ansible.com/t/this-module-requires-the-passlib-python-library/24097/4 "2017-03-30T15:10:05Z")

</div>

Just in case anyone else stumbles across this issue.

I had to install passlib with pip.

This is what I replaced the yum task with:

- name: Install passlibb with pip

pip: name=passlib

Thanks for the help Dick.
