2019-11-26 15:40:55 +00:00
|
|
|
{% set var = role.var | default({}) %}
|
|
|
|
{% if var %}
|
|
|
|
|
|
|
|
## Default Variables
|
|
|
|
{% for key, item in var | dictsort %}
|
|
|
|
|
|
|
|
### {{ key }}
|
|
|
|
{% if item.description is defined and item.description %}
|
2023-02-16 19:55:31 +00:00
|
|
|
{% set description = [item.description] if item.description is string else item.description %}
|
2019-11-26 15:40:55 +00:00
|
|
|
|
2023-02-16 19:55:31 +00:00
|
|
|
{{ description | map("replace", "\n\n", "\n") | safe_join("\n") }}
|
2019-11-26 15:40:55 +00:00
|
|
|
{% endif %}
|
2023-06-14 14:47:44 +00:00
|
|
|
{% if item.deprecated is defined or item.type is defined %}
|
|
|
|
|
|
|
|
{% if item.deprecated is defined %}
|
|
|
|
{% set deprecated = [item.deprecated] if item.deprecated is string else item.deprecated %}
|
|
|
|
{% set deprecated_string = deprecated | map("replace", "\n\n", "\n") | safe_join("\n") %}
|
|
|
|
|
|
|
|
{% if deprecated_string %}
|
|
|
|
**_Deprecated:_** {{ deprecated_string }}<br />
|
|
|
|
{% else %}
|
|
|
|
**_Deprecated_**<br />
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% if item.type is defined and item.type %}
|
|
|
|
{% set type = [item.type] if item.type is string else item.type %}
|
|
|
|
**_Type:_** {{ type | map("replace", "\n\n", "\n") | safe_join("\n") }}<br />
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2019-11-26 15:40:55 +00:00
|
|
|
{% if item.value is defined and item.value %}
|
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
{% if item.value is mapping %}
|
|
|
|
{{ item.value | to_nice_yaml(indent=2) }}
|
|
|
|
{% else %}
|
|
|
|
{% for ve_line in item.value %}
|
2022-02-19 13:58:35 +00:00
|
|
|
{{ ve_line | replace("\n\n", "\n") }}
|
2019-11-26 15:40:55 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
```
|
|
|
|
{% endif %}
|
|
|
|
{% if item.example is defined and item.example %}
|
|
|
|
|
|
|
|
#### Example usage
|
|
|
|
|
|
|
|
```YAML
|
|
|
|
{% if item.example is mapping %}
|
|
|
|
{{ item.example | to_nice_yaml(indent=2) }}
|
|
|
|
{% else %}
|
|
|
|
{% for ex_line in item.example %}
|
2022-02-19 13:58:35 +00:00
|
|
|
{{ ex_line | replace("\n\n", "\n") }}
|
2019-11-26 15:40:55 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
```
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|