Add compatcheck role

Meant to be used by other roles
This commit is contained in:
uumas
2024-07-28 16:20:48 +03:00
parent 5d16b0a514
commit bad1da0783
4 changed files with 64 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
{%- set distros = [] -%}
{%- for distro in compatcheck_supported_distributions -%}
{%- if distro.version_min is defined -%}
{%- if distro.version_max is defined -%}
{{ distros.append(distro.name | capitalize + ' ' + distro.version_min | string + '-' + distro.version_max | string) }}
{%- else -%}
{{ distros.append(distro.name | capitalize + ' ' + distro.version_min | string + '+') }}
{%- endif -%}
{%- elif distro.version_max is defined -%}
{{ distros.append(distro.name | capitalize + ' <' + distro.version_max | string) }}
{%- else -%}
{{ distros.append(distro.name | capitalize) }}
{%- endif -%}
{%- endfor -%}
This role only supports {{ distros | join(', ') }} (You are running {{ ansible_distribution }} {{ ansible_distribution_major_version }})