I don't know why my expect command below is not working. I used the regex format tester before doing this.
- name: Install Rhapsody
become: no
expect:
command: /tmp/rhapsody-6_2_0-linux-x64.sh
echo: yes
responses:
(^)(?i)OK(.*): "o"
(^)(?i)Where should Rhapsody be installed(.*): "/rhapsody/rhapsody62/"
(^)(?i)Where should the data directory be located(.*): "/rhapsody/rhapsody62/rhapsody/data"
(^)(?i)What memory setting should be used(.*): "2048"
(^)(?i)What port settings should be used(.*): "3042"
(^)(?i)Secure Web Management Console Port(.*): "8445"
(^)(?i)Secure Management Webservice Port(.*): "8450"
I get the following error
*
fatal: [172.16.120.199]: FAILED! => {"changed": true, "cmd": "/tmp/rhapsody-6_2_0-linux-x64.sh", "delta": "0:00:30.341323", "end": "2016-01-15 11:25:38.460602", "failed": true, "rc": 1, "start": "2016-01-15 11:25:08.119279", "stdout": "Unpacking JRE ...\r\nPreparing JRE ...\r\nStarting Installer ...\r\nThis will install Rhapsody 6.2.0 on your computer.\r\nOK [o, Enter], Cancel [c]", "stdout_lines": ["Unpacking JRE ...", "Preparing JRE ...", "Starting Installer ...", "This will install Rhapsody 6.2.0 on your computer.", "OK [o, Enter], Cancel [c]"]}
When I run the command manually the first thing that comes up is
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
This will install Rhapsody 6.2.0 on your computer.
OK [o, Enter], Cancel [c]