diff --git a/hacking/aws_config/testing_policies/compute-policy.json b/hacking/aws_config/testing_policies/compute-policy.json index cd96dd24ffe..ecf5b158ce3 100644 --- a/hacking/aws_config/testing_policies/compute-policy.json +++ b/hacking/aws_config/testing_policies/compute-policy.json @@ -33,6 +33,9 @@ "Sid": "AllowUnspecifiedEC2Resource", "Effect": "Allow", "Action": [ + "ec2:*LaunchTemplate", + "ec2:*LaunchTemplateVersion", + "ec2:*LaunchTemplateVersions", "ec2:AllocateAddress", "ec2:AssociateAddress", "ec2:AssociateDhcpOptions", diff --git a/test/integration/targets/ec2_launch_template/meta/main.yml b/test/integration/targets/ec2_launch_template/meta/main.yml new file mode 100644 index 00000000000..1f64f1169a9 --- /dev/null +++ b/test/integration/targets/ec2_launch_template/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + - setup_ec2 diff --git a/test/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml b/test/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml index 09ca075f218..a36898f1d82 100644 --- a/test/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml +++ b/test/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml @@ -12,7 +12,7 @@ group/aws: aws_access_key: "{{ aws_access_key }}" aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token }}" + security_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - include_tasks: cpu_options.yml diff --git a/test/integration/targets/ec2_launch_template/playbooks/version_fail.yml b/test/integration/targets/ec2_launch_template/playbooks/version_fail.yml index 0db80028e05..02b87f4a299 100644 --- a/test/integration/targets/ec2_launch_template/playbooks/version_fail.yml +++ b/test/integration/targets/ec2_launch_template/playbooks/version_fail.yml @@ -7,7 +7,7 @@ group/aws: aws_access_key: "{{ aws_access_key }}" aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token }}" + security_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" tasks: - block: @@ -23,7 +23,7 @@ register: ec2_lt ignore_errors: yes - - name: check that graceful error message is returned when creation with cpu_options and old botocore + - name: check that graceful error message is returned when creation with cpu_options and old botocore assert: that: - ec2_lt is failed