Ansible win_package product_id value not available while installing ruby

597 views
Skip to first unread message

Biswajit Pain

unread,
Dec 8, 2016, 9:55:20 AM12/8/16
to Ansible Project
I am trying to install Ruby 2.2.5  exe package in Win2k12 server using ansible. As there is no registry value in  HKLM\ . 


Task Defination

- name: Install ruby
    win_package:
      name: "Ruby 2.2.5-p319-x64"
      path: '{{ sharedpath }}rubyinstaller-2.2.5-x64.exe'
      product_id: ""
      user_name: "{{ username }}"
      user_password: "{{ password }}"
      state: present
      Arguments: '/silent  /tasks="addtk,assocfiles,modpath"'
    ignore_errors: True

Result

TASK [Install ruby] ************************************************************
fatal: [10.107.45.24]: FAILED! => {"changed": false, "failed": true, "msg": "Package from \\\\builder.dev.appvol.eng.abcd.com\\Artifacts\\toolchain\\build_machine\\rubyinstaller-2.2.5-x64.exe was installed, but the specified ProductId and/or Name does not match package details", "name": "Ruby 2.2.5-p319-x64"}
...ignoring

Is it possible to pass null value in product_id

Trond Hindenes

unread,
Dec 9, 2016, 12:33:56 PM12/9/16
to Ansible Project
If it doesn't write to HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ then you won't be able to use win_package to install it.

J Hawkesworth

unread,
Dec 9, 2016, 1:46:23 PM12/9/16
to Ansible Project
You can probably workaround by using win_command or raw to run msiexec.

Unfortunately there are a few .msi installers around which don't write a product id. Might be worth raising a bug on the rubyinstaller site, as its really a poorly made installer that is causing the problem here.

Jon

Reply all
Reply to author
Forward
0 new messages