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

30 lines
592 B
Django/Jinja

{% set meta = role.meta | default({}) %}
{% if meta %}
## Dependencies
{% if meta | deep_get(meta, "dependencies.value") %}
{% if meta.dependencies.value is mapping %}
{% set deps = meta.dependencies.value.dependencies %}
{% else %}
{% set deps = meta.dependencies.value %}
{% endif %}
{% for item in deps %}
- {{ item }}
{% endfor %}
{% else %}
None.
{% endif %}
{% if license | deep_get(meta, "license.value") %}
## License
{{ meta.license.value }}
{% endif %}
{% if author | deep_get(meta, "author.value") %}
## Author
{{ meta.author.value | save_join(" ") }}
{% endif %}
{% endif %}