This repository has been archived on 2024-05-02. You can view files and clone it, but cannot push or open issues or pull requests.
omni-ansible/playbooks/dependencies.yml

52 lines
1.4 KiB
YAML
Raw Normal View History

---
- name: Check meta environment
hosts: all
2019-11-23 19:30:39 +00:00
tags:
- always
- initialize
tasks:
- name: Check required operating system
when: required_os is defined
assert:
that:
- required_os.split("_")[0] == ansible_distribution | lower
- required_os.split("_")[1] == ansible_distribution_major_version
fail_msg: "Host does not meet required OS specified"
success_msg: "Required OS validation succeeded"
- name: Ansible python bindings
hosts: all
tags:
- always
- initialize
tasks:
- name: Install CentOS 8 python bindings
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8"
2019-11-23 19:30:39 +00:00
become: true
dnf:
state: latest
name:
- python3-libselinux
- python3-policycoreutils
- python3-firewall
- name: Install CentoOS 7 python bindings
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
become: true
yum:
state: latest
name:
- libselinux-python
- policycoreutils-python
- python3-firewall
2019-11-23 19:30:39 +00:00
- name: Install Fedora python bindings
when: ansible_distribution == "Fedora"
2019-11-23 19:30:39 +00:00
become: true
dnf:
state: latest
name:
- libselinux-python
- policycoreutils-python
- python3-firewall