windows command from ansible / returning error

417 views
Skip to first unread message

nadim mansour

unread,
Oct 31, 2018, 7:02:39 AM10/31/18
to Ansible Project
I am trying to install oracle client in silent mode by runing the following task from ansible and its returning an error:

- name: Install Oracle client 12.1.0.2.1 
  win_command: C:\tmp\ODAC121021_x64\setup.exe -silent -responseFile C:\tmp\client.rsp
  ignore_errors: yes

The error is: 

Screen Shot 2018-10-31 at 1.01.32 PM.png






fatal: [uat_cdxdb]: FAILED! => {"changed": true, "cmd": "C:\\tmp\\ODAC121021_x64\\setup.exe -silent -responseFile C:\\tmp\\client.rsp", "delta": "0:00:15.234405", "end": "2018-10-11 07:50:06.842169", "msg": "non-zero return code", "rc": 259, "start": "2018-10-11 07:49:51.607764", "stderr": "", "stderr_lines": [], "stdout": "\r\n Exit code of OUI process 259=", "stdout_lines": ["", " Exit code of OUI process 259="]}



If I run the command directly from windows, directly through power shell its working

Jordan Borean

unread,
Oct 31, 2018, 7:35:47 AM10/31/18
to Ansible Project
You would need to find out what an error code of 259 means in the context of the installer. When you run it locally are you getting the same return code, in powershell this is set to '$LASTEXITCODE', in cmd.exe you can get the last rc with 'echo %ERRORLEVEL%'.

Thanks

Jordan

nadim mansour

unread,
Oct 31, 2018, 8:45:53 AM10/31/18
to ansible...@googlegroups.com
when I run it locally on windows server the command is working and oracle client is installed silently

--
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/e24b20d6-394d-479f-aaeb-f01f24895683%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jordan Borean

unread,
Oct 31, 2018, 8:52:19 AM10/31/18
to Ansible Project
Ok so you need to fix out what error 259 means. Look to see if you can enable any logging to identify the issue, this would all be specific to that installer so start with the company that produces it and read through their docs.

Jordan Borean

unread,
Nov 1, 2018, 6:11:10 AM11/1/18
to Ansible Project
Also as an FYI, normally an rc of 259 means the process is still active [1] which tells me the installer is still running in the background. I do remember seeing an issue with the Oracle installer not working in Ansible and exits straight away and there's a special command line argument or response file value you must set for it to wait until the installer is complete. Have a look at the setup.exe documentation and see what you can find.

This may not be the case with the Oracle installer as the code could mean something else but this scenario does sound familiar.

Reply all
Reply to author
Forward
0 new messages