Re: [ansible-project] Trying Oracle database download to windows server 2012

266 views
Skip to first unread message

Isha G

unread,
Sep 16, 2018, 11:00:09 AM9/16/18
to ansible...@googlegroups.com
Hello Jonathan,
Thanks for the quick response. I am actually trying two things here:
1. Download Oracle 12c DB on a Windows Server 2012 and I have tried it with firewall on and off but still I get the broken File.
2. For now I have manually copied these files and with setup.exe and silent installation command I am trying this as per the setup.exe -silent switch as per provided by the oracle website but it failing with error code 259.

Here are my tasks:

--

- hosts: oracle
  tasks:
  - name: Ensure the file is copied on windows
    win_get_url:
      dest: C:\Users\Administrator\Documents\winx64_12201_grid_home123.zip
      force: yes
      validate_certs: no
      force_basic_auth: yes
      url_username: abc...@yahoo.com
      url_password: Abcxyz@098

  - name: install oracle 12c database
    win_package:
      path: C:\Users\Administrator\Documents\database\setup.exe
      arguments: "-silent 'variable=setting' -noconfig -nowait -responseFile dbca.rsp"
      product_id: "12.1.0.1"
      state: present

And here are the logs that I get :


task path: /mcc/oracle_install.yml:15
Using module file /usr/lib/python3.6/site-packages/ansible/modules/windows/win_package.ps1
<10.207.81.239> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO x.x.x.x
checking if winrm_host x.x.x.x is an IPv6 address
<10.207.81.239> WINRM CONNECT: transport=ssl endpoint=https:// x.x.x.x.x.x  :5986/wsman
<10.207.81.239> WINRM OPEN SHELL: x.x.x.x.x.x
EXEC (via pipeline wrapper)
<10.207.81.239> WINRM EXEC 'PowerShell' ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Unrestricted', '-']
<10.207.81.239> WINRM RESULT '<Response code 0, out "{"stdout":"\\r\\n Exit", err "">'
<10.207.81.239> WINRM CLOSE SHELL: x.x.x.x.x.x
fatal: [10.207.81.239]: FAILED! => {
    "changed": false,
    "exit_code": 259,
    "msg": "unexpected rc from install  C:\\Users\\Administrator\\Documents\\database\\setup.exe: see rc, stdout and stderr for more details",
    "rc": 259,
    "reboot_required": false,
    "restart_required": false,
    "stderr": "",
    "stderr_lines": [],
    "stdout": "\r\n Exit code of OUI process 259=",
    "stdout_lines": [
        "",
        " Exit code of OUI process 259="
    ]


Please help me with this. I am pretty new to ansible. I really like it and need help. I am trying to install this by copy from the url on windows and then running the setup.exe from the remote server.
amazon ec2 or docker instances are not allowed for my tasks. I am required to do this with this process through ansible.

Thanks.
Best Regards,
Isha

On Sun, Sep 16, 2018 at 2:40 PM Isha G <jee....@gmail.com> wrote:
I am trying to download Oracle 12c database installation zip file on windows server 2012 with Thier link. I get the changed message but the zip is just 5kb in size. How do I get the actual file and not this 5kb broken file.

--
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/a83a7bba-6d6b-47af-a9ee-ae85b4e6412a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Yves LENHOF

unread,
Sep 16, 2018, 12:47:55 PM9/16/18
to ansible...@googlegroups.com



Le 16/09/2018 à 16:59, Isha G a écrit :
Hello Jonathan,
Thanks for the quick response. I am actually trying two things here:
1. Download Oracle 12c DB on a Windows Server 2012 and I have tried it with firewall on and off but still I get the broken File.
2. For now I have manually copied these files and with setup.exe and silent installation command I am trying this as per the setup.exe -silent switch as per provided by the oracle website but it failing with error code 259.

Here are my tasks:

--

- hosts: oracle
  tasks:
  - name: Ensure the file is copied on windows
    win_get_url:
      dest: C:\Users\Administrator\Documents\winx64_12201_grid_home123.zip
      force: yes
      validate_certs: no
      force_basic_auth: yes
      url_username: abc...@yahoo.com
      url_password: Abcxyz@098

Hi,

You should download first the zip file somewhere on your network and download from it...
If you insist on downloading from Oracle site each time, be careful that Oracle want you to accept the EULA, so direct download is not allowed, so you need to do tricks with cookie, authentication, etc... and this can change from time to time

For example for Java (not tried) :
https://iavian.com/2016/09/08/oracle-wget-curl-download/

Regards,

JYL

Isha G

unread,
Sep 16, 2018, 10:50:18 PM9/16/18
to ansible...@googlegroups.com
The file size is 3 GB so I will not be able to copy using win_copy or even if I do it's going to take long time as per the bandwidth.
--
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-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c53f3928-417e-5ec3-5c3b-b853bcf29ad4%40lenhof.eu.org.

Jordan Borean

unread,
Sep 17, 2018, 4:37:43 PM9/17/18
to Ansible Project
You can store the download on your own web server and use win_get_url from there. The trouble isn't that Ansible is failing but that Oracle is hiding the actual download behind a license agreement. I've had success with adding the cookie value to the win_get_url header so Oracle presents you the actual installer rather than just a web page.

Thanks

Jordan

Isha G

unread,
Sep 18, 2018, 2:25:48 AM9/18/18
to ansible...@googlegroups.com, jbor...@gmail.com
Can you please paste the task that you used?

--
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/fbb54773-f7ad-43ef-8a78-b28f8e8b1bc6%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages