-1

I have a server who was running puppet and hiera and, for the moment, 1 client. I want to manage all my nodes with hiera config files so I only put this in /etc/puppet/manifests/site.pp :

hiera_include(classes, '')

In my file /etc/puppet/hieradata/common :

---
classes:
  - "common_test"
  - fw_test
  - zabbix::agent

    zabbix::agent:zabbix_version : '2.2'
    zabbix::agent:server: 192.168.1.1
    zabbix::agent:serveractive: '192.168.1.1'
    zabbix::agent:hostname: 'Test_puppet'
    zabbix::agent:manage_firewall: true

With this configuration my parameters (192.168.1.1, true, Test_puppet, etc.) are not set on my client.

Second question, when I add zabbix::userparameters in my class list I have this error Could not find class zabbix::userparameters for... But this class exist (I use this package https://forge.puppetlabs.com/wdijkerman/zabbix)

I take this example but it's also does'nt work with others classes for the parameters error. Best regards.

4

1 回答 1

1

您的参数键不正确。例如,这...

zabbix::agent:zabbix_version : '2.2'

... 应该是 ...

zabbix::agent::zabbix_version: '2.2'

. zabbix::agent主要问题是and之间的冒号太少zabbix_version。我不认为键和尾随冒号之间的空格很重要,但是没有空格更传统。

至于zabbix::userparameters,它是(定义的)资源类型,而不是类。你不能include(或hiera_include()它)。

于 2014-12-04T15:36:10.840 回答