diff --git a/README.md b/README.md index dab5f7e..a1aa402 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,6 @@ This script loads input from: - molecule/default/verify.yml - meta/logo.png - generate_modules.sh -- compatibility.sh - Ansible Galaxy (Items with a star are mandatory) diff --git a/generate.yml b/generate.yml index 70c58eb..b520ba4 100755 --- a/generate.yml +++ b/generate.yml @@ -134,13 +134,6 @@ file: "{{ role_path }}/.travis.yml" name: travis - - name: load compatibility - command: "{{ playbook_dir }}/scripts/compatibility.sh" - args: - chdir: "{{ role_path }}" - register: compatibility - changed_when: no - - name: create .github directory file: path: "{{ role_path }}/.github" diff --git a/scripts/compatibility.sh b/scripts/compatibility.sh deleted file mode 100755 index 7d6c780..0000000 --- a/scripts/compatibility.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -echo "This role has been tested on these [container images](https://hub.docker.com/):" -echo "" -echo "|container|tag|allow_failures|" -echo "|---------|---|--------------|" - -cat .travis.yml | docker run -i --rm jlordiales/jyparser get ".env.matrix" | while read dash distribution tag rest ; do - distribution=$(echo ${distribution} | cut -d\" -f2) - tag=$(echo ${tag} | cut -d\" -f2) - allow_failures=$(cat .travis.yml | docker run -i --rm jlordiales/jyparser get .matrix.allow_failures | grep ${distribution} | grep ${tag} > /dev/null 2>&1 ; if [ "$?" == 0 ] ; then echo "yes" ; else echo "no" ; fi) - echo "|${distribution}|${tag:-latest}|${allow_failures}|" -done - -echo - -echo "This role has been tested on these Ansible versions:" -echo - -echo "- $(grep ' previous' tox.ini | awk '{print $2, $3}')" -echo "- $(grep ' current' tox.ini | awk '{print $2}')" -echo "- $(grep ' next' tox.ini | awk '{print $2}')" - -echo diff --git a/templates/README.md.j2 b/templates/README.md.j2 index e59ca79..849250a 100644 --- a/templates/README.md.j2 +++ b/templates/README.md.j2 @@ -65,7 +65,19 @@ Here is an overview of related roles: Compatibility ------------- -{{ compatibility.stdout }} +This role has been tested on these [container images](https://hub.docker.com/): + +|container|tags| +|---------|----| +{% for platform in meta.galaxy_info.platforms %} +|{{ platform.name | lower }}|{% for version in platform.versions %}{{ version }}{% if not loop.last %}, {% endif %}{% endfor %}| +{% endfor %} + +The minimum version of Ansible required is {{ meta.galaxy_info.min_ansible_version }} but tests have been done to: + +- The previous version, on version lower. +- The current version. +- The development version. {% if exceptions is defined %} Exceptions