you can set multiple vars in single set_fact:

- set_fact:
    mainVpcId: "{{ item.vpc_id }}"
    mainSubnet0: "{{ item.subnets.0.id }}"
    mainSubnet1: "{{ item.subnets.1.id }}"
    mainSubnet2: "{{ item.subnets.2.id }}"
  with_items: vpcOut.results
  when:
    - not item | skipped
    - item.item.resource_tags.WhichRegion == 'mainRegion'


----------
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CACVha7cXyjTDFy0TW_oTJkK7DjJV_y4XRXTZxZYPOp-4eLa5ww%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to