---
- name: query vpc
  ec2_vpc_net_facts:
    region: "{{ openshift_aws_region }}"
    filters:
      'tag:Name': "{{ openshift_aws_vpc_name }}"
  register: vpcout

- name: debug vcpout
  debug:
    var: vpcout
    verbosity: 1

- name: fetch the default subnet id
  ec2_vpc_subnet_facts:
    region: "{{ openshift_aws_region }}"
    filters:
      "availability-zone": "{{ openshift_aws_subnet_az }}"
      vpc-id: "{{ vpcout.vpcs[0].id }}"
  register: subnetout

- name: debug subnetout
  debug:
    var: subnetout
    verbosity: 1
