From ac5be9605f4801996a20c5e86b796fcb65dacb0b Mon Sep 17 00:00:00 2001 From: Logan McNaughton Date: Fri, 2 Aug 2013 14:00:15 +0000 Subject: [PATCH] Proper selinux logic for Horizon According to here: http://docs.puppetlabs.com/learning/variables.html "all facts are strings, and all non-empty strings, including the string "false" . are true" Checking "if $::selinux" will always return true, just like (if 'hello':) in python will always return true. This uses str2bool to ensure that the variable is evaluated as a boolean. Change-Id: I9489c3bd9a217c80762f5875f026676268572d79 --- manifests/horizon.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/horizon.pp b/manifests/horizon.pp index 39eba7c..a3f6dd3 100644 --- a/manifests/horizon.pp +++ b/manifests/horizon.pp @@ -101,7 +101,7 @@ class openstack::horizon ( api_result_limit => $api_result_limit, } - if $::selinux and $::selinux != 'false' { + if str2bool($::selinux) { selboolean{'httpd_can_network_connect': value => on, persistent => true,