新來的傀儡,試圖讓這個模塊工作,但發現它非常令人沮喪。工頭/ Puppet模塊pdxcat/collectd。散列語法
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert String into Hash at /etc/puppet/modules/collectd/manifests/plugin/network.pp:28
我掙扎的插件是這一個: https://forge.puppetlabs.com/pdxcat/collectd#class-collectdpluginnetwork
我想設置的值是下collectd ::插件服務器::網絡 我曾嘗試:
('127.0.0.1': port => 25826,) and
('hostname' '127.0.0.1' 'port' 25826) and '127.0.0.1': port => 25826,
和無數其他選項。
有人請讓我知道如何寫一個有效的散列?
清單:
[[email protected] ~]# cat /etc/puppet/modules/collectd/manifests/plugin/network/server.pp
#
define collectd::plugin::network::server (
$ensure = 'present',
$username = undef,
$password = undef,
$port = undef,
$securitylevel = undef,
$interface = undef,
) {
include collectd::params
include collectd::plugin::network
$conf_dir = $collectd::params::plugin_conf_dir
validate_string($name)
file { "${conf_dir}/network-server-${name}.conf":
ensure => $ensure,
mode => '0640',
owner => 'root',
group => $collectd::params::root_group,
content => template('collectd/plugin/network/server.conf.erb'),
notify => Service['collectd'],
}
}
你把這個散列放在哪裏?它在Foreman中,在一個智能類參數下,還是在Puppet清單中? –
它會在Foreman的智能類參數 – Werner