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

42 lines
813 B
Plaintext
Raw Normal View History

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