ansible-doctor/ansibledoctor/templates/readme/_vars.j2

36 lines
656 B
Plaintext
Raw Normal View History

2019-10-07 06:52:00 +00:00
{% set var = role.var | default({}) %}
{% if var %}
## Default Variables
2019-10-08 11:24:11 +00:00
{% for key, item in var.items() %}
2019-10-07 06:52:00 +00:00
### {{ key }}
{% if item.description is defined and item.description %}
{{ item.description | join(" ") | striptags }}
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
{{ item.value | to_nice_yaml(indent=2) }}
```
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 %}
{{ ex_line }}
{% endfor %}
{% endif %}
```
{% endif %}
{% endfor %}
{% endif %}