I have used a bash resource with if… else loop
If “if” loop is getting executed, I want recipe to continue as written (next step is include_recipe )
which is happening now.
But if it goes to “else” loop I don’t want to execute next step of include_recipe. Want to skip that step and move to the next resource execution
how can I achieve that?
bash ‘Host registration with server’ do
# Login to server
<<<< steps to login to to server and check IP address >>
if [ $? != 0 ] then <<< check if host IP is not present then do registration>> else
no action … need to skip next step of include_recipe 'gde_client"
fi # Logout from server ./vmssc logout server
Invoke addGPtoHost recipe if guard point exists
if node[‘guardPointsList’].strip != ""
( This recipe need to be executed only for “if” loop in bash resource or else skip and move to next part of execution)
How can I achieve that?