diff --git a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/block_devices.yml b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/block_devices.yml index 1f931f56cb..3c775a56e7 100644 --- a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/block_devices.yml +++ b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/block_devices.yml @@ -12,6 +12,9 @@ image_id: "{{ ec2_ami_image[aws_region] }}" vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true - device_name: /dev/sdb ebs: volume_size: 20 diff --git a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/cpu_options.yml b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/cpu_options.yml index ce916d3c96..f6edb36c14 100644 --- a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/cpu_options.yml +++ b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/cpu_options.yml @@ -18,6 +18,10 @@ cpu_options: core_count: 1 threads_per_core: 1 + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true <<: *aws_connection_info register: instance_creation @@ -38,6 +42,10 @@ TestId: "{{ resource_prefix }}" vpc_subnet_id: "{{ testing_subnet_a.subnet.id }}" instance_type: c4.large + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true cpu_options: core_count: 1 threads_per_core: 2 diff --git a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/default_vpc_tests.yml b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/default_vpc_tests.yml index e9b2e2f696..85dbf501fc 100644 --- a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/default_vpc_tests.yml +++ b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/default_vpc_tests.yml @@ -14,6 +14,10 @@ TestId: "{{ resource_prefix }}" security_groups: "{{ sg.group_id }}" instance_type: t2.micro + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true <<: *aws_connection_info register: in_default_vpc - name: Terminate instance diff --git a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/external_resource_attach.yml b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/external_resource_attach.yml index 5931ee67bd..b11b618d19 100644 --- a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/external_resource_attach.yml +++ b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/external_resource_attach.yml @@ -37,6 +37,10 @@ availability_zone: '{{ aws_region }}b' tags: TestId: "{{ resource_prefix }}" + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true instance_type: t2.micro <<: *aws_connection_info register: in_test_vpc diff --git a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/iam_instance_role.yml b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/iam_instance_role.yml index 9617f403a5..6fd27bdfaf 100644 --- a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/iam_instance_role.yml +++ b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/iam_instance_role.yml @@ -32,11 +32,15 @@ - name: Make instance with an instance_role ec2_instance: - name: "{{ resource_prefix }}-test-default-vpc" + name: "{{ resource_prefix }}-test-instance-role" image_id: "{{ ec2_ami_image[aws_region] }}" security_groups: "{{ sg.group_id }}" instance_type: t2.micro instance_role: "{{ resource_prefix }}-test-policy" + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true <<: *aws_connection_info register: instance_with_role @@ -46,7 +50,7 @@ - name: Update instance with new instance_role ec2_instance: - name: "{{ resource_prefix }}-test-default-vpc" + name: "{{ resource_prefix }}-test-instance-role" image_id: "{{ ec2_ami_image[aws_region] }}" security_groups: "{{ sg.group_id }}" instance_type: t2.micro diff --git a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/tags_and_vpc_settings.yml b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/tags_and_vpc_settings.yml index 02cff845ee..036d92a0ca 100644 --- a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/tags_and_vpc_settings.yml +++ b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/tags_and_vpc_settings.yml @@ -22,6 +22,10 @@ source_dest_check: false vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" instance_type: t2.micro + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true <<: *aws_connection_info register: in_test_vpc diff --git a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/termination_protection.yml b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/termination_protection.yml index 5443ecef0f..9ff72c33ef 100644 --- a/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/termination_protection.yml +++ b/test/integration/targets/ec2_instance/playbooks/roles/ec2_instance/tasks/termination_protection.yml @@ -16,6 +16,10 @@ vpc_subnet_id: "{{ testing_subnet_b.subnet.id }}" termination_protection: true instance_type: t2.micro + volumes: + - device_name: /dev/sda1 + ebs: + delete_on_termination: true <<: *aws_connection_info register: in_test_vpc - name: Try to terminate the instance