diff --git a/roles/overcloud-deploy/defaults/main.yml b/roles/overcloud-deploy/defaults/main.yml index e67b011d8..3c807df77 100644 --- a/roles/overcloud-deploy/defaults/main.yml +++ b/roles/overcloud-deploy/defaults/main.yml @@ -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 -%} diff --git a/roles/undercloud-deploy/defaults/main.yml b/roles/undercloud-deploy/defaults/main.yml index d40c6bac6..bf4935784 100644 --- a/roles/undercloud-deploy/defaults/main.yml +++ b/roles/undercloud-deploy/defaults/main.yml @@ -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: >-