-
Notifications
You must be signed in to change notification settings - Fork 356
Fix: Improve aws_ssm documentation examples #2661
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
base: main
Are you sure you want to change the base?
Fix: Improve aws_ssm documentation examples #2661
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/aws_ssm_connection.html b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/aws_ssm_connection.html
index e4eadd1..7de2b5b 100644
--- a/home/runner/work/amazon.aws/amazon.aws/docsbuild/base/collections/amazon/aws/aws_ssm_connection.html
+++ b/home/runner/work/amazon.aws/amazon.aws/docsbuild/head/collections/amazon/aws/aws_ssm_connection.html
@@ -481,9 +481,20 @@ see <a class="reference internal" href="#ansible-collections-amazon-aws-aws-ssm-
<span class="w"> </span><span class="nt">raw</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">yum install -y awscli</span>
<span class="w"> </span><span class="nt">tags</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">aws-cli</span>
+<span class="c1"># Alternatively, you can use a tag (eg. Name) as hostname instead of InstanceID.</span>
+<span class="c1"># However, "ansible_host" must still be set to the instance_id</span>
+<span class="c1"># =======================================</span>
+<span class="c1"># # aws_ec2.yml (Dynamic Inventory - Linux)</span>
+<span class="c1"># plugin: aws_ec2</span>
+<span class="c1"># regions:</span>
+<span class="c1"># - us-east-1</span>
+<span class="c1"># hostnames:</span>
+<span class="c1"># - tag:Name # will return `tag:Name` for hostname</span>
+<span class="c1"># compose:</span>
+<span class="c1"># ansible_host: instance_id # but connection will be done to InstanceID</span>
<span class="nn">---</span>
-<span class="c1"># Execution: ansible-playbook linux.yaml -i aws_ec2.yml</span>
+<span class="c1"># Execution: ansible-playbook windows.yaml -i aws_ec2.yml</span>
<span class="c1"># =====================================================</span>
<span class="c1"># # aws_ec2.yml (Dynamic Inventory - Windows)</span>
<span class="c1"># plugin: aws_ec2</span>
|
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 51s |
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.
Thanks for this, given that if you tweak hostnames, then ansible_host needs to be set I think this is a helpful change.
Suggested some tweaks to the wording.
Co-authored-by: Mark Chappell <[email protected]>
Thank you for review and suggestions, committed them. |
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 3m 37s |
SUMMARY
I noticed that unlike aws_ec2 docs, aws_ssm connection plugin documentation doesn't mention ability to use compose to show one hostname, but connect to instance_id.
I think it would be useful to add this.
Fixes: #2652
ISSUE TYPE
COMPONENT NAME
ADDITIONAL INFORMATION
None