voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.

Home Page:https://forge.puppet.com/puppet/zabbix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zabbix Proxy 10.0.0 redeclare issue

dkelbley1 opened this issue · comments

Affected Puppet, Ruby, OS and module versions/distributions

Puppet: 8.5.1
Ruby: 3.0.2p107
Distribution: Ubuntu 22.04 LTS
Module version: 10.0.0

How to reproduce (e.g Puppet code you use)

When running zabbix::proxy based on the following code:

node 'proxy.example.com' {
class { 'zabbix::database':
database_type => 'mysql',
}

class { 'zabbix::proxy':
zabbix_server_host => '192.168.20.11',
database_type => 'mysql',
}
}

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: Class[Zabbix::Database] is already declared at (file: /etc/puppetlabs/code/environments/production/manifests/zabbix-proxy.pp, line: 3); cannot redeclare (file: /etc/puppetlabs/code/environments/production/modules/zabbix/manifests/proxy.pp, line: 468) (file: /etc/puppetlabs/code/environments/production/modules/zabbix/manifests/proxy.pp, line: 468, column: 5) on node zabbix-proxy

What behaviour did you expect instead

Zabbix Proxy should install

Output log

Any additional information you'd like to impart

Issue resolved by removing zabbix::database.