Skip to content

Commit

Permalink
add argument spec and updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rndmh3ro committed Dec 6, 2023
1 parent b516728 commit d8f1a3c
Show file tree
Hide file tree
Showing 5 changed files with 2,127 additions and 252 deletions.
72 changes: 72 additions & 0 deletions .aar_doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
output_template: |
<!-- BEGIN_ANSIBLE_DOCS -->
# Ansible Role: {{ role }}
---
{%- if "version" in galaxy_collection %}
Version: {{ galaxy_collection.version }}
{% endif %}
{{ metadata.galaxy_info.description }}
{% if ("galaxy_tags" in metadata.galaxy_info) and (metadata.galaxy_info.galaxy_tags | length > 0) %}
Tags: {{ metadata.galaxy_info.galaxy_tags | join(', ') }}
{%- endif %}
## Requirements
---
| Platform | Versions |
| -------- | -------- |
{%- for platform in metadata.galaxy_info.platforms %}
| {{ platform.name }} | {{ platform.versions | default([]) | join(', ') }} |
{%- endfor %}
## Supported Operating Systems
{%- for platform in metadata.galaxy_info.platforms %}
- {{ platform.name }}
{%- if "versions" in platform %}
- {{ platform.versions | default([]) | join(', ') }}
{%- endif %}
{%- endfor %}
## Role Variables
{% for entrypoint in argument_specs.keys() %}
{%- set path, options=entrypoint_options[entrypoint][0] -%}
{%- for name, details in options.items() |sort() %}
- `{{ name }}`:
- Default: `{{ details.display_default }}`
- Description: {{ details.display_description }}
- Type: {{ details.display_type }}
- Required: {{ details.display_required }}
{% if details.options -%}
- Options:
{% for key, value in details.options.items() %}
- `{{ key }}`:
- description:
{% for line in value.description %}
- "{{ line }}"
{% endfor %}
{%- if value.choices %}
- Choices:
{%- for choice in value.choices %}
- {{ choice }}
{%- endfor %}
{%- endif %}
- default: "{{ value.default }}"
- type: "{{ value.type }}"
- required: "{{ value.display_required }}"
{% endfor %}
{%- endif %}
{%- endfor %}
{%- endfor %}
## Dependencies
{%- if ("dependencies" in metadata) and (metadata.dependencies | length > 0) %}
{%- for dependency in metadata.dependencies %}
- {{ dependency }}
{%- endfor %}
{%- else %}
None.
{%- endif %}
<!-- END_ANSIBLE_DOCS -->
Loading

0 comments on commit d8f1a3c

Please sign in to comment.