Add example role to base other roles on

This commit is contained in:
uumas
2024-07-28 16:21:39 +03:00
parent 92e297f15e
commit 35c696e7d4
3 changed files with 32 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
---
example_ping: false

View File

@@ -0,0 +1,13 @@
---
argument_specs:
main:
short_description: Example role.
description:
- This role is just an example.
- It pings the host, if example_ping is set to true.
options:
example_ping:
description: This role does nothing, unless this is set to true
type: bool
required: false
default: false

View File

@@ -0,0 +1,17 @@
---
- name: Ensure host distribution is supported
ansible.builtin.import_role:
name: compatcheck
vars:
compatcheck_supported_distributions:
- name: debian
version_min: 8
- name: archlinux
- name: ubuntu
version_min: 16
- name: fedora
version_min: 29
- name: Ping
ansible.builtin.ping:
when: example_ping