add package handling for rh7 and rh8
Some checks failed
continuous-integration/drone/pr Build is failing
Some checks failed
continuous-integration/drone/pr Build is failing
This commit is contained in:
parent
f3018503a9
commit
fbd630d3eb
@ -9,4 +9,5 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
|
||||
def test_selinux_setup(host):
|
||||
assert host.command.check_output("/usr/sbin/getenforce") == "Enforcing"
|
||||
assert host.package("libselinux-python").is_installed
|
||||
assert host.package("policycoreutils-python").is_installed
|
||||
|
@ -9,4 +9,5 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
|
||||
def test_selinux_setup(host):
|
||||
assert host.command.check_output("/usr/sbin/getenforce") == "Enforcing"
|
||||
assert host.package("policycoreutils-python").is_installed
|
||||
assert host.package("libselinux-python").is_installed
|
||||
assert host.package("policycoreutils-python-utils").is_installed
|
||||
|
@ -1,2 +1,15 @@
|
||||
---
|
||||
- import_tasks: setup.yml
|
||||
- include_vars: "{{ var_files }}"
|
||||
vars:
|
||||
var_files: "{{ lookup('first_found', params, errors='ignore') }}"
|
||||
params:
|
||||
files:
|
||||
- "{{ ansible_lsb.id | default('') | lower }}.yml"
|
||||
- "{{ ansible_os_family | lower }}-{{ ansible_distribution_major_version }}.yml"
|
||||
- "{{ ansible_os_family | lower }}.yml"
|
||||
paths:
|
||||
- "vars"
|
||||
when: var_files
|
||||
|
||||
- include_tasks: overwrites.yml
|
||||
- include_tasks: setup.yml
|
||||
|
5
tasks/overwrites.yml
Normal file
5
tasks/overwrites.yml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: Define selinux_packages
|
||||
set_fact:
|
||||
selinux_packages: "{{ __selinux_packages }}"
|
||||
when: selinux_packages is not defined
|
4
vars/redhat-7.yml
Normal file
4
vars/redhat-7.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
__selinux_packages:
|
||||
- libselinux-python
|
||||
- policycoreutils-python
|
4
vars/redhat-8.yml
Normal file
4
vars/redhat-8.yml
Normal file
@ -0,0 +1,4 @@
|
||||
---
|
||||
__selinux_packages:
|
||||
- libselinux-python
|
||||
- policycoreutils-python-utils
|
Loading…
Reference in New Issue
Block a user