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

Use antsibull-docs-parser to render semantic markup #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felixfontein
Copy link

@felixfontein felixfontein commented Apr 14, 2023

Uses the Python library antsibull-docs-parser (https://github.com/ansible-community/antsibull-docs-parser) to render Ansible markup, including the new semantic markup.

The plain RST created by antsibull-docs-parser is slightly different from the one created by the original code:

diff -r docs.orig/community.dns.hetzner_dns_record_module.rst docs/community.dns.hetzner_dns_record_module.rst
21c21
< - If you do not want to add/remove values, but replace values, you will be interested in modifying a **record set** and not a single record. This is in particular important when working with ``CNAME`` and ``SOA`` records. Use the :ref:`community.dns.hetzner_dns_record_set <community.dns.hetzner_dns_record_set_module>` module for working with record sets.
---
> - If you do not want to add/remove values, but replace values, you will be interested in modifying a \ :strong:`record set`\  and not a single record. This is in particular important when working with \ :literal:`CNAME`\  and \ :literal:`SOA`\  records. Use the \ :ref:`community.dns.hetzner\_dns\_record\_set <ansible_collections.community.dns.hetzner_dns_record_set_module>`\  module for working with record sets.
diff -r docs.orig/community.dns.hetzner_dns_record_sets_module.rst docs/community.dns.hetzner_dns_record_sets_module.rst
21c21
< - It is possible to ignore certain record sets by specifying *ignore: true* for that record set.
---
> - It is possible to ignore certain record sets by specifying \ :emphasis:`ignore: true`\  for that record set.
23c23
< - With the *purge* option, it is also possible to delete existing record sets that are not mentioned in the module parameters. With this, it is possible to synchronize the expected state of a DNS zone with the expected state.
---
> - With the \ :emphasis:`purge`\  option, it is also possible to delete existing record sets that are not mentioned in the module parameters. With this, it is possible to synchronize the expected state of a DNS zone with the expected state.
diff -r docs.orig/community.dns.hetzner_dns_records_inventory.rst docs/community.dns.hetzner_dns_records_inventory.rst
20c20
< - For Ansible to be able to identify a YAML file as an inventory for this plugin, the inventory file must contain ``plugin: community.dns.hetzner_dns_records`` and its filename must end with ``hetzner_dns.yaml`` or ``hetzner_dns.yml``
---
> - For Ansible to be able to identify a YAML file as an inventory for this plugin, the inventory file must contain \ :literal:`plugin: community.dns.hetzner\_dns\_records`\  and its filename must end with \ :literal:`hetzner\_dns.yaml`\  or \ :literal:`hetzner\_dns.yml`\ 
230,231c230,231
<    - The provider-specific *hetzner_token* option can be templated.
<    - The *zone_name* and *zone_id* options can be templated.
---
>    - The provider-specific \ :emphasis:`hetzner\_token`\  option can be templated.
>    - The \ :emphasis:`zone\_name`\  and \ :emphasis:`zone\_id`\  options can be templated.
diff -r docs.orig/community.dns.hosttech_dns_record_module.rst docs/community.dns.hosttech_dns_record_module.rst
21c21
< - If you do not want to add/remove values, but replace values, you will be interested in modifying a **record set** and not a single record. This is in particular important when working with ``CNAME`` and ``SOA`` records. Use the :ref:`community.dns.hosttech_dns_record_set <community.dns.hosttech_dns_record_set_module>` module for working with record sets.
---
> - If you do not want to add/remove values, but replace values, you will be interested in modifying a \ :strong:`record set`\  and not a single record. This is in particular important when working with \ :literal:`CNAME`\  and \ :literal:`SOA`\  records. Use the \ :ref:`community.dns.hosttech\_dns\_record\_set <ansible_collections.community.dns.hosttech_dns_record_set_module>`\  module for working with record sets.
23c23
< - This module replaces ``hosttech_dns_record`` from community.dns before 2.0.0.
---
> - This module replaces \ :literal:`hosttech\_dns\_record`\  from community.dns before 2.0.0.
diff -r docs.orig/community.dns.hosttech_dns_record_set_info_module.rst docs/community.dns.hosttech_dns_record_set_info_module.rst
21c21
< - This module was renamed from ``community.dns.hosttech_dns_record_info`` to ``community.dns.hosttech_dns_record_set_info`` in community.dns 2.0.0.
---
> - This module was renamed from \ :literal:`community.dns.hosttech\_dns\_record\_info`\  to \ :literal:`community.dns.hosttech\_dns\_record\_set\_info`\  in community.dns 2.0.0.
diff -r docs.orig/community.dns.hosttech_dns_record_set_module.rst docs/community.dns.hosttech_dns_record_set_module.rst
21c21
< - This module replaces ``hosttech_dns_record`` from community.dns before 2.0.0.
---
> - This module replaces \ :literal:`hosttech\_dns\_record`\  from community.dns before 2.0.0.
diff -r docs.orig/community.dns.hosttech_dns_record_sets_module.rst docs/community.dns.hosttech_dns_record_sets_module.rst
21c21
< - It is possible to ignore certain record sets by specifying *ignore: true* for that record set.
---
> - It is possible to ignore certain record sets by specifying \ :emphasis:`ignore: true`\  for that record set.
23,24c23,24
< - This module replaces ``hosttech_dns_records`` from community.dns before 2.0.0.
< - With the *purge* option, it is also possible to delete existing record sets that are not mentioned in the module parameters. With this, it is possible to synchronize the expected state of a DNS zone with the expected state.
---
> - This module replaces \ :literal:`hosttech\_dns\_records`\  from community.dns before 2.0.0.
> - With the \ :emphasis:`purge`\  option, it is also possible to delete existing record sets that are not mentioned in the module parameters. With this, it is possible to synchronize the expected state of a DNS zone with the expected state.
diff -r docs.orig/community.dns.hosttech_dns_records_inventory.rst docs/community.dns.hosttech_dns_records_inventory.rst
20c20
< - For Ansible to be able to identify a YAML file as an inventory for this plugin, the inventory file must contain ``plugin: community.dns.hosttech_dns_records`` and its filename must end with ``hosttech_dns.yaml`` or ``hosttech_dns.yml``
---
> - For Ansible to be able to identify a YAML file as an inventory for this plugin, the inventory file must contain \ :literal:`plugin: community.dns.hosttech\_dns\_records`\  and its filename must end with \ :literal:`hosttech\_dns.yaml`\  or \ :literal:`hosttech\_dns.yml`\ 
273,274c273,274
<    - The provider-specific *hosttech_username*, *hosttech_password*, and *hosttech_token* options can be templated.
<    - The *zone_name* and *zone_id* options can be templated.
---
>    - The provider-specific \ :emphasis:`hosttech\_username`\ , \ :emphasis:`hosttech\_password`\ , and \ :emphasis:`hosttech\_token`\  options can be templated.
>    - The \ :emphasis:`zone\_name`\  and \ :emphasis:`zone\_id`\  options can be templated.
diff -r docs.orig/community.dns.wait_for_txt_module.rst docs/community.dns.wait_for_txt_module.rst
20c20
< - Wait for TXT entries with specific values to show up on **all** authoritative nameservers for the DNS name.
---
> - Wait for TXT entries with specific values to show up on \ :strong:`all`\  authoritative nameservers for the DNS name.
28c28
< - dnspython >= 1.15.0 (maybe older versions also work)
---
> - dnspython \>= 1.15.0 (maybe older versions also work)

This are the docs generated from the community.dns collection.

(I marked this as a draft since I want to wait a bit until antsibull-docs-parser reaches 1.0.0 before making this ready.)

@felixfontein
Copy link
Author

This is now ready for review!

@felixfontein
Copy link
Author

Ping @Qalthos @NilashishC @goneri - not sure who is the correct person to bug, so I thought I'll ping you all since you all were working on this repo in the past :)

@mariolenz
Copy link
Contributor

I can't say anything about the code because I'm not really into it... but this sounds like a good idea. I think this would make it easier to implement semantic markup for collections using collection_prep to generate local rst docs files.

Any chance to get this merged now that @goneri approved?

@mariolenz
Copy link
Contributor

Any news on this?

@felixfontein
Copy link
Author

@Qalthos @NilashishC ping

@felixfontein felixfontein force-pushed the semantic-markup branch 2 times, most recently from f0cfeab to 89bf21a Compare March 16, 2024 11:17
@felixfontein
Copy link
Author

The remaining CI failures seem to be unrelated to this PR.

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