Skip to content
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 more details about compose usage #56289

Open
wants to merge 3 commits into
base: devel
from

Conversation

Projects
None yet
4 participants
@g1franc
Copy link

commented May 10, 2019

SUMMARY

Add more detail about usage of the compose argument.

ISSUE TYPE
  • Docs Pull Request
COMPONENT NAME

Inventory plug-in for AWS EC2

ADDITIONAL INFORMATION

None

@g1franc

This comment has been minimized.

Copy link
Author

commented May 10, 2019

Please add label +label: docsite_pr

@acozine
Copy link
Contributor

left a comment

Thanks @g1franc for taking the time to improve the Ansible documentation.

Could you add more detail to the PR itself? Adding a use case (what were you trying to do when you realized the documentation was incomplete?) will really help users who search for information on dynamic inventory.

Show resolved Hide resolved lib/ansible/plugins/inventory/aws_ec2.py Outdated

@acozine acozine added docsite_pr and removed needs_triage labels May 10, 2019

g1franc and others added some commits May 10, 2019

Update lib/ansible/plugins/inventory/aws_ec2.py
Typo

Co-Authored-By: Alicia Cozine <879121+acozine@users.noreply.github.com>

@ansibot ansibot removed the small_patch label May 12, 2019

@@ -134,9 +134,13 @@
prefix: aws_region
# Set individual variables with compose
compose:
# Use the private IP address to connect to the host
# Use the private IP address to connect to the host and add additional variables as hostvars
# EC2 attribute private_ip_address will be mapped to hostvars ansible_host and internal_ip_adddress

This comment has been minimized.

Copy link
@s-hertel

s-hertel May 14, 2019

Contributor

Maybe return these two lines back to the line it was before, and move # EC2 attribute private_ip_address will be mapped to hostvar internal_ip_adddress to the line before it is set for clarity.

In the line above add additional variables as hostvars seems redundant to line 135. If line 135 isn't clear, I'd modify it (maybe something like # Use jinja2 to set or override hostvars?) instead of lumping in a more general comment before setting something specific.

# (note: this does not modify inventory_hostname, which is set via I(hostnames))
ansible_host: private_ip_address
public_ip_address: public_ip_address

This comment has been minimized.

Copy link
@s-hertel

s-hertel May 14, 2019

Contributor

I don't understand why this is useful. public_ip_address host var already equals public_ip_address so this does nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.