0
votes

I am creating a ruby chef script (cookbooks recipe) to install Postgresql on my provisioned virtual machine on windows. I have the following scripts:

postgresql_location = "#{Chef::Config['file_cache_path']}/#{node['postgresql']['filename']}"

windows_package 'POSTGRESQL' do
    action :install
    source postgresql_location
    installer_type :custom
end

If I have an installer in .msi format, the installation will work fine. However, if the installer is in .exe format, an exception is thrown.

Is there any missing script or statement that I need to add for it to work? Is there any libraries or built in recipes that I need to be included in my recipe?

Appreciate any help.

Thanks,

1
Downvoted as 1) You don't tell wich version of chef you're using. 2) you're not saying if you're including the windows cookbook in your runlist 3) You don't even show wich exception you got (are you're hoping someone with divinatinon skills can guess it and give you THE answer ?). 4) I highly suspect your answer is here or in reading this - Tensibai

1 Answers

0
votes

You can use Batch resource -

batch "Install Setup.exe " do
      code "c:/temp/yourexe.exe"
      action :run      
end