Skip to content

Commit

Permalink
added conditional check on pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsver committed May 14, 2024
1 parent d5b04ab commit f66e148
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,15 +275,21 @@
action (manager_services["pmacct"] ? [:add, :register] : [:remove, :deregister])
end

logstash_config "Configure logstash" do
cdomain node["redborder"]["cdomain"]
flow_nodes node["redborder"]["all_flow_sensors_info"]["flow-sensor"]
namespaces node["redborder"]["namespaces"]
vault_nodes node["redborder"]["sensors_info_all"]["vault-sensor"]
scanner_nodes node["redborder"]["sensors_info_all"]["scanner-sensor"]
device_nodes node["redborder"]["sensors_info_all"]["device-sensor"]
logstash_pipelines node["redborder"]["logstash"]["pipelines"]
action (manager_services["logstash"] ? [:add, :register] : [:remove, :deregister])
if node["redborder"]["logstash"]["pipelines"].nil? || node["redborder"]["logstash"]["pipelines"].empty?
service 'logstash' do
action [:disable, :stop]
end
else
logstash_config "Configure logstash" do
cdomain node["redborder"]["cdomain"]
flow_nodes node["redborder"]["all_flow_sensors_info"]["flow-sensor"]
namespaces node["redborder"]["namespaces"]
vault_nodes node["redborder"]["sensors_info_all"]["vault-sensor"]
scanner_nodes node["redborder"]["sensors_info_all"]["scanner-sensor"]
device_nodes node["redborder"]["sensors_info_all"]["device-sensor"]
logstash_pipelines node["redborder"]["logstash"]["pipelines"]
action (manager_services["logstash"] ? [:add, :register] : [:remove, :deregister])
end
end

rbdswatcher_config "Configure redborder-dswatcher" do
Expand Down

0 comments on commit f66e148

Please sign in to comment.