Split out selinux management

Currently if you have selinux enabled on the undercloud but disable it
for the overcloud, selinux is disabled on the undercloud during the
deployment. This can be resolved by only managing the selinux setting
for the deployment target hosts rather than the all.

Change-Id: I94b81ea0b954cdba7704720a145b752fa58d4308
Closes-Bug: #1874828
(cherry picked from commit 07106c501e)
This commit is contained in:
Alex Schultz 2020-04-24 08:54:30 -06:00 committed by Emilien Macchi
parent 2a67c80fd1
commit 0e2426423a
1 changed files with 8 additions and 2 deletions

View File

@ -436,8 +436,8 @@ outputs:
deploy_source_host: "DEPLOY_SOURCE_HOST"
deploy_target_host: "DEPLOY_TARGET_HOST"
- hosts: all
name: Manage SELinux and generate /etc/hosts
- hosts: DEPLOY_TARGET_HOST
name: Manage SELinux
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
any_errors_fatal: yes
tasks:
@ -445,6 +445,12 @@ outputs:
selinux:
policy: targeted
state: SELINUX_MODE
- hosts: all
name: Generate /etc/hosts
gather_facts: "{% raw %}{{ gather_facts | default(false) }}{% endraw %}"
any_errors_fatal: yes
tasks:
{% raw %}
- name: Configure Hosts Entries
include_role: