Chef recipe resource how to 运行 recipe/resource only after completed oracle setup.exe is 运行 completely
Chef recipe resource how to run recipe/resource only after completing oracle setup.exe is run completely
我正在编写一个 Chef 食谱来安装 Oracle EE 软件(通过 运行ning setup.exe 在静默模式下使用 Chef 资源 'execute',如下所示。
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-")
软件安装成功后我需要执行resources / recipe这将'create a db instance'然后'create the database'。
目前运行执行命令后执行资源存在,并直接移动到运行列表中的下一个资源/配方。
但我需要确保在执行此操作之前已完成设置。谁能建议一种方法来做到这一点?
这意味着该命令实际上并未等待完成。 Chef 会等待提供的可执行文件完成(事实上它必须这样做,没有不这样做的选项)。仔细检查安装程序的 CLI 选项?
我正在编写一个 Chef 食谱来安装 Oracle EE 软件(通过 运行ning setup.exe 在静默模式下使用 Chef 资源 'execute',如下所示。
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-")
软件安装成功后我需要执行resources / recipe这将'create a db instance'然后'create the database'。
目前运行执行命令后执行资源存在,并直接移动到运行列表中的下一个资源/配方。
但我需要确保在执行此操作之前已完成设置。谁能建议一种方法来做到这一点?
这意味着该命令实际上并未等待完成。 Chef 会等待提供的可执行文件完成(事实上它必须这样做,没有不这样做的选项)。仔细检查安装程序的 CLI 选项?