add example

This commit is contained in:
Robert Kaussow 2019-10-08 13:43:41 +02:00
parent 751c8a6c07
commit 80a1b8e33a
4 changed files with 33 additions and 13 deletions

View File

@ -5,6 +5,9 @@
{{ description | deep_get(meta, "description.value") }} {{ description | deep_get(meta, "description.value") }}
{% endif %} {% endif %}
{# TOC #}
{% include '_toc.j2' %}
{# Vars #} {# Vars #}
{% include '_vars.j2' %} {% include '_vars.j2' %}

View File

@ -0,0 +1,14 @@
## Table of content
{% set var = role.var | default({}) %}
{% if var %}
* [Default Variables](#default-variables)
{% for key, item in var.items() %}
* [{{ key }}](#{{ key }})
{% endfor %}
{% endif %}
* [Dependencies](#dependencies)
* [License](#license)
* [Author](#author)
---

View File

@ -2,10 +2,6 @@
{% if var %} {% if var %}
## Default Variables ## Default Variables
{% for key, item in var.items() %} {% for key, item in var.items() %}
* [{{ key }}](#{{ key }})
{% endfor %}
---
{% for key, item in var.items() %}
### {{ key }} ### {{ key }}
{% if item.description is defined and item.description %} {% if item.description is defined and item.description %}

View File

@ -2,16 +2,23 @@
Role to demonstrate ansible-doctor Role to demonstrate ansible-doctor
## Default Variables ## Table of content
* [demo_role_unset](#demo_role_unset)
* [demo_role_empty](#demo_role_empty) * [Default Variables](#default-variables)
* [demo_role_single](#demo_role_single) * [demo_role_unset](#demo_role_unset)
* [demo_role_empty_dict](#demo_role_empty_dict) * [demo_role_empty](#demo_role_empty)
* [demo_role_dict](#demo_role_dict) * [demo_role_single](#demo_role_single)
* [demo_role_other_tags](#demo_role_other_tags) * [demo_role_empty_dict](#demo_role_empty_dict)
* [dockerengine_packages_extra](#dockerengine_packages_extra) * [demo_role_dict](#demo_role_dict)
* [demo_role_undefined_var](#demo_role_undefined_var) * [demo_role_other_tags](#demo_role_other_tags)
* [dockerengine_packages_extra](#dockerengine_packages_extra)
* [demo_role_undefined_var](#demo_role_undefined_var)
* [Dependencies](#dependencies)
* [License](#license)
* [Author](#author)
--- ---
## Default Variables
### demo_role_unset ### demo_role_unset