Use osp_release flag to set selinux mode

In Upstream and rdo-cloud tripleo ci jobs on RHEL & CentOS, we
use selinux mode to permissive but currently it is harded for
CentOS only.

In Downstream jobs, we use enforcing mode. So instead of depending
upon ansible_distribution, we can rely on osp_release to toggle
selinux mode and will work for both centOS and RHEL.

Related-Bug: 1853028

Change-Id: I6a6449777ea28198002b8c028a345ab16b733901
Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
This commit is contained in:
Chandan Kumar (raukadah) 2019-12-16 14:05:38 +05:30
parent 975467dc9e
commit 17282f8d60
2 changed files with 6 additions and 6 deletions

View File

@ -183,8 +183,8 @@ resource_registry_args:
# We disable selinux when running under CentOS. It's enabled for RHEL
overcloud_selinux_enabled: >-
{% if ansible_distribution == 'CentOS' -%}
permissive
{%- else -%}
{% if osp_release is defined -%}
enforcing
{%- else -%}
permissive
{%- endif -%}

View File

@ -85,10 +85,10 @@ default_undercloud_roles_data_path: "{{ undercloud_templates_path }}/roles_data_
# We disable selinux when running under CentOS. It's enabled for RHEL
undercloud_selinux_enabled: >-
{% if ansible_distribution == 'CentOS' -%}
false
{%- else -%}
{% if osp_release is defined -%}
true
{%- else -%}
false
{%- endif -%}
undercloud_container_cli: >-