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

how to generate readme (rst) doc for example_module.py ? #337

Closed
116davinder opened this issue Dec 18, 2020 · 5 comments
Closed

how to generate readme (rst) doc for example_module.py ? #337

116davinder opened this issue Dec 18, 2020 · 5 comments

Comments

@116davinder
Copy link
Contributor

116davinder commented Dec 18, 2020

SUMMARY

does anyone knows how to generate documentation readme ( rst ) from ansible module.py
is there any ansible utility which generates these readme files.

I have tried ansible-doc -t module example_module but doesn't seem to generating same type of output.

Example:
from: https://github.com/ansible-collections/community.aws/blob/main/plugins/modules/aws_acm_info.py
to: https://github.com/ansible-collections/community.aws/blob/main/docs/community.aws.aws_acm_info_module.rst

@116davinder 116davinder changed the title how to generate readme (rst) doc for module.py ? how to generate readme (rst) doc for example_module.py ? Dec 18, 2020
@116davinder
Copy link
Contributor Author

@tremble / @markuman , do you guys have any information about this utility/tool ?

@tremble
Copy link
Contributor

tremble commented Dec 21, 2020

@116davinder I generally don't generate them: @jillr creates them as a part of the release process (#327). @jillr or @felixfontein may be able to point you to the relevant documentation.

@Akasurde
Copy link
Member

@116davinder You can use https://github.com/ansible-network/collection_prep/blob/master/collection_prep/cmd/add_docs.py for generating py -> rst.

#  python add_docs.py -p /<PATH>/collections/ansible_collections/community/aws -b main

@felixfontein
Copy link
Contributor

@tremble I can't, because I'm not really know that tool either. I think it's a tool specific to the Ansible collections team.

@116davinder
Copy link
Contributor Author

thanks a lot @Akasurde for pointing out, I checked only general and aws repository for this add_docs.py

alinabuzachis pushed a commit to alinabuzachis/community.aws that referenced this issue May 25, 2022
…ollections#337)

ec2_eni: Fix idempotency when security_groups is specified

SUMMARY

If security_groups attribute is specified - module always returns Changed = True.
Fixes ansible-collections#255.

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME

ec2_eni
ADDITIONAL INFORMATION



Example:
- amazon.aws.ec2_eni:
    name: my-eni
    security_groups:
      - my-sg
    subnet_id: subnet-123456

Will always return Changed = True.

Reviewed-by: Jill R <None>
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

No branches or pull requests

4 participants