From 161fa85ce06e4db3ab8cbff1eaacc0228beb0dd2 Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Wed, 7 Dec 2016 17:47:03 +0000 Subject: [PATCH] Strict variables fix for selinux_config_mode Fixes #GH-325 --- manifests/proxy.pp | 2 +- manifests/server.pp | 2 +- manifests/web.pp | 2 +- spec/default_facts.yml | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/manifests/proxy.pp b/manifests/proxy.pp index 5e88be9fe..822c6126f 100644 --- a/manifests/proxy.pp +++ b/manifests/proxy.pp @@ -607,7 +607,7 @@ } # check if selinux is active and allow zabbix - if $::osfamily == 'RedHat' and $::selinux_config_mode == 'enforcing' { + if $::osfamily == 'RedHat' and getvar('::selinux_config_mode') == 'enforcing' { selboolean{'zabbix_can_network': persistent => true, value => 'on', diff --git a/manifests/server.pp b/manifests/server.pp index dc8ceb5a9..81a7e0756 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -535,7 +535,7 @@ } # check if selinux is active and allow zabbix - if $::selinux_config_mode == 'enforcing' { + if getvar('::selinux_config_mode') == 'enforcing' { selboolean{'zabbix_can_network': persistent => true, value => 'on', diff --git a/manifests/web.pp b/manifests/web.pp index e193947e2..9d200ec42 100644 --- a/manifests/web.pp +++ b/manifests/web.pp @@ -463,7 +463,7 @@ } # END if $manage_vhost # check if selinux is active and allow zabbix - if $::osfamily == 'RedHat' and $::selinux_config_mode == 'enforcing' { + if $::osfamily == 'RedHat' and getvar('::selinux_config_mode') == 'enforcing' { selboolean{'httpd_can_connect_zabbix': persistent => true, value => 'on', diff --git a/spec/default_facts.yml b/spec/default_facts.yml index a3f52bfda..4f365061b 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -3,4 +3,3 @@ concat_basedir: "/tmp" ipaddress: "172.16.254.254" is_pe: false macaddress: "AA:AA:AA:AA:AA:AA" -selinux_config_mode: "disabled"