Ansible win_package product_id value not available while installing ruby

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

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.

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