From 629f246a9cfd0de8d95cdf3fae76e12c837a0f72 Mon Sep 17 00:00:00 2001 From: David Vanhoucke Date: Mon, 27 Nov 2023 15:15:42 +0000 Subject: [PATCH] add rb-selinux --- resources/metadata.rb | 1 + resources/recipes/configure.rb | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/resources/metadata.rb b/resources/metadata.rb index 5d51d16a..e6c5660b 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -37,4 +37,5 @@ depends 'rbcep' depends 'cron' #depends 'ohai' +depends 'rb-selinux' depends 'rbaioutliers' diff --git a/resources/recipes/configure.rb b/resources/recipes/configure.rb index f6880f21..7cc08f5a 100644 --- a/resources/recipes/configure.rb +++ b/resources/recipes/configure.rb @@ -12,6 +12,16 @@ # manager services manager_services = manager_services() +manager_services = manager_services() + +rb_selinux_config "Configure Selinux" do + if shell_out("getenforce").stdout.chomp == "Disabled" + action :remove + else + action :add + end +end + consul_config "Configure Consul Server" do confdir node["consul"]["confdir"] datadir node["consul"]["datadir"]