From cbec29ca0e31e98b20f77e068f307eaee81a1547 Mon Sep 17 00:00:00 2001 From: willtome Date: Thu, 17 Aug 2023 11:55:50 -0400 Subject: [PATCH] fix var name --- cloud/aws_key.yml | 4 ++-- cloud/create_vpc.yml | 12 ++++++------ cloud/setup.yml | 25 ++++++++++++++++++------- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/cloud/aws_key.yml b/cloud/aws_key.yml index 82e1802e8..e4ffcee29 100644 --- a/cloud/aws_key.yml +++ b/cloud/aws_key.yml @@ -10,7 +10,7 @@ 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" @@ -18,7 +18,7 @@ - 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: diff --git a/cloud/create_vpc.yml b/cloud/create_vpc.yml index bb6005ceb..8bfe98b6c 100644 --- a/cloud/create_vpc.yml +++ b/cloud/create_vpc.yml @@ -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 @@ -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 }}" @@ -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 }}" @@ -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 @@ -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 }}" @@ -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: diff --git a/cloud/setup.yml b/cloud/setup.yml index f7978ab26..64ece260b 100644 --- a/cloud/setup.yml +++ b/cloud/setup.yml @@ -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 @@ -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: '' @@ -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 @@ -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 @@ -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 @@ -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