Compare commits
1 Commits
wtome-devs
...
jce/az-fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
93e9128345 |
@@ -2,6 +2,7 @@
|
|||||||
- name: Create Cloud Infra
|
- name: Create Cloud Infra
|
||||||
hosts: localhost
|
hosts: localhost
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
|
|
||||||
vars:
|
vars:
|
||||||
aws_vpc_name: aws-test-vpc
|
aws_vpc_name: aws-test-vpc
|
||||||
aws_owner_tag: default
|
aws_owner_tag: default
|
||||||
@@ -13,6 +14,27 @@
|
|||||||
aws_subnet_name: aws-test-subnet
|
aws_subnet_name: aws-test-subnet
|
||||||
aws_rt_name: aws-test-rt
|
aws_rt_name: aws-test-rt
|
||||||
|
|
||||||
|
# map of availability zones to use per region, added since not all
|
||||||
|
# instance types are available in all AZs. must match the drop-down
|
||||||
|
# list for the create_vm_aws_region variable described in cloud/setup.yml
|
||||||
|
_azs:
|
||||||
|
us-east-1:
|
||||||
|
- us-east-1a
|
||||||
|
- us-east-1b
|
||||||
|
- us-east-1c
|
||||||
|
us-east-2:
|
||||||
|
- us-east-2a
|
||||||
|
- us-east-2b
|
||||||
|
- us-east-2c
|
||||||
|
us-west-1:
|
||||||
|
# us-west-1a not available when last checked 20250218
|
||||||
|
- us-west-1b
|
||||||
|
- us-west-1c
|
||||||
|
us-west-2:
|
||||||
|
- us-west-2a
|
||||||
|
- us-west-2b
|
||||||
|
- us-west-2c
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: Create VPC
|
- name: Create VPC
|
||||||
amazon.aws.ec2_vpc_net:
|
amazon.aws.ec2_vpc_net:
|
||||||
@@ -95,12 +117,13 @@
|
|||||||
owner: "{{ aws_owner_tag }}"
|
owner: "{{ aws_owner_tag }}"
|
||||||
purpose: "{{ aws_purpose_tag }}"
|
purpose: "{{ aws_purpose_tag }}"
|
||||||
|
|
||||||
- name: Create a subnet on the VPC
|
- name: Create a subnet in the VPC
|
||||||
amazon.aws.ec2_vpc_subnet:
|
amazon.aws.ec2_vpc_subnet:
|
||||||
state: present
|
state: present
|
||||||
vpc_id: "{{ aws_vpc.vpc.id }}"
|
vpc_id: "{{ aws_vpc.vpc.id }}"
|
||||||
cidr: "{{ aws_subnet_cidr }}"
|
cidr: "{{ aws_subnet_cidr }}"
|
||||||
region: "{{ create_vm_aws_region }}"
|
region: "{{ create_vm_aws_region }}"
|
||||||
|
az: "{{ _azs[create_vm_aws_region] | shuffle | first }}"
|
||||||
map_public: true
|
map_public: true
|
||||||
tags:
|
tags:
|
||||||
Name: "{{ aws_subnet_name }}"
|
Name: "{{ aws_subnet_name }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user