summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws/tasks/vpc_and_subnet_id.yml
blob: c2c345faf3f998a9806e9edd9cee4f211e626560 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
- 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