I have a resource that looks as below:
execute 'run_command' do
command "chown -R user:user * "
not_if Dir["/home/user/dir1/*"].empty?
end
I want to make sure that the resource is not executed if /home/user/dir1 is empty
I have a resource that looks as below:
execute 'run_command' do
command "chown -R user:user * "
not_if Dir["/home/user/dir1/*"].empty?
end
I want to make sure that the resource is not executed if /home/user/dir1 is empty