こんにちは、WCS インスタンスを作成しています。wcs ユーザー (webadmin) を使用して create instance コマンドを実行する必要があります。必要な環境変数を取得できないため、DB に接続できません。
だから私はチェックするためにいくつかのサンプルコードを入れました
以下のコードを使用しています
bash "wcs-create-instance" do
user "webadmin"
group "webspher"
code <<-EOH
###{node[:websphere][:wcs][:wcs_installLocation]}/bin/config_ant.sh -DinstanceName=#{node[:websphere][:wcs][:wcs_instance]} CreateInstance
whoami > /tmp/whoami
env > /tmp/env
EOH
notifies :run, "bash[fix-permission]", :immediately
#This not_if is just temporary, a proper mechanism has to be implemented here to loop through all the WCS APars,
#For the POC keeping it neat and simple such that this does not rerun on execution
not_if {File.directory?("#{node[:websphere][:wcs][:wcs_installLocation]}/instances/#{node[:websphere][:wcs][:wcs_instance]}/starterstores")}
#action :nothing
end
誰のために私はユーザーを取得しています
ウェブ管理者
しかし、env については、ユーザー「root」の env を取得していますが、env 変数の .bash_profile を取得していません。何か案は