-
Notifications
You must be signed in to change notification settings - Fork 341
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
Add instance tags to ec2_metadata_facts return values #2398
base: main
Are you sure you want to change the base?
Add instance tags to ec2_metadata_facts return values #2398
Conversation
Docs Build 📝Thank you for contribution!✨ The docsite for this PR is available for download as an artifact from this run: You can compare to the docs for the File changes:
Click to see the diff comparison.NOTE: only file modifications are shown here. New and deleted files are excluded. diff --git a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_metadata_facts_module.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_metadata_facts_module.html
index ae55183..7a1717e 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/ec2_metadata_facts_module.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/ec2_metadata_facts_module.html
@@ -656,6 +656,17 @@ To check whether it is installed, run <code class="code docutils literal notrans
</div></td>
</tr>
<tr class="row-even"><td><div class="ansible-option-cell">
+<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_instance_tags"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-instance-tags"><strong>ansible_ec2_instance_tags</strong></p>
+<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_instance_tags" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">dictionary</span></p>
+<p><em class="ansible-option-versionadded">added in amazon.aws 9.1.0</em></p>
+</div></td>
+<td><div class="ansible-option-cell"><p>The dict of tags for the instance.</p>
+<p>Returns empty dict if access to tags (InstanceMetadataTags) in instance metadata is not enabled.</p>
+<p class="ansible-option-line"><strong class="ansible-option-returned-bold">Returned:</strong> success</p>
+<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">{"tagKey1":</span> <span class="pre">"tag</span> <span class="pre">value</span> <span class="pre">1",</span> <span class="pre">"tag_key2":</span> <span class="pre">"tag</span> <span class="pre">value</span> <span class="pre">2"}</span></code></p>
+</div></td>
+</tr>
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_instance_tags_keys"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-instance-tags-keys"><strong>ansible_ec2_instance_tags_keys</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_instance_tags_keys" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">list</span> / <span class="ansible-option-elements">elements=string</span></p>
<p><em class="ansible-option-versionadded">added in amazon.aws 5.5.0</em></p>
@@ -666,7 +677,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">["tagKey1",</span> <span class="pre">"tag_key2"]</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_instance_type"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-instance-type"><strong>ansible_ec2_instance_type</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_instance_type" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -675,7 +686,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"m4.large"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_local_hostname"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-local-hostname"><strong>ansible_ec2_local_hostname</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_local_hostname" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -685,7 +696,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"ip-10-0-0-1.ec2.internal"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_local_ipv4"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-local-ipv4"><strong>ansible_ec2_local_ipv4</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_local_ipv4" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -695,7 +706,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"10.0.0.1"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_mac"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-mac"><strong>ansible_ec2_mac</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_mac" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -705,7 +716,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"00:11:22:33:44:55"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_metrics_vhostmd"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-metrics-vhostmd"><strong>ansible_ec2_metrics_vhostmd</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_metrics_vhostmd" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -714,7 +725,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_device_number"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-device-number"><strong>ansible_ec2_network_interfaces_macs_mac_address_device_number</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_device_number" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -724,7 +735,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"0"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_interface_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-interface-id"><strong>ansible_ec2_network_interfaces_macs_mac_address_interface_id</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_interface_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -733,7 +744,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"eni-12345678"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_ipv4_associations_ip_address"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-ipv4-associations-ip-address"><strong>ansible_ec2_network_interfaces_macs_mac_address_ipv4_associations_ip_address</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_ipv4_associations_ip_address" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -742,7 +753,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_ipv6s"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-ipv6s"><strong>ansible_ec2_network_interfaces_macs_mac_address_ipv6s</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_ipv6s" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -751,7 +762,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_local_hostname"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-local-hostname"><strong>ansible_ec2_network_interfaces_macs_mac_address_local_hostname</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_local_hostname" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -760,7 +771,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_local_ipv4s"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-local-ipv4s"><strong>ansible_ec2_network_interfaces_macs_mac_address_local_ipv4s</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_local_ipv4s" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -769,7 +780,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_mac"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-mac"><strong>ansible_ec2_network_interfaces_macs_mac_address_mac</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_mac" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -778,7 +789,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"00:11:22:33:44:55"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_owner_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-owner-id"><strong>ansible_ec2_network_interfaces_macs_mac_address_owner_id</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_owner_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -789,7 +800,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"123456789012"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_public_hostname"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-public-hostname"><strong>ansible_ec2_network_interfaces_macs_mac_address_public_hostname</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_public_hostname" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -798,7 +809,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"ec2-1-2-3-4.compute-1.amazonaws.com"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_public_ipv4s"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-public-ipv4s"><strong>ansible_ec2_network_interfaces_macs_mac_address_public_ipv4s</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_public_ipv4s" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -807,7 +818,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"1.2.3.4"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_security_group_ids"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-security-group-ids"><strong>ansible_ec2_network_interfaces_macs_mac_address_security_group_ids</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_security_group_ids" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -816,7 +827,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"sg-01234567,sg-01234568"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_security_groups"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-security-groups"><strong>ansible_ec2_network_interfaces_macs_mac_address_security_groups</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_security_groups" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -825,7 +836,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"secgroup1,secgroup2"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_subnet_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-subnet-id"><strong>ansible_ec2_network_interfaces_macs_mac_address_subnet_id</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_subnet_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -834,7 +845,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"subnet-01234567"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv4_cidr_block"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-subnet-ipv4-cidr-block"><strong>ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv4_cidr_block</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv4_cidr_block" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -843,7 +854,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"10.0.1.0/24"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv6_cidr_blocks"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-subnet-ipv6-cidr-blocks"><strong>ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv6_cidr_blocks</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_subnet_ipv6_cidr_blocks" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -852,7 +863,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-vpc-id"><strong>ansible_ec2_network_interfaces_macs_mac_address_vpc_id</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -861,7 +872,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"vpc-0123456"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_block"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-vpc-ipv4-cidr-block"><strong>ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_block</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_block" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -870,7 +881,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"10.0.0.0/16"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_blocks"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-vpc-ipv4-cidr-blocks"><strong>ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_blocks</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv4_cidr_blocks" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -879,7 +890,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"10.0.0.0/16"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv6_cidr_blocks"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-network-interfaces-macs-mac-address-vpc-ipv6-cidr-blocks"><strong>ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv6_cidr_blocks</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_network_interfaces_macs_mac_address_vpc_ipv6_cidr_blocks" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -888,7 +899,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_placement_availability_zone"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-placement-availability-zone"><strong>ansible_ec2_placement_availability_zone</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_placement_availability_zone" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -897,7 +908,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"us-east-1a"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_placement_region"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-placement-region"><strong>ansible_ec2_placement_region</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_placement_region" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -906,7 +917,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"us-east-1"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_product_codes"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-product-codes"><strong>ansible_ec2_product_codes</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_product_codes" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -915,7 +926,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"aw0evgkw8e5c1q413zgy5pjce"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_profile"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-profile"><strong>ansible_ec2_profile</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_profile" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -924,7 +935,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"default-hvm"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_public_hostname"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-public-hostname"><strong>ansible_ec2_public_hostname</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_public_hostname" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -933,7 +944,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"ec2-1-2-3-4.compute-1.amazonaws.com"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_public_ipv4"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-public-ipv4"><strong>ansible_ec2_public_ipv4</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_public_ipv4" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -942,7 +953,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"1.2.3.4"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_public_key"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-public-key"><strong>ansible_ec2_public_key</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_public_key" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -951,7 +962,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_ramdisk_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-ramdisk-id"><strong>ansible_ec2_ramdisk_id</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_ramdisk_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -960,7 +971,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">""</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_reservation_id"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-reservation-id"><strong>ansible_ec2_reservation_id</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_reservation_id" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -969,7 +980,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"r-0123456789abcdef0"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_security_groups"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-security-groups"><strong>ansible_ec2_security_groups</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_security_groups" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -979,7 +990,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"securitygroup1,securitygroup2"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_services_domain"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-services-domain"><strong>ansible_ec2_services_domain</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_services_domain" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -988,7 +999,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"amazonaws.com"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_services_partition"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-services-partition"><strong>ansible_ec2_services_partition</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_services_partition" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -999,7 +1010,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"aws"</span></code></p>
</div></td>
</tr>
-<tr class="row-odd"><td><div class="ansible-option-cell">
+<tr class="row-even"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_spot_termination_time"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-spot-termination-time"><strong>ansible_ec2_spot_termination_time</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_spot_termination_time" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
@@ -1010,7 +1021,7 @@ To check whether it is installed, run <code class="code docutils literal notrans
<p class="ansible-option-line ansible-option-sample"><strong class="ansible-option-sample-bold">Sample:</strong> <code class="ansible-option-sample docutils literal notranslate"><span class="pre">"2015-01-05T18:02:00Z"</span></code></p>
</div></td>
</tr>
-<tr class="row-even"><td><div class="ansible-option-cell">
+<tr class="row-odd"><td><div class="ansible-option-cell">
<div class="ansibleOptionAnchor" id="return-ansible_facts/ansible_ec2_user_data"></div><p class="ansible-option-title" id="ansible-collections-amazon-aws-ec2-metadata-facts-module-return-ansible-facts-ansible-ec2-user-data"><strong>ansible_ec2_user_data</strong></p>
<a class="ansibleOptionLink" href="#return-ansible_facts/ansible_ec2_user_data" title="Permalink to this return value"></a><p class="ansible-option-type-line"><span class="ansible-option-type">string</span></p>
</div></td>
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 05s |
def get_instance_tags(self, tag_keys): | ||
tags = {} | ||
for key in tag_keys: | ||
value = self._fetch("{}/{}".format(self.uri_instance_tags, key)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this information should already be lurking in self._data
, the extra fetches aren't needed. We already spit this data out under ansible_ec2_tags_instance_{key_name}
(possibly only between self.fetch(self.uri_meta)
and self._data = {}
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll update. I'm assuming we want to keep that data as is, along with the current ansible_ec2_instance_tags_keys
return value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I like the new format, but I think we need to keep the old one too.
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 53s |
@@ -13,6 +13,9 @@ | |||
- ansible_ec2_placement_availability_zone == availability_zone | |||
- ansible_ec2_security_groups == resource_prefix+"-sg" | |||
- ansible_ec2_user_data == "None" | |||
- ansible_ec2_instance_tags is defined | |||
- ansible_ec2_instance_tags | length == 3 | |||
- ansible_ec2_instance_tags.snake_case_key == "a_snake_case_value" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- ansible_ec2_instance_tags.snake_case_key == "a_snake_case_value" | |
- ansible_ec2_instance_tags.snake_case_key == "a_snake_case_value" | |
- ansible_ec2_instance_tags.camelCaseKey == "aCamelCaseValue" | |
- ansible_ec2_instance_tags.Name == resource_prefix+"-ec2-metadata-facts" |
SUMMARY
Fixes #2293
A list of instance tag keys was added to the return values in version 5.5.0. This adds a new return value that includes the full key:value pairs for the instance tags.
ISSUE TYPE
COMPONENT NAME
ec2_metadata_facts