From 61b6f264bb13822be8482c15686bda06f45144ae Mon Sep 17 00:00:00 2001 From: Mandar Kulkarni Date: Mon, 2 Aug 2021 16:09:34 -0700 Subject: [PATCH 1/3] Update ec2_metadata_facts.py --- plugins/modules/ec2_metadata_facts.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/ec2_metadata_facts.py b/plugins/modules/ec2_metadata_facts.py index 6d874dba403..a652555cbf7 100644 --- a/plugins/modules/ec2_metadata_facts.py +++ b/plugins/modules/ec2_metadata_facts.py @@ -132,7 +132,7 @@ description: IAM instance role. type: str sample: "role_name" - ansible_ec2_iam_security_credentials_: + ansible_ec2_iam_security_credentials_role_name: description: - If there is an IAM role associated with the instance, role-name is the name of the role, and role-name contains the temporary security credentials associated with the role. Otherwise, not present. @@ -289,7 +289,7 @@ description: The elastic network interface ID. type: str sample: "eni-12345678" - ansible_ec2_network_interfaces_macs__ipv4_associations_: + ansible_ec2_network_interfaces_macs__ipv4_associations_ip_address: description: The private IPv4 addresses that are associated with each public-ip address and assigned to that interface. type: str sample: "" From 34198e614575fa747bfd9eb286b0db39e88723d8 Mon Sep 17 00:00:00 2001 From: Mandar Kulkarni Date: Mon, 2 Aug 2021 16:43:09 -0700 Subject: [PATCH 2/3] Fixing role name and mac address rendering --- plugins/modules/ec2_metadata_facts.py | 54 +++++++++++++-------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/plugins/modules/ec2_metadata_facts.py b/plugins/modules/ec2_metadata_facts.py index a652555cbf7..cee44d0a000 100644 --- a/plugins/modules/ec2_metadata_facts.py +++ b/plugins/modules/ec2_metadata_facts.py @@ -119,7 +119,7 @@ ansible_ec2_iam_info_instanceprofilearn: description: The IAM instance profile ARN. type: str - sample: "arn:aws:iam:::instance-profile/" + sample: "arn:aws:iam:::instance-profile/role_name" ansible_ec2_iam_info_instanceprofileid: description: IAM instance profile ID. type: str @@ -138,31 +138,31 @@ and role-name contains the temporary security credentials associated with the role. Otherwise, not present. type: str sample: "" - ansible_ec2_iam_security_credentials__accesskeyid: + ansible_ec2_iam_security_credentials_role_name_accesskeyid: description: IAM role access key ID. type: str sample: "" - ansible_ec2_iam_security_credentials__code: + ansible_ec2_iam_security_credentials_role_name_code: description: IAM code. type: str sample: "Success" - ansible_ec2_iam_security_credentials__expiration: + ansible_ec2_iam_security_credentials_role_name_expiration: description: IAM role credentials expiration time. type: str sample: "2017-05-12T09:11:41Z" - ansible_ec2_iam_security_credentials__lastupdated: + ansible_ec2_iam_security_credentials_role_name_lastupdated: description: IAM role last updated time. type: str sample: "2017-05-12T02:40:44Z" - ansible_ec2_iam_security_credentials__secretaccesskey: + ansible_ec2_iam_security_credentials_role_name_secretaccesskey: description: IAM role secret access key. type: str sample: "" - ansible_ec2_iam_security_credentials__token: + ansible_ec2_iam_security_credentials_role_name_token: description: IAM role token. type: str sample: "" - ansible_ec2_iam_security_credentials__type: + ansible_ec2_iam_security_credentials_role_name_type: description: IAM role type. type: str sample: "AWS-HMAC" @@ -278,87 +278,87 @@ description: Metrics; no longer available. type: str sample: "" - ansible_ec2_network_interfaces_macs__device_number: + ansible_ec2_network_interfaces_macs__mac_address_device_number: description: - The unique device number associated with that interface. The device number corresponds to the device name; for example, a device-number of 2 is for the eth2 device. - This category corresponds to the DeviceIndex and device-index fields that are used by the Amazon EC2 API and the EC2 commands for the AWS CLI. type: str sample: "0" - ansible_ec2_network_interfaces_macs__interface_id: + ansible_ec2_network_interfaces_macs__mac_address_interface_id: description: The elastic network interface ID. type: str sample: "eni-12345678" - ansible_ec2_network_interfaces_macs__ipv4_associations_ip_address: + ansible_ec2_network_interfaces_macs__mac_address_ipv4_associations_ip_address: description: The private IPv4 addresses that are associated with each public-ip address and assigned to that interface. type: str sample: "" - ansible_ec2_network_interfaces_macs__ipv6s: + ansible_ec2_network_interfaces_macs__mac_address_ipv6s: description: The IPv6 addresses associated with the interface. Returned only for instances launched into a VPC. type: str sample: "" - ansible_ec2_network_interfaces_macs__local_hostname: + ansible_ec2_network_interfaces_macs__mac_address_local_hostname: description: The interface's local hostname. type: str sample: "" - ansible_ec2_network_interfaces_macs__local_ipv4s: + ansible_ec2_network_interfaces_macs__mac_address_local_ipv4s: description: The private IPv4 addresses associated with the interface. type: str sample: "" - ansible_ec2_network_interfaces_macs__mac: + ansible_ec2_network_interfaces_macs__mac_address_mac: description: The instance's MAC address. type: str sample: "00:11:22:33:44:55" - ansible_ec2_network_interfaces_macs__owner_id: + ansible_ec2_network_interfaces_macs__mac_address_owner_id: description: - The ID of the owner of the network interface. - In multiple-interface environments, an interface can be attached by a third party, such as Elastic Load Balancing. - Traffic on an interface is always billed to the interface owner. type: str sample: "01234567890" - ansible_ec2_network_interfaces_macs__public_hostname: + ansible_ec2_network_interfaces_macs__mac_address_public_hostname: description: - The interface's public DNS (IPv4). If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to true. type: str sample: "ec2-1-2-3-4.compute-1.amazonaws.com" - ansible_ec2_network_interfaces_macs__public_ipv4s: + ansible_ec2_network_interfaces_macs__mac_address_public_ipv4s: description: The Elastic IP addresses associated with the interface. There may be multiple IPv4 addresses on an instance. type: str sample: "1.2.3.4" - ansible_ec2_network_interfaces_macs__security_group_ids: + ansible_ec2_network_interfaces_macs__mac_address_security_group_ids: description: The IDs of the security groups to which the network interface belongs. Returned only for instances launched into a VPC. type: str sample: "sg-01234567,sg-01234568" - ansible_ec2_network_interfaces_macs__security_groups: + ansible_ec2_network_interfaces_macs__mac_address_security_groups: description: Security groups to which the network interface belongs. Returned only for instances launched into a VPC. type: str sample: "secgroup1,secgroup2" - ansible_ec2_network_interfaces_macs__subnet_id: + ansible_ec2_network_interfaces_macs__mac_address_subnet_id: description: The ID of the subnet in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "subnet-01234567" - ansible_ec2_network_interfaces_macs__subnet_ipv4_cidr_block: + ansible_ec2_network_interfaces_macs__mac_address_subnet_ipv4_cidr_block: description: The IPv4 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "10.0.1.0/24" - ansible_ec2_network_interfaces_macs__subnet_ipv6_cidr_blocks: + ansible_ec2_network_interfaces_macs__mac_address_subnet_ipv6_cidr_blocks: description: The IPv6 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "" - ansible_ec2_network_interfaces_macs__vpc_id: + ansible_ec2_network_interfaces_macs__mac_address_vpc_id: description: The ID of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "vpc-0123456" - ansible_ec2_network_interfaces_macs__vpc_ipv4_cidr_block: + ansible_ec2_network_interfaces_macs__mac_address_vpc_ipv4_cidr_block: description: The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "10.0.0.0/16" - ansible_ec2_network_interfaces_macs__vpc_ipv4_cidr_blocks: + ansible_ec2_network_interfaces_macs__mac_address_vpc_ipv4_cidr_blocks: description: The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "10.0.0.0/16" - ansible_ec2_network_interfaces_macs__vpc_ipv6_cidr_blocks: + ansible_ec2_network_interfaces_macs__mac_address_vpc_ipv6_cidr_blocks: description: The IPv6 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "" From 6e7d88ddf4177a1cd88ff535f87364913f4d3238 Mon Sep 17 00:00:00 2001 From: Mandar Kulkarni Date: Wed, 4 Aug 2021 09:21:40 -0700 Subject: [PATCH 3/3] Minor fix --- plugins/modules/ec2_metadata_facts.py | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/plugins/modules/ec2_metadata_facts.py b/plugins/modules/ec2_metadata_facts.py index cee44d0a000..fc90d613db5 100644 --- a/plugins/modules/ec2_metadata_facts.py +++ b/plugins/modules/ec2_metadata_facts.py @@ -278,87 +278,87 @@ description: Metrics; no longer available. type: str sample: "" - ansible_ec2_network_interfaces_macs__mac_address_device_number: + ansible_ec2_network_interfaces_macs_mac_address_device_number: description: - The unique device number associated with that interface. The device number corresponds to the device name; for example, a device-number of 2 is for the eth2 device. - This category corresponds to the DeviceIndex and device-index fields that are used by the Amazon EC2 API and the EC2 commands for the AWS CLI. type: str sample: "0" - ansible_ec2_network_interfaces_macs__mac_address_interface_id: + ansible_ec2_network_interfaces_macs_mac_address_interface_id: description: The elastic network interface ID. type: str sample: "eni-12345678" - ansible_ec2_network_interfaces_macs__mac_address_ipv4_associations_ip_address: + ansible_ec2_network_interfaces_macs_mac_address_ipv4_associations_ip_address: description: The private IPv4 addresses that are associated with each public-ip address and assigned to that interface. type: str sample: "" - ansible_ec2_network_interfaces_macs__mac_address_ipv6s: + ansible_ec2_network_interfaces_macs_mac_address_ipv6s: description: The IPv6 addresses associated with the interface. Returned only for instances launched into a VPC. type: str sample: "" - ansible_ec2_network_interfaces_macs__mac_address_local_hostname: + ansible_ec2_network_interfaces_macs_mac_address_local_hostname: description: The interface's local hostname. type: str sample: "" - ansible_ec2_network_interfaces_macs__mac_address_local_ipv4s: + ansible_ec2_network_interfaces_macs_mac_address_local_ipv4s: description: The private IPv4 addresses associated with the interface. type: str sample: "" - ansible_ec2_network_interfaces_macs__mac_address_mac: + ansible_ec2_network_interfaces_macs_mac_address_mac: description: The instance's MAC address. type: str sample: "00:11:22:33:44:55" - ansible_ec2_network_interfaces_macs__mac_address_owner_id: + ansible_ec2_network_interfaces_macs_mac_address_owner_id: description: - The ID of the owner of the network interface. - In multiple-interface environments, an interface can be attached by a third party, such as Elastic Load Balancing. - Traffic on an interface is always billed to the interface owner. type: str sample: "01234567890" - ansible_ec2_network_interfaces_macs__mac_address_public_hostname: + ansible_ec2_network_interfaces_macs_mac_address_public_hostname: description: - The interface's public DNS (IPv4). If the instance is in a VPC, this category is only returned if the enableDnsHostnames attribute is set to true. type: str sample: "ec2-1-2-3-4.compute-1.amazonaws.com" - ansible_ec2_network_interfaces_macs__mac_address_public_ipv4s: + ansible_ec2_network_interfaces_macs_mac_address_public_ipv4s: description: The Elastic IP addresses associated with the interface. There may be multiple IPv4 addresses on an instance. type: str sample: "1.2.3.4" - ansible_ec2_network_interfaces_macs__mac_address_security_group_ids: + ansible_ec2_network_interfaces_macs_mac_address_security_group_ids: description: The IDs of the security groups to which the network interface belongs. Returned only for instances launched into a VPC. type: str sample: "sg-01234567,sg-01234568" - ansible_ec2_network_interfaces_macs__mac_address_security_groups: + ansible_ec2_network_interfaces_macs_mac_address_security_groups: description: Security groups to which the network interface belongs. Returned only for instances launched into a VPC. type: str sample: "secgroup1,secgroup2" - ansible_ec2_network_interfaces_macs__mac_address_subnet_id: + ansible_ec2_network_interfaces_macs_mac_address_subnet_id: description: The ID of the subnet in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "subnet-01234567" - ansible_ec2_network_interfaces_macs__mac_address_subnet_ipv4_cidr_block: + ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv4_cidr_block: description: The IPv4 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "10.0.1.0/24" - ansible_ec2_network_interfaces_macs__mac_address_subnet_ipv6_cidr_blocks: + ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv6_cidr_blocks: description: The IPv6 CIDR block of the subnet in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "" - ansible_ec2_network_interfaces_macs__mac_address_vpc_id: + ansible_ec2_network_interfaces_macs_mac_address_vpc_id: description: The ID of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "vpc-0123456" - ansible_ec2_network_interfaces_macs__mac_address_vpc_ipv4_cidr_block: + ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_block: description: The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "10.0.0.0/16" - ansible_ec2_network_interfaces_macs__mac_address_vpc_ipv4_cidr_blocks: + ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_blocks: description: The IPv4 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: "10.0.0.0/16" - ansible_ec2_network_interfaces_macs__mac_address_vpc_ipv6_cidr_blocks: + ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv6_cidr_blocks: description: The IPv6 CIDR block of the VPC in which the interface resides. Returned only for instances launched into a VPC. type: str sample: ""