Trying to capture value from with_lines loop

I’m trying to loop through a list (file) of powervc regions, delegating a command to them, and if that command (find a vm) is successful (ie: the vm is on that region) I want to record the region name. I’m using delegate_to because I have other commands to run that are not on that region.

`

You should look more closely at the contents of the vm_exist variable. It contains a list of results, and each result includes the value of item for that iteration of the loop.

You should look more closely at the contents of the vm_exist variable. It contains a list of results, and each result includes the value of item for that iteration of the loop.

Hi flowerysong,
The only reference that I can find in the output of that command is the hypervisor name, which is just the node it’s located on, rather than the powervc region (my powervc region controls several nodes). Unless you mean a reference to the way register stores the values returned?