mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
7da565b3ae
* Add an option to parse botocore.endpoint logs for the AWS actions performed during a task Add a callback to consolidate all AWS actions used by modules Added some documentation to the AWS guidelines * Enable aws_resource_actions callback only for AWS tests * Add script to help generate policies * Set debug_botocore_endpoint_logs via environment variable for all AWS integration tests Ensure AWS tests inherit environment (also remove AWS CLI in aws_rds inventory tests and use the module)
36 lines
1.3 KiB
YAML
36 lines
1.3 KiB
YAML
- hosts: localhost
|
|
connection: local
|
|
environment: "{{ ansible_test.environment }}"
|
|
vars:
|
|
resource_prefix: 'ansible-testing'
|
|
module_defaults:
|
|
group/aws:
|
|
aws_access_key: "{{ aws_access_key }}"
|
|
aws_secret_key: "{{ aws_secret_key }}"
|
|
security_token: "{{ security_token }}"
|
|
region: "{{ aws_region }}"
|
|
tasks:
|
|
- block:
|
|
- name: Include vars file in roles/ec2_instance/defaults/main.yml
|
|
include_vars:
|
|
file: 'roles/ec2_launch_template/defaults/main.yml'
|
|
|
|
- name: create c4.large template (failure expected)
|
|
ec2_launch_template:
|
|
state: present
|
|
name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tpl"
|
|
instance_type: c4.large
|
|
register: ec2_lt
|
|
ignore_errors: yes
|
|
|
|
- name: check that graceful error message is returned when creation with cpu_options and old botocore
|
|
assert:
|
|
that:
|
|
- ec2_lt is failed
|
|
- 'ec2_lt.msg == "ec2_launch_template requires boto3 >= 1.6.0"'
|
|
always:
|
|
- name: delete the c4.large template just in case it was created
|
|
ec2_launch_template:
|
|
state: absent
|
|
name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tpl"
|
|
ignore_errors: yes
|