Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ansible
example
Commits
595d8492
Commit
595d8492
authored
7 years ago
by
nimrod
Browse files
Options
Downloads
Plain Diff
Merge branch 'ft/meta_assertions'
parents
4555313c
101029e8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
meta/main.yml
+1
-1
1 addition, 1 deletion
meta/main.yml
tasks/main.yml
+8
-2
8 additions, 2 deletions
tasks/main.yml
with
9 additions
and
3 deletions
meta/main.yml
+
1
−
1
View file @
595d8492
...
...
@@ -7,7 +7,7 @@ galaxy_info:
platforms
:
-
name
:
OpenBSD
versions
:
-
6.0
-
'
6.0
'
-
name
:
Ubuntu
versions
:
-
xenial
...
...
This diff is collapsed.
Click to expand it.
tasks/main.yml
+
8
−
2
View file @
595d8492
---
# tasks file for example
-
name
:
Load meta vars
include_vars
:
file
:
meta/main.yml
name
:
meta
-
name
:
Assertions
assert
:
that
:
-
ansible_os_family in ['OpenBSD', 'Debian']
-
ansible_lsb.codename in ['xenial', 'trusty', 'precise', 'stretch', 'jessie', 'wheezy'] or ansible_distribution_version in ['6.0']
-
ansible_distribution in meta.galaxy_info.platforms|map(attribute='name')
-
|
(meta.galaxy_info.platforms|selectattr('name', 'equalto', ansible_distribution)|first).versions|intersect([ansible_distribution_release, ansible_distribution_version])|length > 0
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment