-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ec2_instance should still return instance details when instances already exist #963
Comments
Files identified in the description:
If these files are inaccurate, please update the |
Thanks for taking the time to open this issue. I personally prefer to consistently return details of the resource, even when no changes are made. I've tweaked the subject line a little, to reflect the desired change as this makes it easier for other people to find the issue. |
elb_application_lb - support alb attributes SUMMARY Support modifying different alb specific attributes Fixes #571 Depends-On #696 ISSUE TYPE Feature Pull Request COMPONENT NAME elb_application_lb Reviewed-by: Jill R <None> Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@85bfce4
elb_application_lb - support alb attributes SUMMARY Support modifying different alb specific attributes Fixes ansible-collections#571 Depends-On ansible-collections#696 ISSUE TYPE Feature Pull Request COMPONENT NAME elb_application_lb Reviewed-by: Jill R <None> Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None> This commit was initially merged in https://github.com/ansible-collections/community.aws See: ansible-collections/community.aws@85bfce4
ec2_instance_info: |
FTR: this works, but shouldn't be necessary: - name: Create EC2 instances
amazon.aws.ec2_instance:
instance_type: t2.nano
state: running
image:
id: ami-f2b39792
region: us-west-1
name: myinstance
exact_count: 2
- name: Gather information about EC2 instances
amazon.aws.ec2_instance_info:
region: us-west-1
filters:
"tag:Name": myinstance
instance-state-name: ["running"]
register: ec2_instances |
fix incomplete enforce_count() return values SUMMARY This is the Ansible way. Since a call to enforce_count() requires that a call to find_instances() has already been made, the information required to populate the instances return key is already held by the variable existing_matches. There are zero use cases where it makes sense not to output this information; if I want exactly one such instance and an existing instance matches the filter, I definitely always want to know its details. Fixes #963, #859 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_instance ADDITIONAL INFORMATION See linked issues. Before: { "changed": false, "invocation": { "module_args": { "availability_zone": null, "aws_access_key": null, "aws_ca_bundle": null, "aws_config": null, "aws_secret_key": null, "count": null, "cpu_credit_specification": null, "cpu_options": null, "debug_botocore_endpoint_logs": false, "detailed_monitoring": false, "ebs_optimized": true, "ec2_url": null, "exact_count": 1, "filters": { "tag:Name": "something", "tag:env": "prod" }, "image": null, "image_id": "REDACTED", "instance_ids": [], "instance_initiated_shutdown_behavior": null, "instance_role": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_template": null, "metadata_options": null, "name": null, "network": { "source_dest_check": true }, "placement_group": null, "profile": null, "purge_tags": false, "region": "us-west-2", "security_group": null, "security_groups": [ "default" ], "security_token": null, "state": "present", "tags": { "Name": "something", "env": "prod", }, "tenancy": null, "termination_protection": null, "tower_callback": null, "user_data": "REDACTED", "validate_certs": true, "volumes": [ { "device_name": "/dev/sda1", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdo", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdp", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 10, "volume_type": "gp3" } }, { "device_name": "/dev/xvdi", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 100, "volume_type": "gp3" } } ], "vpc_subnet_id": "REDACTED", "wait": true, "wait_timeout": 300 } }, "msg": "1 instances already running, nothing to do." } After: { "changed": false, "instance_ids": [ "REDACTED" ], "instances": [ { "ami_launch_index": 0, "architecture": "x86_64", "block_device_mappings": [ { "device_name": "/dev/sda1", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdo", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdp", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdi", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } } ], "capacity_reservation_specification": { "capacity_reservation_preference": "open" }, "client_token": "REDACTED", "cpu_options": { "core_count": 4, "threads_per_core": 2 }, "ebs_optimized": true, "ena_support": true, "enclave_options": { "enabled": false }, "hibernation_options": { "configured": false }, "hypervisor": "xen", "iam_instance_profile": { "arn": "REDACTED", "id": "REDACTED" }, "image_id": "REDACTED", "instance_id": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_time": "2022-08-10T19:50:23+00:00", "maintenance_options": { "auto_recovery": "default" }, "metadata_options": { "http_endpoint": "enabled", "http_protocol_ipv6": "disabled", "http_put_response_hop_limit": 1, "http_tokens": "optional", "instance_metadata_tags": "disabled", "state": "applied" }, "monitoring": { "state": "disabled" }, "network_interfaces": [ { "attachment": { "attach_time": "2022-08-10T19:50:23+00:00", "attachment_id": "REDACTED", "delete_on_termination": true, "device_index": 0, "network_card_index": 0, "status": "attached" }, "description": "", "groups": [ { "group_id": "REDACTED", "group_name": "REDACTED" } ], "interface_type": "interface", "ipv6_addresses": [], "mac_address": "REDACTED", "network_interface_id": "REDACTED", "owner_id": "REDACTED", "private_dns_name": "REDACTED", "private_ip_address": "REDACTED", "private_ip_addresses": [ { "primary": true, "private_dns_name": "REDACTED", "private_ip_address": "REDACTED" } ], "source_dest_check": true, "status": "in-use", "subnet_id": "REDACTED", "vpc_id": "REDACTED" } ], "placement": { "availability_zone": "us-west-2a", "group_name": "", "tenancy": "default" }, "platform_details": "Linux/UNIX", "private_dns_name": "REDACTED", "private_dns_name_options": { "enable_resource_name_dns_a_record": false, "enable_resource_name_dns_aaaa_record": false, "hostname_type": "ip-name" }, "private_ip_address": "REDACTED", "product_codes": [], "public_dns_name": "", "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_groups": [ { "group_id": "REDACTED", "group_name": "REDACTED" } ], "source_dest_check": true, "state": { "code": 16, "name": "running" }, "state_transition_reason": "", "subnet_id": "REDACTED", "tags": { "Name": "something", "env": "prod", }, "usage_operation": "RunInstances", "usage_operation_update_time": "2022-08-10T19:50:23+00:00", "virtualization_type": "hvm", "vpc_id": "REDACTED" } ], "invocation": { "module_args": { "availability_zone": null, "aws_access_key": null, "aws_ca_bundle": null, "aws_config": null, "aws_secret_key": null, "count": null, "cpu_credit_specification": null, "cpu_options": null, "debug_botocore_endpoint_logs": false, "detailed_monitoring": false, "ebs_optimized": true, "ec2_url": null, "exact_count": 1, "filters": { "tag:Name": "something", "tag:env": "prod" }, "image": null, "image_id": "REDACTED", "instance_ids": [], "instance_initiated_shutdown_behavior": null, "instance_role": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_template": null, "metadata_options": null, "name": null, "network": { "source_dest_check": true }, "placement_group": null, "profile": null, "purge_tags": false, "region": "us-west-2", "security_group": null, "security_groups": [ "default" ], "security_token": null, "state": "present", "tags": { "Name": "something", "env": "prod", }, "tenancy": null, "termination_protection": null, "tower_callback": null, "user_data": "REDACTED", "validate_certs": true, "volumes": [ { "device_name": "/dev/sda1", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdo", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdp", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 10, "volume_type": "gp3" } }, { "device_name": "/dev/xvdi", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 100, "volume_type": "gp3" } } ], "vpc_subnet_id": "REDACTED", "wait": true, "wait_timeout": 300 } }, "msg": "1 instances already running, nothing to do." } Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell
fix incomplete enforce_count() return values SUMMARY This is the Ansible way. Since a call to enforce_count() requires that a call to find_instances() has already been made, the information required to populate the instances return key is already held by the variable existing_matches. There are zero use cases where it makes sense not to output this information; if I want exactly one such instance and an existing instance matches the filter, I definitely always want to know its details. Fixes ansible-collections#963, ansible-collections#859 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_instance ADDITIONAL INFORMATION See linked issues. Before: { "changed": false, "invocation": { "module_args": { "availability_zone": null, "aws_access_key": null, "aws_ca_bundle": null, "aws_config": null, "aws_secret_key": null, "count": null, "cpu_credit_specification": null, "cpu_options": null, "debug_botocore_endpoint_logs": false, "detailed_monitoring": false, "ebs_optimized": true, "ec2_url": null, "exact_count": 1, "filters": { "tag:Name": "something", "tag:env": "prod" }, "image": null, "image_id": "REDACTED", "instance_ids": [], "instance_initiated_shutdown_behavior": null, "instance_role": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_template": null, "metadata_options": null, "name": null, "network": { "source_dest_check": true }, "placement_group": null, "profile": null, "purge_tags": false, "region": "us-west-2", "security_group": null, "security_groups": [ "default" ], "security_token": null, "state": "present", "tags": { "Name": "something", "env": "prod", }, "tenancy": null, "termination_protection": null, "tower_callback": null, "user_data": "REDACTED", "validate_certs": true, "volumes": [ { "device_name": "/dev/sda1", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdo", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdp", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 10, "volume_type": "gp3" } }, { "device_name": "/dev/xvdi", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 100, "volume_type": "gp3" } } ], "vpc_subnet_id": "REDACTED", "wait": true, "wait_timeout": 300 } }, "msg": "1 instances already running, nothing to do." } After: { "changed": false, "instance_ids": [ "REDACTED" ], "instances": [ { "ami_launch_index": 0, "architecture": "x86_64", "block_device_mappings": [ { "device_name": "/dev/sda1", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdo", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdp", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdi", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } } ], "capacity_reservation_specification": { "capacity_reservation_preference": "open" }, "client_token": "REDACTED", "cpu_options": { "core_count": 4, "threads_per_core": 2 }, "ebs_optimized": true, "ena_support": true, "enclave_options": { "enabled": false }, "hibernation_options": { "configured": false }, "hypervisor": "xen", "iam_instance_profile": { "arn": "REDACTED", "id": "REDACTED" }, "image_id": "REDACTED", "instance_id": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_time": "2022-08-10T19:50:23+00:00", "maintenance_options": { "auto_recovery": "default" }, "metadata_options": { "http_endpoint": "enabled", "http_protocol_ipv6": "disabled", "http_put_response_hop_limit": 1, "http_tokens": "optional", "instance_metadata_tags": "disabled", "state": "applied" }, "monitoring": { "state": "disabled" }, "network_interfaces": [ { "attachment": { "attach_time": "2022-08-10T19:50:23+00:00", "attachment_id": "REDACTED", "delete_on_termination": true, "device_index": 0, "network_card_index": 0, "status": "attached" }, "description": "", "groups": [ { "group_id": "REDACTED", "group_name": "REDACTED" } ], "interface_type": "interface", "ipv6_addresses": [], "mac_address": "REDACTED", "network_interface_id": "REDACTED", "owner_id": "REDACTED", "private_dns_name": "REDACTED", "private_ip_address": "REDACTED", "private_ip_addresses": [ { "primary": true, "private_dns_name": "REDACTED", "private_ip_address": "REDACTED" } ], "source_dest_check": true, "status": "in-use", "subnet_id": "REDACTED", "vpc_id": "REDACTED" } ], "placement": { "availability_zone": "us-west-2a", "group_name": "", "tenancy": "default" }, "platform_details": "Linux/UNIX", "private_dns_name": "REDACTED", "private_dns_name_options": { "enable_resource_name_dns_a_record": false, "enable_resource_name_dns_aaaa_record": false, "hostname_type": "ip-name" }, "private_ip_address": "REDACTED", "product_codes": [], "public_dns_name": "", "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_groups": [ { "group_id": "REDACTED", "group_name": "REDACTED" } ], "source_dest_check": true, "state": { "code": 16, "name": "running" }, "state_transition_reason": "", "subnet_id": "REDACTED", "tags": { "Name": "something", "env": "prod", }, "usage_operation": "RunInstances", "usage_operation_update_time": "2022-08-10T19:50:23+00:00", "virtualization_type": "hvm", "vpc_id": "REDACTED" } ], "invocation": { "module_args": { "availability_zone": null, "aws_access_key": null, "aws_ca_bundle": null, "aws_config": null, "aws_secret_key": null, "count": null, "cpu_credit_specification": null, "cpu_options": null, "debug_botocore_endpoint_logs": false, "detailed_monitoring": false, "ebs_optimized": true, "ec2_url": null, "exact_count": 1, "filters": { "tag:Name": "something", "tag:env": "prod" }, "image": null, "image_id": "REDACTED", "instance_ids": [], "instance_initiated_shutdown_behavior": null, "instance_role": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_template": null, "metadata_options": null, "name": null, "network": { "source_dest_check": true }, "placement_group": null, "profile": null, "purge_tags": false, "region": "us-west-2", "security_group": null, "security_groups": [ "default" ], "security_token": null, "state": "present", "tags": { "Name": "something", "env": "prod", }, "tenancy": null, "termination_protection": null, "tower_callback": null, "user_data": "REDACTED", "validate_certs": true, "volumes": [ { "device_name": "/dev/sda1", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdo", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdp", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 10, "volume_type": "gp3" } }, { "device_name": "/dev/xvdi", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 100, "volume_type": "gp3" } } ], "vpc_subnet_id": "REDACTED", "wait": true, "wait_timeout": 300 } }, "msg": "1 instances already running, nothing to do." } Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell
SUMMARY This is the Ansible way. Since a call to enforce_count() requires that a call to find_instances() has already been made, the information required to populate the instances return key is already held by the variable existing_matches. There are zero use cases where it makes sense not to output this information; if I want exactly one such instance and an existing instance matches the filter, I definitely always want to know its details. Fixes #963, #859 ISSUE TYPE Bugfix Pull Request COMPONENT NAME ec2_instance ADDITIONAL INFORMATION See linked issues. Before: { "changed": false, "invocation": { "module_args": { "availability_zone": null, "aws_access_key": null, "aws_ca_bundle": null, "aws_config": null, "aws_secret_key": null, "count": null, "cpu_credit_specification": null, "cpu_options": null, "debug_botocore_endpoint_logs": false, "detailed_monitoring": false, "ebs_optimized": true, "ec2_url": null, "exact_count": 1, "filters": { "tag:Name": "something", "tag:env": "prod" }, "image": null, "image_id": "REDACTED", "instance_ids": [], "instance_initiated_shutdown_behavior": null, "instance_role": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_template": null, "metadata_options": null, "name": null, "network": { "source_dest_check": true }, "placement_group": null, "profile": null, "purge_tags": false, "region": "us-west-2", "security_group": null, "security_groups": [ "default" ], "security_token": null, "state": "present", "tags": { "Name": "something", "env": "prod", }, "tenancy": null, "termination_protection": null, "tower_callback": null, "user_data": "REDACTED", "validate_certs": true, "volumes": [ { "device_name": "/dev/sda1", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdo", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdp", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 10, "volume_type": "gp3" } }, { "device_name": "/dev/xvdi", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 100, "volume_type": "gp3" } } ], "vpc_subnet_id": "REDACTED", "wait": true, "wait_timeout": 300 } }, "msg": "1 instances already running, nothing to do." } After: { "changed": false, "instance_ids": [ "REDACTED" ], "instances": [ { "ami_launch_index": 0, "architecture": "x86_64", "block_device_mappings": [ { "device_name": "/dev/sda1", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdo", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdp", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } }, { "device_name": "/dev/xvdi", "ebs": { "attach_time": "2022-08-10T19:50:24+00:00", "delete_on_termination": true, "status": "attached", "volume_id": "REDACTED" } } ], "capacity_reservation_specification": { "capacity_reservation_preference": "open" }, "client_token": "REDACTED", "cpu_options": { "core_count": 4, "threads_per_core": 2 }, "ebs_optimized": true, "ena_support": true, "enclave_options": { "enabled": false }, "hibernation_options": { "configured": false }, "hypervisor": "xen", "iam_instance_profile": { "arn": "REDACTED", "id": "REDACTED" }, "image_id": "REDACTED", "instance_id": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_time": "2022-08-10T19:50:23+00:00", "maintenance_options": { "auto_recovery": "default" }, "metadata_options": { "http_endpoint": "enabled", "http_protocol_ipv6": "disabled", "http_put_response_hop_limit": 1, "http_tokens": "optional", "instance_metadata_tags": "disabled", "state": "applied" }, "monitoring": { "state": "disabled" }, "network_interfaces": [ { "attachment": { "attach_time": "2022-08-10T19:50:23+00:00", "attachment_id": "REDACTED", "delete_on_termination": true, "device_index": 0, "network_card_index": 0, "status": "attached" }, "description": "", "groups": [ { "group_id": "REDACTED", "group_name": "REDACTED" } ], "interface_type": "interface", "ipv6_addresses": [], "mac_address": "REDACTED", "network_interface_id": "REDACTED", "owner_id": "REDACTED", "private_dns_name": "REDACTED", "private_ip_address": "REDACTED", "private_ip_addresses": [ { "primary": true, "private_dns_name": "REDACTED", "private_ip_address": "REDACTED" } ], "source_dest_check": true, "status": "in-use", "subnet_id": "REDACTED", "vpc_id": "REDACTED" } ], "placement": { "availability_zone": "us-west-2a", "group_name": "", "tenancy": "default" }, "platform_details": "Linux/UNIX", "private_dns_name": "REDACTED", "private_dns_name_options": { "enable_resource_name_dns_a_record": false, "enable_resource_name_dns_aaaa_record": false, "hostname_type": "ip-name" }, "private_ip_address": "REDACTED", "product_codes": [], "public_dns_name": "", "root_device_name": "/dev/sda1", "root_device_type": "ebs", "security_groups": [ { "group_id": "REDACTED", "group_name": "REDACTED" } ], "source_dest_check": true, "state": { "code": 16, "name": "running" }, "state_transition_reason": "", "subnet_id": "REDACTED", "tags": { "Name": "something", "env": "prod", }, "usage_operation": "RunInstances", "usage_operation_update_time": "2022-08-10T19:50:23+00:00", "virtualization_type": "hvm", "vpc_id": "REDACTED" } ], "invocation": { "module_args": { "availability_zone": null, "aws_access_key": null, "aws_ca_bundle": null, "aws_config": null, "aws_secret_key": null, "count": null, "cpu_credit_specification": null, "cpu_options": null, "debug_botocore_endpoint_logs": false, "detailed_monitoring": false, "ebs_optimized": true, "ec2_url": null, "exact_count": 1, "filters": { "tag:Name": "something", "tag:env": "prod" }, "image": null, "image_id": "REDACTED", "instance_ids": [], "instance_initiated_shutdown_behavior": null, "instance_role": "REDACTED", "instance_type": "m5.2xlarge", "key_name": "REDACTED", "launch_template": null, "metadata_options": null, "name": null, "network": { "source_dest_check": true }, "placement_group": null, "profile": null, "purge_tags": false, "region": "us-west-2", "security_group": null, "security_groups": [ "default" ], "security_token": null, "state": "present", "tags": { "Name": "something", "env": "prod", }, "tenancy": null, "termination_protection": null, "tower_callback": null, "user_data": "REDACTED", "validate_certs": true, "volumes": [ { "device_name": "/dev/sda1", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdo", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 20, "volume_type": "gp3" } }, { "device_name": "/dev/xvdp", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 10, "volume_type": "gp3" } }, { "device_name": "/dev/xvdi", "ebs": { "delete_on_termination": true, "encrypted": true, "volume_size": 100, "volume_type": "gp3" } } ], "vpc_subnet_id": "REDACTED", "wait": true, "wait_timeout": 300 } }, "msg": "1 instances already running, nothing to do." } Reviewed-by: Alina Buzachis Reviewed-by: Mark Chappell Co-authored-by: Matt 'Archer' Vaughn <[email protected]>
elb_application_lb - support alb attributes SUMMARY Support modifying different alb specific attributes Fixes ansible-collections#571 Depends-On ansible-collections#696 ISSUE TYPE Feature Pull Request COMPONENT NAME elb_application_lb Reviewed-by: Jill R <None> Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None>
elb_application_lb - support alb attributes SUMMARY Support modifying different alb specific attributes Fixes ansible-collections#571 Depends-On ansible-collections#696 ISSUE TYPE Feature Pull Request COMPONENT NAME elb_application_lb Reviewed-by: Jill R <None> Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None>
elb_application_lb - support alb attributes SUMMARY Support modifying different alb specific attributes Fixes ansible-collections#571 Depends-On ansible-collections#696 ISSUE TYPE Feature Pull Request COMPONENT NAME elb_application_lb Reviewed-by: Jill R <None> Reviewed-by: Markus Bergholz <[email protected]> Reviewed-by: Alina Buzachis <None> Reviewed-by: Joseph Torcasso <None>
Summary
I am duplicating issue #859 because it was incorrectly closed.
Idempotency -- the core design pattern and expectation on which Ansible is built -- requires that the module's return data be complete and consistent whether a change occurs or not. Any instances that matched
filters
passed to the module because they already exist must be included in the module'sinstances
return key.It is an anti-pattern to suggest inserting a second task to cover a fault in idempotency of the first, especially after breaking the expectation set by the original "ec2" module. In Linux design philosophy, any such breaking change is automatically a bug.
Issue Type
Bug Report
Component Name
ec2_instance
Ansible Version
Collection Versions
AWS SDK versions
Configuration
OS / Environment
Gentoo Linux
Steps to Reproduce
- Launch an instance that already exists.
Expected Results
- Module return includes `[instances]`.
Actual Results
- Module return does not include `[instances]`.
Code of Conduct
The text was updated successfully, but these errors were encountered: