Except Module in Ansible

76 views
Skip to first unread message

Deepak Sharma

unread,
Feb 27, 2019, 6:17:13 AM2/27/19
to Ansible Project
Hi All,

I am using except module to install one TIBCO products ,

- name: Start Streambase installation
  expect:
    echo: yes
    chdir: /opt/tibco//{{ env }}/install
    command: ./TIB_sb-cep_{{ tib_streambase_version }}_linux_x86_64.archive-bin
    responses:
      (.*)Extract files to which directory (.*): /opt/tibco/{{ env }}/streambase/sb-cep/10.3
      (.*)Do you accept this license (.*): "yes"


But we are getting below error .

(1, '\r\n{"msg": "The pexpect python module is required", "failed": true, "exception": "WARNING: The below traceback may *not* be related to the actual failure.\\n File \\"/tmp/ansible_expect_payload_vjbqxk/__main__.py\\", line 98, in <module>\\n import pexpect\\n", "invocation": {"module_args": {"chdir": "/opt/tibco//SIT/install", "responses": {"(.*)Do you accept this license (.*)": "yes", "(.*)Extract files to which directory (.*)": "/opt/tibco/SIT/streambase/sb-cep/10.3"}, "removes": null, "echo": true, "creates": null, "command": "./TIB_sb-cep_10.3.0_linux_x86_64.archive-bin", "timeout": 30}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.7, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /opt/jenkins/.ssh/config\r\ndebug1: /opt/jenkins/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 8282\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 1

we have also added pexpect python module, but issue still the same .

Kindly guide us and your help is appreciate .

Regards,
Deepak

Deepak Sharma

unread,
Feb 27, 2019, 8:43:58 AM2/27/19
to Ansible Project


I am using  expect   module to install one TIBCO products ,

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/74360946-3b87-4ce2-b769-65218514d946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hugo Gonzalez

unread,
Feb 27, 2019, 9:36:47 AM2/27/19
to ansible...@googlegroups.com

Hello Deepak,

On 2/27/19 7:43 AM, Deepak Sharma wrote:


I am using  expect   module to install one TIBCO products ,

- name: Start Streambase installation
  expect:
    echo: yes
    chdir: /opt/tibco//{{ env }}/install
    command: ./TIB_sb-cep_{{ tib_streambase_version }}_linux_x86_64.archive-bin
    responses:
      (.*)Extract files to which directory (.*): /opt/tibco/{{ env }}/streambase/sb-cep/10.3
      (.*)Do you accept this license (.*): "yes"


But we are getting below error .

(1, '\r\n{"msg": "The pexpect python module is required", "failed": true, "exception": "WARNING: The below traceback may *not* be related to the actual failure.\\n File \\"/tmp/ansible_expect_payload_vjbqxk/__main__.py\\", line 98, in <module>\\n import pexpect\\n", "invocation": {"module_args": {"chdir": "/opt/tibco//SIT/install", "responses": {"(.*)Do you accept this license (.*)": "yes", "(.*)Extract files to which directory (.*)": "/opt/tibco/SIT/streambase/sb-cep/10.3"}, "removes": null, "echo": true, "creates": null, "command": "./TIB_sb-cep_10.3.0_linux_x86_64.archive-bin", "timeout": 30}}}\r\n', 'OpenSSH_7.2p2 Ubuntu-4ubuntu2.7, OpenSSL 1.0.2g 1 Mar 2016\r\ndebug1: Reading configuration data /opt/jenkins/.ssh/config\r\ndebug1: /opt/jenkins/.ssh/config line 1: Applying options for *\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: 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 = 8282\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 1
we have also added pexpect python module, but issue still the same .

Did you install the module using pip on the *managed node*? Also, a pretty new version is required, if you installed with the managed node's package manager, the version may be too old.

Hugo G.

Kindly guide us and your help is appreciate .
Regards,
Deepak
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/74360946-3b87-4ce2-b769-65218514d946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

Hugo F. gonzalez

Senior Consultant

Red Hat LATAM

Deepak Sharma

unread,
Feb 28, 2019, 4:40:29 AM2/28/19
to Ansible Project
Hi Hugo,

We are using conda forge, and pexpect is already installed , but no clue when it will finish .

conda-forge::pexpect-4.6.0-py27_1000

Regards,
Deepak

Deepak Sharma

unread,
Feb 28, 2019, 4:55:14 AM2/28/19
to Ansible Project
Please ignore previous mail

Hi Hugo,

We are using conda forge, and pexpect is already installed , we are using Jenkins pipeline to configure by using below environment file .

channels:
- conda-forge
- defaults
dependencies:
- python=2.7.15
- ansible=2.7.1

conda-forge::pexpect-4.6.0-py27_1000

Regards,
Deepak

Pshem Kowalczyk

unread,
Mar 3, 2019, 5:40:35 PM3/3/19
to Ansible Project
Hi,

Have you installed the pyexpect on the remote machine against which you're executing the playbook?

kind regards
Pshem


--
Reply all
Reply to author
Forward
0 new messages