Skip to content

Commit

Permalink
Add ansible_version (#177)
Browse files Browse the repository at this point in the history
Import from osism/testbed

Related: osism/issues#1133

Signed-off-by: Sven Kieske <kieske@osism.tech>
  • Loading branch information
artificial-intelligence authored Sep 17, 2024
1 parent 1d6ca0c commit 518d111
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
Empty file added roles/ansible_version/README.md
Empty file.
2 changes: 2 additions & 0 deletions roles/ansible_version/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
ansible_core_version: "2.16.0"
22 changes: 22 additions & 0 deletions roles/ansible_version/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
galaxy_info:
author: Sven Kieske
description: Role osism.validations.kernel_version
company: OSISM GmbH
license: Apache License 2.0
min_ansible_version: 2.16.0
platforms:
- name: Ubuntu
versions:
- jammy
- noble
- name: Debian
versions:
- bookworm
- name: EL
versions:
- "9"
galaxy_tags:
- osism
- system
dependencies: []
5 changes: 5 additions & 0 deletions roles/ansible_version/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: "Fail if ansible-core version is lower than {{ ansible_core_version }}"
ansible.builtin.fail:
msg: "Ansible core version is {{ ansible_version.full }}, expected Ansible core version is {{ ansible_core_version }}."
when: ansible_version.full is ansible.builtin.version(ansible_core_version, '<')

0 comments on commit 518d111

Please sign in to comment.