generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add module_defaults to ec2_networking_resources role
- Loading branch information
1 parent
c6d1a7c
commit be53b4b
Showing
1 changed file
with
25 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,29 @@ | ||
--- | ||
- name: Create VPC | ||
amazon.aws.ec2_vpc_net: | ||
name: "{{ ec2_networking_resources_vpc_name }}" | ||
cidr_block: "{{ ec2_networking_resources_vpc_cidr_block }}" | ||
register: ec2_networking_resources_vpc_result | ||
- name: Run backup_create_plan_role | ||
module_defaults: | ||
group/aws: "{{ aws_setup_credentials__output }}" | ||
block: | ||
- name: Create VPC | ||
amazon.aws.ec2_vpc_net: | ||
name: "{{ ec2_networking_resources_vpc_name }}" | ||
cidr_block: "{{ ec2_networking_resources_vpc_cidr_block }}" | ||
register: ec2_networking_resources_vpc_result | ||
|
||
- name: Create VPC subnet | ||
amazon.aws.ec2_vpc_subnet: | ||
vpc_id: "{{ ec2_networking_resources_vpc_result.vpc.id }}" | ||
cidr: "{{ ec2_networking_resources_subnet_cidr_block }}" | ||
register: ec2_networking_resources_subnet_result | ||
- name: Create VPC subnet | ||
amazon.aws.ec2_vpc_subnet: | ||
vpc_id: "{{ ec2_networking_resources_vpc_result.vpc.id }}" | ||
cidr: "{{ ec2_networking_resources_subnet_cidr_block }}" | ||
register: ec2_networking_resources_subnet_result | ||
|
||
- name: Create route table | ||
amazon.aws.ec2_vpc_route_table: | ||
vpc_id: "{{ ec2_networking_resources_vpc_result.vpc.id }}" | ||
subnets: | ||
- "{{ ec2_networking_resources_subnet_result.subnet.id }}" | ||
- name: Create route table | ||
amazon.aws.ec2_vpc_route_table: | ||
vpc_id: "{{ ec2_networking_resources_vpc_result.vpc.id }}" | ||
subnets: | ||
- "{{ ec2_networking_resources_subnet_result.subnet.id }}" | ||
|
||
- name: Create security group for internal access | ||
amazon.aws.ec2_security_group: | ||
vpc_id: "{{ ec2_networking_resources_vpc_result.vpc.id }}" | ||
name: "{{ ec2_networking_resources_sg_internal_name }}" | ||
description: "{{ ec2_networking_resources_sg_internal_description }}" | ||
rules: "{{ ec2_networking_resources_sg_internal_rules }}" | ||
- name: Create security group for internal access | ||
amazon.aws.ec2_security_group: | ||
vpc_id: "{{ ec2_networking_resources_vpc_result.vpc.id }}" | ||
name: "{{ ec2_networking_resources_sg_internal_name }}" | ||
description: "{{ ec2_networking_resources_sg_internal_description }}" | ||
rules: "{{ ec2_networking_resources_sg_internal_rules }}" |