The pexpect python module is required for Ansible 2.0

Hi There,

I am using ‘expect’ module in my ymal.
Before using this, I install ‘pip install pexpect’.
And, ran the ansible-playbook command and got this error.

FAILED! => {“changed”: false, “failed”: true, “invocation”: {“module_args”: {“chdir”: null, “command”: “keytool -import”, “creates”: null, “echo”: false, “removes”: null, “responses”: {“Question”: [true]}, “timeout”: 30}, “module_name”: “expect”}, “msg”: “The pexpect python module is required”}

Can you please help?

Thanks

Debabrat

This is not Ansible itself, but the expect module.

Many plugins require extra things to work, in this case it is visible in the ‘Requriements’ section of the module’s docs:

http://docs.ansible.com/ansible/expect_module.html#requirements-on-host-that-executes-module