diff --git a/resources/attributes/default.rb b/resources/attributes/default.rb index 750209b..165cc75 100644 --- a/resources/attributes/default.rb +++ b/resources/attributes/default.rb @@ -40,6 +40,7 @@ default['redborder']['services'] = {} default['redborder']['services']['chef-client'] = true default['redborder']['services']['chrony'] = true +default['redborder']['services']['firewall'] = true default['redborder']['services']['f2k'] = true default['redborder']['services']['k2http'] = true default['redborder']['services']['kafka'] = true @@ -58,6 +59,7 @@ default['redborder']['systemdservices']['chef-client'] = ['chef-client'] default['redborder']['systemdservices']['chrony'] = ['chronyd'] +default['redborder']['systemdservices']['firewall'] = ['firewalld'] default['redborder']['systemdservices']['f2k'] = ['f2k'] default['redborder']['systemdservices']['k2http'] = ['k2http'] default['redborder']['systemdservices']['kafka'] = ['kafka'] diff --git a/resources/metadata.rb b/resources/metadata.rb index 447b6ec..8a57d6b 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -26,3 +26,4 @@ depends 'rbcgroup' depends 'rb-clamav' depends 'rb-chrony' +depends 'rb-firewall' diff --git a/resources/recipes/configure.rb b/resources/recipes/configure.rb index 43a7591..6e305f1 100644 --- a/resources/recipes/configure.rb +++ b/resources/recipes/configure.rb @@ -26,6 +26,14 @@ end end +rb_firewall_config 'Configure Firewall' do + if proxy_services['firewall'] + action :add + else + action :remove + end +end + zookeeper_config 'Configure Zookeeper' do port node['zookeeper']['port'] memory node['redborder']['memory_services']['zookeeper']['memory']