Skip to content

Commit

Permalink
fix var name
Browse files Browse the repository at this point in the history
  • Loading branch information
willtome committed Aug 17, 2023
1 parent ae37966 commit cbec29c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 15 deletions.
4 changes: 2 additions & 2 deletions cloud/aws_key.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
ansible.builtin.assert:
that:
- aws_key_name is defined
- aws_region is defined
- create_vm_aws_region is defined
- aws_public_key is defined
- aws_keypair_owner is defined
fail_msg: "Required variables not set"

- name: Create AWS keypair
amazon.aws.ec2_key:
name: "{{ aws_key_name }}"
region: "{{ aws_region }}"
region: "{{ create_vm_aws_region }}"
key_material: "{{ aws_public_key }}"
state: present
tags:
Expand Down
12 changes: 6 additions & 6 deletions cloud/create_vpc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
aws_tenancy: default
aws_vpc_cidr_block: 10.0.0.0/16
aws_subnet_cidr: 10.0.1.0/24
aws_region: us-east-1
create_vm_aws_region: us-east-1
aws_sg_name: aws-test-sg
aws_subnet_name: aws-test-subnet
aws_rt_name: aws-test-rt
Expand All @@ -21,7 +21,7 @@
name: "{{ aws_vpc_name }}"
cidr_block: "{{ aws_vpc_cidr_block }}"
tenancy: "{{ aws_tenancy }}"
region: "{{ aws_region }}"
region: "{{ create_vm_aws_region }}"
tags:
owner: "{{ aws_owner_tag }}"
purpose: "{{ aws_purpose_tag }}"
Expand All @@ -31,7 +31,7 @@
amazon.aws.ec2_vpc_igw:
state: present
vpc_id: "{{ aws_vpc.vpc.id }}"
region: "{{ aws_region }}"
region: "{{ create_vm_aws_region }}"
tags:
Name: "{{ aws_vpc_name }}"
owner: "{{ aws_owner_tag }}"
Expand All @@ -42,7 +42,7 @@
amazon.aws.ec2_security_group:
state: present
name: "{{ aws_sg_name }}"
region: "{{ aws_region }}"
region: "{{ create_vm_aws_region }}"
description: Inbound WinRM and RDP, http for demo servers and internal AD ports
rules:
- proto: tcp
Expand Down Expand Up @@ -101,7 +101,7 @@
state: present
vpc_id: "{{ aws_vpc.vpc.id }}"
cidr: "{{ aws_subnet_cidr }}"
region: "{{ aws_region }}"
region: "{{ create_vm_aws_region }}"
map_public: true
tags:
Name: "{{ aws_subnet_name }}"
Expand All @@ -113,7 +113,7 @@
amazon.aws.ec2_vpc_route_table:
state: present
vpc_id: "{{ aws_vpc.vpc.id }}"
region: "{{ aws_region }}"
region: "{{ create_vm_aws_region }}"
subnets:
- "{{ aws_subnet.subnet.id }}"
routes:
Expand Down
25 changes: 18 additions & 7 deletions cloud/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ controller_templates:
spec:
- question_name: AWS Region
type: multiplechoice
variable: aws_region
variable: create_vm_aws_region
required: true
choices:
- us-east-1
Expand Down Expand Up @@ -263,8 +263,6 @@ controller_templates:
notification_templates_success: Telemetry
notification_templates_error: Telemetry
survey_enabled: true
extra_vars:
aws_region: us-east-1
survey:
name: ''
description: ''
Expand All @@ -286,8 +284,21 @@ controller_templates:
notification_templates_success: Telemetry
notification_templates_error: Telemetry
extra_vars:
aws_region: us-east-1
aws_report: vpc
survey_enabled: true
survey:
name: ''
description: ''
spec:
- question_name: AWS Region
type: multiplechoice
variable: create_vm_aws_region
required: true
choices:
- us-east-1
- us-east-2
- us-west-1
- us-west-2

- name: Cloud / AWS / Tags Report
job_type: run
Expand All @@ -309,7 +320,7 @@ controller_templates:
spec:
- question_name: AWS Region
type: multiplechoice
variable: aws_region
variable: create_vm_aws_region
required: true
choices:
- us-east-1
Expand All @@ -335,7 +346,7 @@ controller_templates:
spec:
- question_name: AWS Region
type: multiplechoice
variable: aws_region
variable: create_vm_aws_region
required: true
choices:
- us-east-1
Expand Down Expand Up @@ -372,7 +383,7 @@ controller_workflows:
spec:
- question_name: AWS Region
type: multiplechoice
variable: aws_region
variable: create_vm_aws_region
required: true
choices:
- us-east-1
Expand Down

0 comments on commit cbec29c

Please sign in to comment.