Merge "Retire the undercloud-selinux-mode validation"

This commit is contained in:
Zuul 2019-04-26 22:16:26 +00:00 committed by Gerrit Code Review
commit 2be2f9dc5b
1 changed files with 0 additions and 35 deletions

View File

@ -1,35 +0,0 @@
---
- hosts: undercloud
vars:
metadata:
name: Undercloud SELinux Enforcing Mode Check
description: >
Check if the Undercloud is running SELinux in Enforcing mode.
groups:
- prep
- pre-introspection
tasks:
- name: Get current SELinux mode
command: getenforce
become: true
register: sestatus
changed_when: False
- name: Fail if SELinux is not in Enforced mode (RHEL)
fail:
msg: >-
SELinux is running in {{ sestatus.stdout }} mode on the Undercloud.
Ensure that SELinux is enabled and running in Enforcing mode.
when:
- "sestatus.stdout != 'Enforcing'"
- "ansible_distribution == 'RedHat'"
- name: Warn if SELinux is not in Enforced mode (CentOS)
warn:
msg: >-
SELinux is running in {{ sestatus.stdout }} mode on the Undercloud.
Ensure that SELinux is enabled and running in Enforcing mode.
when:
- "sestatus.stdout != 'Enforcing'"
- "ansible_distribution == 'CentOS'"