$ ansible --versionansible 2.4.0.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/scscm_builder/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/local/lib/python2.7/site-packages/ansible-2.4.0.0-py2.7.egg/ansible executable location = /usr/local/bin/ansible python version = 2.7.14 (default, Nov 10 2017, 18:14:45) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "msg": "Insufficient version of pexpect installed (2.3), this module requires pexpect>=3.3. Error was 'module' object has no attribute 'runu'"}$ pip2.7 install --upgrade pexpectRequirement already up-to-date: pexpect in /usr/local/lib/python2.7/site-packages (4.5.0)Requirement not upgraded as not directly required: ptyprocess>=0.5 in /usr/local/lib/python2.7/site-packages (from pexpect) (0.5.2)
$ ansible-playbook -i "localhost," test-expect.ymlansible_python_interpreter: python2.7