2019-10-07 06:52:00 +00:00
|
|
|
{% set var = role.var | default({}) %}
|
|
|
|
{% if var %}
|
2019-10-15 07:54:03 +00:00
|
|
|
|
2019-10-07 06:52:00 +00:00
|
|
|
## Default Variables
|
2019-11-18 08:23:03 +00:00
|
|
|
{% for key, item in var | dictsort %}
|
2019-10-07 06:52:00 +00:00
|
|
|
|
|
|
|
### {{ 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-10-07 06:52:00 +00:00
|
|
|
|
2023-02-16 19:55:31 +00:00
|
|
|
{{ description | map("replace", "\n\n", "\n") | safe_join("\n") }}
|
2019-10-07 06:52:00 +00:00
|
|
|
{% endif %}
|
2019-10-08 09:30:31 +00:00
|
|
|
{% if item.value is defined and item.value %}
|
2019-10-07 06:52:00 +00:00
|
|
|
|
|
|
|
#### Default value
|
|
|
|
|
|
|
|
```YAML
|
2019-11-06 21:23:44 +00:00
|
|
|
{% if item.value is mapping %}
|
2019-10-07 06:52:00 +00:00
|
|
|
{{ item.value | to_nice_yaml(indent=2) }}
|
2019-11-06 21:23:44 +00:00
|
|
|
{% else %}
|
2019-11-06 22:24:08 +00:00
|
|
|
{% for ve_line in item.value %}
|
2022-02-19 13:58:35 +00:00
|
|
|
{{ ve_line | replace("\n\n", "\n") }}
|
2019-11-06 21:23:44 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
2019-10-07 06:52:00 +00:00
|
|
|
```
|
2019-10-08 09:30:31 +00:00
|
|
|
{% endif %}
|
2019-10-07 06:52:00 +00:00
|
|
|
{% 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-10-07 06:52:00 +00:00
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
```
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|