Reputation: 43
I am writing a chef recipe to install Oracle EE software (by running setup.exe in silent mode) using chef resource 'execute' as below.
str_command = "<dir>/setup.exe -silent -nowait -noconfig -waitforcompletion ORACLE_HOME=... ORACLE_BASE=... " # other parameters for silent installation
Chef::Log.info("-before-")
execute 'install_oracle_ee' do
command str_command
live_stream true
timeout "#{node['mycookbk']['timeout']['num']}"
not_if {File.exists?("#{node['mycookbk']['oracle']['oracle_home']}/bin")}
end
Chef::Log.info("-after-")
After the software is installed successfully I need to execute resources / recipe which will 'create a db instance' and then 'create the database'.
At the moment the execute resource exists after running the command and directly moves to the next resource / recipe in the run list.
But I need to make sure the set up is completed before doing that. Can anyone please suggest a way to do this?
Upvotes: 1
Views: 330
Reputation: 54181
That means the command is not actually waiting for completion. Chef does wait for the provided executable to finish (in fact it has to, there is no option to not do that). Double check your CLI options for the installer?
Upvotes: 0