I am trying to get all the vpc peering ids present in aws account. I have registered that through a variable and it stores all the desired output. As the script will fetch all the peering ids from aws, my playbook should be capable of performing next steps with all the peering ids.
Right now I am able to able to perform only on my first peering id through:
- name: Accept a cross account VPC peering connection request
ec2_vpc_peer:
region: us-east-1
peering_id: "{{ vpc_peer.results.0.peering_id }}"
state: accept
As I am declaring .0. so it will give me the first value, I am unable to replace this value with the something that should pickup all the peering id not only the 0th one or the first one.