This script will generate Markdown sections from the contents of an Ansible role's meta/argument_specs.yml
in the following style:
Type | Default |
---|---|
string | default value here |
Raw, this looks like:
### `option_name`
| Type | Default |
|--------|----------------------|
| string | `default value here` |
For example, given the following meta/argument_specs.yml
:
argument_specs:
main:
...
options:
myapp_int:
type: "int"
required: false
default: 42
description:
- "The integer value, defaulting to 42."
- "This is a second paragraph."
myapp_str:
type: "str"
required: true
description: "The string value"
myapp_list:
type: "list"
elements: "str"
required: true
description: "A list of string values."
version_added: 1.3.0
The following Markdown will be generated:
Type | Default |
---|---|
int | 42 |
The integer value, defaulting to 42.
This is a second paragraph.
Type | Default |
---|---|
string | None |
The string value
Type | Default |
---|---|
list[str] | None |
A list of string values.
Raw, this looks like:
### `myapp_int`
| Type | Default |
|------|---------|
| int | `42` |
The integer value, defaulting to 42.
This is a second paragraph.
### `myapp_str`
| Type | Default |
|--------|---------|
| string | None |
The string value
### `myapp_list`
| Type | Default |
|-----------|---------|
| list[str] | None |
A list of string values.