No. I am not using execute resource. I am using bash resource in which I have if… else loop
after completing bash resource, I am running include_recipe
Now I want to run include_recipe <receipe 2> only if “if” part in bash resource is true and not for else loop
How can I do that?
snippet is herewith
bash ‘Host registration with server’ do
# Login to server
<<<< steps to login to to server and check IP address >>
if [ $? != 0 ]
<<< check if host IP is not present, then do registration>>
no action as IP is already present
# Logout from server
./vmssc logout server
Invoke addGPtoHost recipe if guard point exists
if node[‘guardPointsList’].strip != ""