Exactly the same is happening over here, trying to use expect, having installed the pexpect package earlier in the role tasks. Here is the -vvvv of ansible, trying to install a gitlab ci runner:
fatal: [xxx.yyy.zzz]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"command": "gitlab-ci-multi-runner register", "responses": {"Please enter the gitlab-ci coordinator URL (e.g.
https://gitlab.com/ci )": "
https://gitlab.com/ci", "Please\\ enter\\ the\\ Docker\\ image\\ \\(eg\\. ruby\\:2\\.1\\)\\:": "ruby:2.1", "Please\\ enter\\ the\\ executor\\:\\ shell\\,\\ docker\\,\\ docker\\-ssh\\,\\ ssh\\?": "docker", "Please\\ enter\\ the\\ gitlab\\-ci\\ description\\ for\\ this\\ runner": "my-runner", "Please\\ enter\\ the\\ gitlab\\-ci\\ token\\ for\\ this\\ runner": "xxxxxxxxxxxxxxxxxxxxxx"}}, "module_name": "expect"}, "msg": "Traceback (most recent call last):\r\n File \"/home/mkappa/.ansible/tmp/ansible-tmp-1449154083.59-269753732902654/expect\", line 2084, in <module>\r\n main()\r\n File \"/home/mkappa/.ansible/tmp/ansible-tmp-1449154083.59-269753732902654/expect\", line 154, in main\r\n out, rc = pexpect.runu(args, timeout=timeout, withexitstatus=True,\r\nAttributeError: 'module' object has no attribute 'runu'\r\nOpenSSH_6.6.1, OpenSSL 1.0.1e-fips 11 Feb 2013\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 56: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 3439\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to
cremaster2.aavv.io closed.\r\n", "parsed": false}
Any ideas?