Fixing issue with plugin configuration
Change-Id: I7cfd74308a47fcdf9765115dd299ace504b4988f
This commit is contained in:
parent
e781461f2c
commit
b407ffd277
@ -10,13 +10,20 @@ package 'nagios-plugins-basic' do
|
||||
only_if { node[:monasca_agent][:plugin].key?(:nagios_wrapper) }
|
||||
end
|
||||
|
||||
# Create the conf.d directory if it doesn't exist
|
||||
directory '/etc/monasca/agent/conf.d' do
|
||||
owner node[:monasca_agent][:owner]
|
||||
group node[:monasca_agent][:group]
|
||||
recursive true
|
||||
end
|
||||
|
||||
# Configures the plugin yaml files based on node[:monasca_agent][:plugin]
|
||||
# attributes
|
||||
node[:monasca_agent][:plugin].each_key do |plugin|
|
||||
unless node[:monasca_agent][:plugin][plugin].key?(:init_config)
|
||||
node.normal[:monasca_agent][:plugin][plugin][:init_config] = {}
|
||||
end
|
||||
template "/etc/monasca-agent/conf.d/#{plugin}.yaml" do
|
||||
template "/etc/monasca/agent/conf.d/#{plugin}.yaml" do
|
||||
source 'plugin_yaml.erb'
|
||||
action :create
|
||||
owner node[:monasca_agent][:owner]
|
||||
|
Loading…
x
Reference in New Issue
Block a user