Hi, I am creating a WCS instance for which I have to run the create instance command using wcs user (webadmin), and could not connect to the DB because it could not get the required env variables.
, so I put the sample code to check
I am using the code below
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
For whoami, I get a user
Webadmin
But for env, I get the user env "root" without using the SQL .bash_profile file for env variables. Any ideas
chef chef-recipe
Saurav
source share