I put in my script for every response question (.*) and now the script just sits there. What would be the correct python regex for capturing everything including new line? At this point I am just trying to grab anything to see if there issue is the response questions.
On Friday, January 15, 2016 at 1:49:43 PM UTC-5, Mark Constant wrote: > > No it doesn't install. I am having a hard time figuring out what return > code 1 means or how to get a return code when I do a manual install. This > .sh file is a packaged installer from a vendor we use that I am trying to > automate, so I don't have much insight into return codes. > > On Friday, January 15, 2016 at 11:48:06 AM UTC-5, Matt Martz wrote: >> >> Does it actually install when using the expect module? It seems as >> though the failure is because you are getting a return code of 1. If it >> does install, it might indicate that an rc of 1 is not a failure. >> >> What is the return code after you run it manually/interactively? >> >> On Fri, Jan 15, 2016 at 10:36 AM, Mark Constant <[email protected]> >> wrote: >> >>> 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] >>> >>> >>> >>> -- >>> 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 [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/ansible-project/5550514f-0ee0-49e1-b230-f0745fd71ca6%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/ansible-project/5550514f-0ee0-49e1-b230-f0745fd71ca6%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Matt Martz >> @sivel >> sivel.net >> > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/84694a3d-6fb7-4a27-9f4d-3b3cdfa27b5c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
