We need pexpect to support the "expect" Ansible module. In particular, Ansible's "expect" module requires python-pexpect 3.3, which is too new for RHEL 7 or Ubuntu Trusty. We'll cheat and grab newer versions, mirrored here.
For Ubuntu:
python-pexpect_4.0.1-1_all.deb
and python-ptyprocess_0.5-1_all.deb
Ubuntu Trusty has 3.1-1ubuntu0.1. I've mirrored the packages from Xenial, which seem to install on Trusty fine. The original URLs were http://us.archive.ubuntu.com/ubuntu/pool/main/p/ptyprocess/python-ptyprocess_0.5-1_all.deb and http://us.archive.ubuntu.com/ubuntu/pool/main/p/pexpect/python-pexpect_4.0.1-1_all.deb.
For RHEL:
python-ptyprocess-0.5-1.el7.noarch.rpm
: comes from EPEL, original URL https://dl.fedoraproject.org/pub/epel/7/x86_64/p/python-ptyprocess-0.5-1.el7.noarch.rpm.
python2-pexpect-4.0.1-5.el7.rhcs1.noarch.rpm
: this is a custom package that I built from Fedora 24 sources (tweaked to build on RHEL 7).