Maybe wait_for rather than if? Also, going to need to control timeout for the wait to avoid deadlocks.
wait_if "virsh domstate #{ name } | grep -q running"but with new attribute it could beExample:Using second execute resource is not short.Some processes as virsh start is async.It's wait or while.Hi,What do you think about another attribute for the execute resource?
execute "virsh shutdown #{ name }" do
only_if "virsh domstate #{ name } | grep -c running"
end
execute "while virsh domstate #{ name } | grep -q running ; do : ; done"
execute "virsh shutdown #{ name }" do
only_if "virsh domstate #{ name } | grep -c running"end
--
Daneel S. Yaitskov
Archive powered by MHonArc 2.6.16.