Skip to content
Snippets Groups Projects
Commit 101029e8 authored by nimrod's avatar nimrod
Browse files

- Get supported OSes, version from the meta info, modify assertion accordingly.

parent 4555313c
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ galaxy_info: ...@@ -7,7 +7,7 @@ galaxy_info:
platforms: platforms:
- name: OpenBSD - name: OpenBSD
versions: versions:
- 6.0 - '6.0'
- name: Ubuntu - name: Ubuntu
versions: versions:
- xenial - xenial
......
--- ---
# tasks file for example # tasks file for example
- name: Load meta vars
include_vars:
file: meta/main.yml
name: meta
- name: Assertions - name: Assertions
assert: assert:
that: that:
- ansible_os_family in ['OpenBSD', 'Debian'] - ansible_distribution in meta.galaxy_info.platforms|map(attribute='name')
- ansible_lsb.codename in ['xenial', 'trusty', 'precise', 'stretch', 'jessie', 'wheezy'] or ansible_distribution_version in ['6.0'] - |
(meta.galaxy_info.platforms|selectattr('name', 'equalto', ansible_distribution)|first).versions|intersect([ansible_distribution_release, ansible_distribution_version])|length > 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment