Move compatibility to a much simpler form.

This commit is contained in:
Robert de Bock 2019-12-08 19:47:40 +01:00
parent 0f326f70da
commit a12ed2f8f8
4 changed files with 13 additions and 33 deletions

View File

@ -17,7 +17,6 @@ This script loads input from:
- molecule/default/verify.yml - molecule/default/verify.yml
- meta/logo.png - meta/logo.png
- generate_modules.sh - generate_modules.sh
- compatibility.sh
- Ansible Galaxy - Ansible Galaxy
(Items with a star are mandatory) (Items with a star are mandatory)

View File

@ -134,13 +134,6 @@
file: "{{ role_path }}/.travis.yml" file: "{{ role_path }}/.travis.yml"
name: travis name: travis
- name: load compatibility
command: "{{ playbook_dir }}/scripts/compatibility.sh"
args:
chdir: "{{ role_path }}"
register: compatibility
changed_when: no
- name: create .github directory - name: create .github directory
file: file:
path: "{{ role_path }}/.github" path: "{{ role_path }}/.github"

View File

@ -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

View File

@ -65,7 +65,19 @@ Here is an overview of related roles:
Compatibility 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 %} {% if exceptions is defined %}
Exceptions Exceptions