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

aws_ec2 inventory example doesn't match documented type for hostnames #1460

Closed
1 task done
mdavis-xyz opened this issue Apr 18, 2023 · 0 comments · Fixed by #1582
Closed
1 task done

aws_ec2 inventory example doesn't match documented type for hostnames #1460

mdavis-xyz opened this issue Apr 18, 2023 · 0 comments · Fixed by #1582
Labels
jira needs_verified Some one might want to take a look at this and reproduce it to confirm

Comments

@mdavis-xyz
Copy link
Contributor

Summary

For aws_ec2 inventory, the documentation for hostnames says "list / elements=dictionary" with key name being required.

But in the example there's a list of union[dictionary|str]:

hostnames:
  - tag:Name=Tag1,Name=Tag2  # Return specific hosts only
  - tag:CustomDNSName
  - dns-name
  - name: 'tag:Name=Tag1,Name=Tag2'
  - name: 'private-ip-address'
    separator: '_'
    prefix: 'tag:Name'
  - name: 'test_literal' # Using literal values for hostname
    separator: '-'       # Hostname will be aws-test_literal
    prefix: 'aws'

At a glance, it looks like the example should not work, because it doesn't match the hostnames docs.
In particular, since these strings contain colons, will Ansible interpret this as {"tag": "CustomDNSName"}?

If the module allows type types of list members, one string, one dict, the documentation should say so.

Issue Type

Documentation Report

Component Name

aws_ec2 inventory

Ansible Version

N/A

Collection Versions

N/A

Configuration

N/A

OS / Environment

N/A

Additional Information

No response

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@alinabuzachis alinabuzachis added needs_verified Some one might want to take a look at this and reproduce it to confirm jira and removed needs_triage labels Apr 18, 2023
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jun 2, 2023
…e module doc (#1582)

aws_ec2 inventory : Modify accepted type for hostnames argument in the module doc

SUMMARY


Fixes #1460
The argument hostnames is of type list, whose elements can be string and dict.
ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell
Reviewed-by: Alina Buzachis
patchback bot pushed a commit that referenced this issue Jun 2, 2023
…e module doc (#1582)

aws_ec2 inventory : Modify accepted type for hostnames argument in the module doc

SUMMARY

Fixes #1460
The argument hostnames is of type list, whose elements can be string and dict.
ISSUE TYPE

Docs Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Mark Chappell
Reviewed-by: Alina Buzachis
(cherry picked from commit ee68be3)
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jun 5, 2023
…e module doc (#1582) (#1591)

[PR #1582/ee68be3d backport][stable-6] aws_ec2 inventory : Modify accepted type for hostnames argument in the module doc

This is a backport of PR #1582 as merged into main (ee68be3).
SUMMARY


Fixes #1460
The argument hostnames is of type list, whose elements can be string and dict.
ISSUE TYPE


Docs Pull Request

COMPONENT NAME

ADDITIONAL INFORMATION

Reviewed-by: Alina Buzachis
abikouo pushed a commit to abikouo/amazon.aws that referenced this issue Oct 24, 2023
…ns#1460)

* Allow to use labels from other amazon.aws docsites

Signed-off-by: Alina Buzachis <[email protected]>
Co-authored-by: Mark Chappell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira needs_verified Some one might want to take a look at this and reproduce it to confirm
Projects
None yet
2 participants