summaryrefslogtreecommitdiffstats
path: root/roles/openshift_aws_vpc
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-08-30 17:47:48 -0400
committerKenny Woodson <kwoodson@redhat.com>2017-09-07 14:41:24 -0400
commitefe86b44bce679db38cca654818dc3837bb05f6a (patch)
tree3bf6d09a2906aea8784073aece30ec22b82788f2 /roles/openshift_aws_vpc
parent63ecca817c45242f3db0495d99b947ba0471789e (diff)
downloadopenshift-efe86b44bce679db38cca654818dc3837bb05f6a.tar.gz
openshift-efe86b44bce679db38cca654818dc3837bb05f6a.tar.bz2
openshift-efe86b44bce679db38cca654818dc3837bb05f6a.tar.xz
openshift-efe86b44bce679db38cca654818dc3837bb05f6a.zip
Consolidating AWS roles and variables underneath openshift_aws role.
Diffstat (limited to 'roles/openshift_aws_vpc')
-rw-r--r--roles/openshift_aws_vpc/README.md62
-rw-r--r--roles/openshift_aws_vpc/defaults/main.yml1
-rw-r--r--roles/openshift_aws_vpc/tasks/main.yml53
3 files changed, 0 insertions, 116 deletions
diff --git a/roles/openshift_aws_vpc/README.md b/roles/openshift_aws_vpc/README.md
deleted file mode 100644
index d88cf0581..000000000
--- a/roles/openshift_aws_vpc/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
-openshift_aws_vpc
-=========
-
-Ansible role to create a default AWS VPC
-
-Requirements
-------------
-
-Ansible Modules:
-
-
-Role Variables
---------------
-
-- r_openshift_aws_vpc_clusterid: "{{ clusterid }}"
-- r_openshift_aws_vpc_cidr: 172.31.48.0/20
-- r_openshift_aws_vpc_subnets: "{{ subnets }}"
-```yaml
- subnets:
- us-east-1: # These are us-east-1 region defaults. Ensure this matches your region
- - cidr: 172.31.48.0/20
- az: "us-east-1c"
- - cidr: 172.31.32.0/20
- az: "us-east-1e"
- - cidr: 172.31.16.0/20
- az: "us-east-1a"
-```
-- r_openshift_aws_vpc_region: "{{ region }}"
-- r_openshift_aws_vpc_tags: dict of tags to apply to vpc
-- r_openshift_aws_vpc_name: "{{ vpc_name | default(clusterid) }}"
-
-Dependencies
-------------
-
-
-Example Playbook
-----------------
-
-```yaml
- - name: create default vpc
- include_role:
- name: openshift_aws_vpc
- vars:
- r_openshift_aws_vpc_clusterid: mycluster
- r_openshift_aws_vpc_cidr: 172.31.48.0/20
- r_openshift_aws_vpc_subnets: "{{ subnets }}"
- r_openshift_aws_vpc_region: us-east-1
- r_openshift_aws_vpc_tags: {}
- r_openshift_aws_vpc_name: mycluster
-
-```
-
-
-License
--------
-
-Apache 2.0
-
-Author Information
-------------------
-
-Openshift
diff --git a/roles/openshift_aws_vpc/defaults/main.yml b/roles/openshift_aws_vpc/defaults/main.yml
deleted file mode 100644
index ed97d539c..000000000
--- a/roles/openshift_aws_vpc/defaults/main.yml
+++ /dev/null
@@ -1 +0,0 @@
----
diff --git a/roles/openshift_aws_vpc/tasks/main.yml b/roles/openshift_aws_vpc/tasks/main.yml
deleted file mode 100644
index cfe08dae5..000000000
--- a/roles/openshift_aws_vpc/tasks/main.yml
+++ /dev/null
@@ -1,53 +0,0 @@
----
-- name: Create AWS VPC
- ec2_vpc_net:
- state: present
- cidr_block: "{{ r_openshift_aws_vpc_cidr }}"
- dns_support: True
- dns_hostnames: True
- region: "{{ r_openshift_aws_vpc_region }}"
- name: "{{ r_openshift_aws_vpc_clusterid }}"
- tags:
- Name: "{{ r_openshift_aws_vpc_clusterid }}"
- register: vpc
-
-- name: Sleep to avoid a race condition when creating the vpc
- pause:
- seconds: 5
- when: vpc.changed
-
-- name: assign the vpc igw
- ec2_vpc_igw:
- region: "{{ r_openshift_aws_vpc_region }}"
- vpc_id: "{{ vpc.vpc.id }}"
- register: igw
-
-- name: assign the vpc subnets
- ec2_vpc_subnet:
- region: "{{ r_openshift_aws_vpc_region }}"
- vpc_id: "{{ vpc.vpc.id }}"
- cidr: "{{ item.cidr }}"
- az: "{{ item.az }}"
- resource_tags:
- Name: "{{ item.az }}"
- with_items: "{{ r_openshift_aws_vpc_subnets[r_openshift_aws_vpc_region] }}"
-
-- name: Grab the route tables from our VPC
- ec2_vpc_route_table_facts:
- region: "{{ r_openshift_aws_vpc_region }}"
- filters:
- vpc-id: "{{ vpc.vpc.id }}"
- register: route_table
-
-- name: update the route table in the vpc
- ec2_vpc_route_table:
- lookup: id
- route_table_id: "{{ route_table.route_tables[0].id }}"
- vpc_id: "{{ vpc.vpc.id }}"
- region: "{{ r_openshift_aws_vpc_region }}"
- tags:
- Name: "{{ r_openshift_aws_vpc_name }}"
- routes:
- - dest: 0.0.0.0/0
- gateway_id: igw
- register: route_table_out