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

Include FQCN in module examples #48

Merged
merged 1 commit into from
May 19, 2020

Conversation

Akasurde
Copy link
Member

@Akasurde Akasurde commented May 6, 2020

SUMMARY

Signed-off-by: Abhijeet Kasurde akasurde@redhat.com

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/modules/aws_az_info.py
plugins/modules/aws_caller_info.py
plugins/modules/aws_s3.py
plugins/modules/cloudformation.py
plugins/modules/cloudformation_info.py
plugins/modules/ec2.py
plugins/modules/ec2_ami.py
plugins/modules/ec2_ami_info.py
plugins/modules/ec2_eni.py
plugins/modules/ec2_eni_info.py
plugins/modules/ec2_group.py
plugins/modules/ec2_group_info.py
plugins/modules/ec2_key.py
plugins/modules/ec2_metadata_facts.py
plugins/modules/ec2_snapshot.py
plugins/modules/ec2_snapshot_info.py
plugins/modules/ec2_tag.py
plugins/modules/ec2_tag_info.py
plugins/modules/ec2_vol.py
plugins/modules/ec2_vol_info.py
plugins/modules/ec2_vpc_dhcp_option.py
plugins/modules/ec2_vpc_dhcp_option_info.py
plugins/modules/ec2_vpc_net.py
plugins/modules/ec2_vpc_net_info.py
plugins/modules/ec2_vpc_subnet.py
plugins/modules/ec2_vpc_subnet_info.py
plugins/modules/s3_bucket.py

@@ -91,27 +91,27 @@
- set_fact:
stack_name: my-awesome-stack

- cloudformation_info:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've missed 'cloudformation_facts' on line 84 (should also be changed to cloudformation_info)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Akasurde Is this PR using https://github.com/ansible-network/collection_prep? We might need to fix update.py for info/facts (or anything symlinked) modules.

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look sane, but there's a few things missed.

Looks like some of the more unusual ways of invoking things were missed

  • A deprecated alias
  • local_action: { module: my_module ... }
  • A more complex example with multiple modules

plugins/modules/ec2.py Show resolved Hide resolved
plugins/modules/ec2.py Show resolved Hide resolved
plugins/modules/ec2_snapshot.py Show resolved Hide resolved
plugins/modules/ec2_vol.py Show resolved Hide resolved
@Akasurde Akasurde force-pushed the collection_readiness branch from f7f57de to c96bed2 Compare May 8, 2020 10:52
Copy link
Contributor

@jillr jillr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Akasurde! Just a couple small things.

@@ -91,27 +91,27 @@
- set_fact:
stack_name: my-awesome-stack

- cloudformation_info:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Akasurde Is this PR using https://github.com/ansible-network/collection_prep? We might need to fix update.py for info/facts (or anything symlinked) modules.

plugins/modules/ec2_vol.py Outdated Show resolved Hide resolved
plugins/modules/ec2_vol.py Outdated Show resolved Hide resolved
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
@Akasurde Akasurde force-pushed the collection_readiness branch from c96bed2 to becb55f Compare May 14, 2020 06:12
Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional comment:

Some of the description/option documentation also includes M(...) references, I don't think they should be updated in this change, but they're probably worth a follow up.

@@ -81,7 +81,7 @@
# in ansible_facts['cloudformation'][<stack_name>] and can be used as follows.
# Note that this is deprecated and will stop working in Ansible 2.13.

- cloudformation_facts:
- amazon.aws.cloudformation_facts:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- amazon.aws.cloudformation_facts:
- amazon.aws.cloudformation_info:

_facts is deprecated we shouldn't use it in examples

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tremble We talked about a similar example in the community.aws PR and because how the module is called affects the return and is noted as such in the comment I think it makes sense to keep this example.

@@ -359,8 +359,7 @@
assign_public_ip: yes

# Dedicated tenancy example
- local_action:
module: ec2
- amazon.aws.ec2:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jillr is it worth keeping local_action examples about?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tremble While they're most relevant to things like AWS modules, I personally don't think they belong scattered in individual module docs. I'd rather have the module docs be consistent and lean on the general Ansible docs for explaining the (many) different ways to call these types of tasks.
What do you think, @Akasurde? local_action is a bit historical, is there any context I may have missed that would make keeping these examples make sense?

Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the comments from @jillr I think we're good to go with this one.

@jillr jillr merged commit 72298ca into ansible-collections:master May 19, 2020
abikouo added a commit to abikouo/amazon.aws that referenced this pull request Oct 18, 2024
…#2164)

SUMMARY

Depends-On: ansible-collections#2319

Add some type hint for the module
Use shared code from amazon.aws.plugins.module_utils.ec2
Add the possibility to delete specific version of a launch template
Add support for tagging for launch template resource (Closes ansible-collections#176)
Add the possibility to tag specific resources, not always instance and volume (Closes [ansible-collections#48](ansible-collections#48, Closes ansible-collections#2083)
Support EBS Throughput (Closes ansible-collections#1944)
Fix issue occurring when launch template contains more than 200 versions (Closes ansible-collections#2131)

ISSUE TYPE

Feature Pull Request

COMPONENT NAME

ec2_launch_template

Reviewed-by: Alina Buzachis
Reviewed-by: Bikouo Aubin
Reviewed-by: GomathiselviS <gomathiselvi@gmail.com>

This commit was initially merged in https://github.com/ansible-collections/community.aws
See: ansible-collections/community.aws@40d61f0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants