21 lines
638 B
YAML
21 lines
638 B
YAML
---
|
|
- name: Check meta environment
|
|
hosts: all
|
|
tags:
|
|
- always
|
|
- meta
|
|
tasks:
|
|
- name: Check required operating system
|
|
when: omni_os is defined
|
|
assert:
|
|
that:
|
|
- omni_os.name == ansible_distribution | lower
|
|
- omni_os.version_major == ansible_distribution_major_version
|
|
fail_msg: "Host does not meet required OS specified"
|
|
success_msg: "Required OS validation succeeded"
|
|
|
|
- name: Enforce python interpreter
|
|
when: ansible_distribution != "CentOS" and ansible_distribution_major_version != "7"
|
|
set_fact:
|
|
ansible_python_interpreter: /usr/bin/python3
|