feat: add role requirements to templates (#463)

This commit is contained in:
Germain Lefebvre 2023-03-27 21:04:56 +02:00 committed by GitHub
parent d47427e128
commit 26d7a3cb8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,8 @@
## Requirements
{% if meta | deep_get(meta, "min_ansible_version.value") %}
- Minimum Ansible version: `{{ meta.min_ansible_version.value }}`
{% else %}
None.
{% endif %}

View File

@ -1,3 +1,4 @@
- [Requirements](#requirements)
{% set var = role.var | default({}) %}
{% if var %}
- [Default Variables](#default-variables)

View File

@ -19,6 +19,9 @@ summary: {{ meta.summary.value | safe_join(" ") }}
{# TOC #}
{% include '_toc.j2' %}
{# Requirements #}
{% include '_requirements.j2' %}
{# Vars #}
{% include '_vars.j2' %}

View File

@ -11,6 +11,9 @@
{# TOC #}
{% include '_toc.j2' %}
{# Requirements #}
{% include '_requirements.j2' %}
{# Vars #}
{% include '_vars.j2' %}

View File

@ -0,0 +1,8 @@
## Requirements
{% if meta | deep_get(meta, "min_ansible_version.value") %}
- Minimum Ansible version: `{{ meta.min_ansible_version.value }}`
{% else %}
None.
{% endif %}

View File

@ -1,5 +1,6 @@
## Table of content
- [Requirements](#requirements)
{% set var = role.var | default({}) %}
{% if var %}
- [Default Variables](#default-variables)