diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/defaults/main.yml b/tests/integration/targets/ec2_launch_template/defaults/main.yml similarity index 100% rename from tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/defaults/main.yml rename to tests/integration/targets/ec2_launch_template/defaults/main.yml diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/files/assume-role-policy.json b/tests/integration/targets/ec2_launch_template/files/assume-role-policy.json similarity index 100% rename from tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/files/assume-role-policy.json rename to tests/integration/targets/ec2_launch_template/files/assume-role-policy.json diff --git a/tests/integration/targets/ec2_launch_template/meta/main.yml b/tests/integration/targets/ec2_launch_template/meta/main.yml index 1f64f1169a9..38b31be0728 100644 --- a/tests/integration/targets/ec2_launch_template/meta/main.yml +++ b/tests/integration/targets/ec2_launch_template/meta/main.yml @@ -1,3 +1,4 @@ dependencies: - prepare_tests - setup_ec2 + - setup_remote_tmp_dir diff --git a/tests/integration/targets/ec2_launch_template/playbooks/full_test.yml b/tests/integration/targets/ec2_launch_template/playbooks/full_test.yml deleted file mode 100644 index ae375ac17b3..00000000000 --- a/tests/integration/targets/ec2_launch_template/playbooks/full_test.yml +++ /dev/null @@ -1,5 +0,0 @@ -- hosts: localhost - connection: local - environment: "{{ ansible_test.environment }}" - roles: - - ec2_launch_template diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/meta/main.yml b/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/meta/main.yml deleted file mode 100644 index 1f64f1169a9..00000000000 --- a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ -dependencies: - - prepare_tests - - setup_ec2 diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml b/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml deleted file mode 100644 index d3b24d64181..00000000000 --- a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/main.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- -# A Note about ec2 environment variable name preference: -# - EC2_URL -> AWS_URL -# - EC2_ACCESS_KEY -> AWS_ACCESS_KEY_ID -> AWS_ACCESS_KEY -# - EC2_SECRET_KEY -> AWS_SECRET_ACCESS_KEY -> AWX_SECRET_KEY -# - EC2_REGION -> AWS_REGION -# - -# - include: ../../../../../setup_ec2/tasks/common.yml module_name: ec2_instance - -- module_defaults: - group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" - region: "{{ aws_region }}" - block: - - - name: Find AMI to use - ec2_ami_info: - owners: 'amazon' - filters: - name: '{{ ec2_ami_name }}' - register: ec2_amis - - set_fact: - ec2_ami_image: '{{ ec2_amis.images[0].image_id }}' - - - include_tasks: cpu_options.yml - - include_tasks: iam_instance_role.yml - - include_tasks: versions.yml - - always: - - debug: - msg: teardown goes here diff --git a/tests/integration/targets/ec2_launch_template/playbooks/version_fail.yml b/tests/integration/targets/ec2_launch_template/playbooks/version_fail.yml deleted file mode 100644 index 02b87f4a299..00000000000 --- a/tests/integration/targets/ec2_launch_template/playbooks/version_fail.yml +++ /dev/null @@ -1,36 +0,0 @@ -- 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 | default(omit) }}" - 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 diff --git a/tests/integration/targets/ec2_launch_template/runme.sh b/tests/integration/targets/ec2_launch_template/runme.sh deleted file mode 100755 index 62479044670..00000000000 --- a/tests/integration/targets/ec2_launch_template/runme.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -eux - -export ANSIBLE_ROLES_PATH=../ - -# Test graceful failure for older versions of botocore -source virtualenv.sh -pip install 'boto3<1.6.0' -ansible-playbook -i ../../inventory -v playbooks/version_fail.yml "$@" - -# Run full test suite -source virtualenv.sh -pip install 'boto3>1.6.0' -ansible-playbook -i ../../inventory -v playbooks/full_test.yml "$@" diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/cpu_options.yml b/tests/integration/targets/ec2_launch_template/tasks/cpu_options.yml similarity index 100% rename from tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/cpu_options.yml rename to tests/integration/targets/ec2_launch_template/tasks/cpu_options.yml diff --git a/tests/integration/targets/ec2_launch_template/tasks/graceful_failure.yml b/tests/integration/targets/ec2_launch_template/tasks/graceful_failure.yml new file mode 100644 index 00000000000..208add29667 --- /dev/null +++ b/tests/integration/targets/ec2_launch_template/tasks/graceful_failure.yml @@ -0,0 +1,21 @@ +- block: + - 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 diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/iam_instance_role.yml b/tests/integration/targets/ec2_launch_template/tasks/iam_instance_role.yml similarity index 100% rename from tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/iam_instance_role.yml rename to tests/integration/targets/ec2_launch_template/tasks/iam_instance_role.yml diff --git a/tests/integration/targets/ec2_launch_template/tasks/main.yml b/tests/integration/targets/ec2_launch_template/tasks/main.yml new file mode 100644 index 00000000000..3e360f70749 --- /dev/null +++ b/tests/integration/targets/ec2_launch_template/tasks/main.yml @@ -0,0 +1,52 @@ +--- +- module_defaults: + group/aws: + aws_access_key: "{{ aws_access_key }}" + aws_secret_key: "{{ aws_secret_key }}" + security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + block: + + - set_fact: + virtualenv: "{{ remote_tmp_dir }}/virtualenv" + virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" + + - set_fact: + virtualenv_interpreter: "{{ virtualenv }}/bin/python" + + - pip: + name: virtualenv + + - pip: + name: + - 'boto3<1.6.0' + - botocore + - boto + - coverage<5 + - cryptography + virtualenv: "{{ virtualenv }}" + virtualenv_command: "{{ virtualenv_command }}" + virtualenv_site_packages: no + + - include_tasks: graceful_failure.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + + - name: Find AMI to use + ec2_ami_info: + owners: 'amazon' + filters: + name: '{{ ec2_ami_name }}' + register: ec2_amis + - set_fact: + ec2_ami_image: '{{ ec2_amis.images[0].image_id }}' + + - include_tasks: cpu_options.yml + - include_tasks: iam_instance_role.yml + - include_tasks: versions.yml + + always: + + - file: + path: "{{ virtualenv }}" + state: absent diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/tags_and_vpc_settings.yml b/tests/integration/targets/ec2_launch_template/tasks/tags_and_vpc_settings.yml similarity index 100% rename from tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/tags_and_vpc_settings.yml rename to tests/integration/targets/ec2_launch_template/tasks/tags_and_vpc_settings.yml diff --git a/tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/versions.yml b/tests/integration/targets/ec2_launch_template/tasks/versions.yml similarity index 100% rename from tests/integration/targets/ec2_launch_template/playbooks/roles/ec2_launch_template/tasks/versions.yml rename to tests/integration/targets/ec2_launch_template/tasks/versions.yml diff --git a/tests/integration/targets/elb_application_lb/defaults/main.yml b/tests/integration/targets/elb_application_lb/defaults/main.yml index 8100bd55ed0..d0c601c6a04 100644 --- a/tests/integration/targets/elb_application_lb/defaults/main.yml +++ b/tests/integration/targets/elb_application_lb/defaults/main.yml @@ -1,6 +1,4 @@ --- -# load balancer and target group names have to be less than 32 characters -# the 8 digit identifier at the end of resource_prefix helps determine during which test something -# was created and allows tests to be run in parallel -alb_name: "my-alb-{{ resource_prefix | regex_search('([0-9]+)$') }}" -tg_name: "my-tg-{{ resource_prefix | regex_search('([0-9]+)$') }}" +resource_short: "{{ '%0.8x'%((16**8) | random(seed=resource_prefix)) }}" +alb_name: "alb-test-{{ resource_short }}" +tg_name: "alb-test-{{ resource_short }}" diff --git a/tests/integration/targets/elb_application_lb/tasks/full_test.yml b/tests/integration/targets/elb_application_lb/tasks/full_test.yml index f3c3d6807eb..28386fa4844 100644 --- a/tests/integration/targets/elb_application_lb/tasks/full_test.yml +++ b/tests/integration/targets/elb_application_lb/tasks/full_test.yml @@ -1,21 +1,14 @@ - name: elb_application_lb full_test block: + # Setup - name: create VPC ec2_vpc_net: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' cidr_block: 10.228.228.0/22 name: '{{ resource_prefix }}_vpc' state: present register: vpc - name: create internet gateway ec2_vpc_igw: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' vpc_id: '{{ vpc.vpc.id }}' state: present tags: @@ -23,10 +16,6 @@ register: igw - name: create public subnet ec2_vpc_subnet: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' cidr: '{{ item.cidr }}' az: '{{ aws_region}}{{ item.az }}' vpc_id: '{{ vpc.vpc.id }}' @@ -49,10 +38,6 @@ public: 'False' register: subnets - ec2_vpc_subnet_info: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' filters: vpc-id: '{{ vpc.vpc.id }}' register: vpc_subnets @@ -62,10 +47,6 @@ private_subnets: '{{ vpc_subnets|community.general.json_query(''subnets[?tags.Public != `True`].id'') }}' - name: create a route table ec2_vpc_route_table: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' vpc_id: '{{ vpc.vpc.id }}' tags: Name: igw-route @@ -76,10 +57,6 @@ gateway_id: '{{ igw.gateway_id }}' register: route_table - ec2_group: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ resource_prefix }}' description: security group for Ansible ALB integration tests state: present @@ -92,16 +69,19 @@ register: sec_group - name: create a target group for testing elb_target_group: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ tg_name }}' protocol: http port: 80 vpc_id: '{{ vpc.vpc.id }}' state: present register: tg + + # Run tests for graceful failure with an old version of botocore + - include_tasks: test_multiple_actions_fail.yml + vars: + ansible_python_interpreter: "{{ virtualenv_interpreter }}" + + # Run main tests - include_tasks: test_alb_bad_listener_options.yml - include_tasks: test_alb_tags.yml - include_tasks: test_creating_alb.yml @@ -109,24 +89,19 @@ - include_tasks: test_modifying_alb_listeners.yml - include_tasks: test_deleting_alb.yml - include_tasks: test_multiple_actions.yml + always: + # Cleanup - name: destroy ALB elb_application_lb: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ alb_name }}' state: absent wait: true wait_timeout: 600 ignore_errors: true + - name: destroy target group if it was created elb_target_group: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ tg_name }}' protocol: http port: 80 @@ -142,10 +117,6 @@ ignore_errors: true - name: destroy sec group ec2_group: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ sec_group.group_name }}' description: security group for Ansible ALB integration tests state: absent @@ -157,10 +128,6 @@ ignore_errors: true - name: remove route table ec2_vpc_route_table: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' vpc_id: '{{ vpc.vpc.id }}' route_table_id: '{{ route_table.route_table.route_table_id }}' lookup: id @@ -172,10 +139,6 @@ ignore_errors: true - name: destroy subnets ec2_vpc_subnet: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' cidr: '{{ item.cidr }}' vpc_id: '{{ vpc.vpc.id }}' state: absent @@ -191,10 +154,6 @@ ignore_errors: true - name: destroy internet gateway ec2_vpc_igw: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' vpc_id: '{{ vpc.vpc.id }}' tags: Name: '{{ resource_prefix }}' @@ -206,10 +165,6 @@ ignore_errors: true - name: destroy VPC ec2_vpc_net: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' cidr_block: 10.228.228.0/22 name: '{{ resource_prefix }}_vpc' state: absent diff --git a/tests/integration/targets/elb_application_lb/tasks/main.yml b/tests/integration/targets/elb_application_lb/tasks/main.yml index 3956aba57d6..5bf26c54fd5 100644 --- a/tests/integration/targets/elb_application_lb/tasks/main.yml +++ b/tests/integration/targets/elb_application_lb/tasks/main.yml @@ -9,6 +9,7 @@ region: '{{ aws_region }}' block: + # Prepare a virtual environment for multiple_actions_fail.yml - set_fact: virtualenv: "{{ remote_tmp_dir }}/virtualenv" virtualenv_command: "{{ ansible_python_interpreter }} -m virtualenv" @@ -30,25 +31,9 @@ virtualenv_command: "{{ virtualenv_command }}" virtualenv_site_packages: no - - include_tasks: multiple_actions_fail.yml - vars: - ansible_python_interpreter: "{{ virtualenv_interpreter }}" - - - - pip: - name: - - 'botocore>=1.10.30' - - boto3 - - boto - - coverage<5 - - cryptography - virtualenv: "{{ virtualenv }}" - virtualenv_command: "{{ virtualenv_command }}" - virtualenv_site_packages: no - - include_tasks: full_test.yml - vars: - ansible_python_interpreter: "{{ virtualenv_interpreter }}" + + always: - file: path: "{{ virtualenv }}" diff --git a/tests/integration/targets/elb_application_lb/tasks/multiple_actions_fail.yml b/tests/integration/targets/elb_application_lb/tasks/multiple_actions_fail.yml deleted file mode 100644 index b70801df4e9..00000000000 --- a/tests/integration/targets/elb_application_lb/tasks/multiple_actions_fail.yml +++ /dev/null @@ -1,158 +0,0 @@ -- name: elb_application_lb multiple_actions_fail tests - block: - - name: create VPC - ec2_vpc_net: - cidr_block: 10.228.228.0/22 - name: '{{ resource_prefix }}_vpc' - state: present - register: vpc - - name: create internet gateway - ec2_vpc_igw: - vpc_id: '{{ vpc.vpc.id }}' - state: present - tags: - Name: '{{ resource_prefix }}' - register: igw - - name: create public subnet - ec2_vpc_subnet: - cidr: '{{ item.cidr }}' - az: '{{ aws_region}}{{ item.az }}' - vpc_id: '{{ vpc.vpc.id }}' - state: present - tags: - Public: '{{ item.public|string }}' - Name: '{{ item.public|ternary(''public'', ''private'') }}-{{ item.az }}' - with_items: - - cidr: 10.228.228.0/24 - az: a - public: 'True' - - cidr: 10.228.229.0/24 - az: b - public: 'True' - - cidr: 10.228.230.0/24 - az: a - public: 'False' - - cidr: 10.228.231.0/24 - az: b - public: 'False' - register: subnets - - ec2_vpc_subnet_facts: - filters: - vpc-id: '{{ vpc.vpc.id }}' - register: vpc_subnets - - name: create list of subnet ids - set_fact: - alb_subnets: '{{ vpc_subnets|community.general.json_query(''subnets[?tags.Public == `True`].id'') }}' - private_subnets: '{{ vpc_subnets|community.general.json_query(''subnets[?tags.Public != `True`].id'') }}' - - name: create a route table - ec2_vpc_route_table: - vpc_id: '{{ vpc.vpc.id }}' - tags: - Name: igw-route - Created: '{{ resource_prefix }}' - subnets: '{{ alb_subnets + private_subnets }}' - routes: - - dest: 0.0.0.0/0 - gateway_id: '{{ igw.gateway_id }}' - register: route_table - - ec2_group: - name: '{{ resource_prefix }}' - description: security group for Ansible ALB integration tests - state: present - vpc_id: '{{ vpc.vpc.id }}' - rules: - - proto: tcp - from_port: 1 - to_port: 65535 - cidr_ip: 0.0.0.0/0 - register: sec_group - - name: create a target group for testing - elb_target_group: - name: '{{ tg_name }}' - protocol: http - port: 80 - vpc_id: '{{ vpc.vpc.id }}' - state: present - register: tg - - include_tasks: test_multiple_actions_fail.yml - always: - - name: destroy ALB - elb_application_lb: - name: '{{ alb_name }}' - state: absent - wait: true - wait_timeout: 600 - ignore_errors: true - - name: destroy target group if it was created - elb_target_group: - name: '{{ tg_name }}' - protocol: http - port: 80 - vpc_id: '{{ vpc.vpc.id }}' - state: absent - wait: true - wait_timeout: 600 - register: remove_tg - retries: 10 - delay: 5 - until: remove_tg is success - when: tg is defined - ignore_errors: true - - name: destroy sec group - ec2_group: - name: '{{ sec_group.group_name }}' - description: security group for Ansible ALB integration tests - state: absent - vpc_id: '{{ vpc.vpc.id }}' - register: remove_sg - retries: 10 - delay: 5 - until: remove_sg is success - ignore_errors: true - - name: remove route table - ec2_vpc_route_table: - vpc_id: '{{ vpc.vpc.id }}' - route_table_id: '{{ route_table.route_table.route_table_id }}' - lookup: id - state: absent - register: remove_rt - retries: 10 - delay: 5 - until: remove_rt is success - ignore_errors: true - - name: destroy subnets - ec2_vpc_subnet: - cidr: '{{ item.cidr }}' - vpc_id: '{{ vpc.vpc.id }}' - state: absent - register: remove_subnet - retries: 10 - delay: 5 - until: remove_subnet is success - with_items: - - cidr: 10.228.228.0/24 - - cidr: 10.228.229.0/24 - - cidr: 10.228.230.0/24 - - cidr: 10.228.231.0/24 - ignore_errors: true - - name: destroy internet gateway - ec2_vpc_igw: - vpc_id: '{{ vpc.vpc.id }}' - tags: - Name: '{{ resource_prefix }}' - state: absent - register: remove_igw - retries: 10 - delay: 5 - until: remove_igw is success - ignore_errors: true - - name: destroy VPC - ec2_vpc_net: - cidr_block: 10.228.228.0/22 - name: '{{ resource_prefix }}_vpc' - state: absent - register: remove_vpc - retries: 10 - delay: 5 - until: remove_vpc is success - ignore_errors: true diff --git a/tests/integration/targets/elb_application_lb/tasks/test_alb_bad_listener_options.yml b/tests/integration/targets/elb_application_lb/tasks/test_alb_bad_listener_options.yml index 7c8bc25e51b..a811e3f3054 100644 --- a/tests/integration/targets/elb_application_lb/tasks/test_alb_bad_listener_options.yml +++ b/tests/integration/targets/elb_application_lb/tasks/test_alb_bad_listener_options.yml @@ -56,3 +56,13 @@ that: - alb is failed - "'unable to convert to int' in alb.msg" + + always: + # Cleanup + - name: destroy ALB if created + elb_application_lb: + name: '{{ alb_name }}' + state: absent + wait: true + wait_timeout: 600 + ignore_errors: true diff --git a/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions_fail.yml b/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions_fail.yml index aa61cb7377c..2e0d0700825 100644 --- a/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions_fail.yml +++ b/tests/integration/targets/elb_application_lb/tasks/test_multiple_actions_fail.yml @@ -38,3 +38,13 @@ that: - alb.failed - 'alb.msg == "installed version of botocore does not support multiple actions, please upgrade botocore to version 1.10.30 or higher"' + + always: + # Cleanup + - name: destroy ALB if created + elb_application_lb: + name: '{{ alb_name }}' + state: absent + wait: true + wait_timeout: 600 + ignore_errors: true diff --git a/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/defaults/main.yml b/tests/integration/targets/elb_target_info/defaults/main.yml similarity index 100% rename from tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/defaults/main.yml rename to tests/integration/targets/elb_target_info/defaults/main.yml diff --git a/tests/integration/targets/elb_target_info/playbooks/full_test.yml b/tests/integration/targets/elb_target_info/playbooks/full_test.yml deleted file mode 100644 index 20942527586..00000000000 --- a/tests/integration/targets/elb_target_info/playbooks/full_test.yml +++ /dev/null @@ -1,6 +0,0 @@ -- hosts: localhost - connection: local - environment: "{{ ansible_test.environment }}" - - roles: - - elb_target_info diff --git a/tests/integration/targets/elb_target_info/runme.sh b/tests/integration/targets/elb_target_info/runme.sh deleted file mode 100755 index aa4d23d2725..00000000000 --- a/tests/integration/targets/elb_target_info/runme.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -eux - -# Run full test suite -source virtualenv.sh -pip install 'botocore' 'boto3>=1.16.57' -ansible-playbook -i ../../inventory -v playbooks/full_test.yml "$@" diff --git a/tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/tasks/main.yml b/tests/integration/targets/elb_target_info/tasks/main.yml similarity index 100% rename from tests/integration/targets/elb_target_info/playbooks/roles/elb_target_info/tasks/main.yml rename to tests/integration/targets/elb_target_info/tasks/main.yml