Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zabbix::agent doesn't pass $zabbix_version to zabbix::repo #118

Closed
adamancini opened this issue Sep 2, 2015 · 1 comment
Closed

zabbix::agent doesn't pass $zabbix_version to zabbix::repo #118

adamancini opened this issue Sep 2, 2015 · 1 comment

Comments

@adamancini
Copy link

Using this module out of the box to set up zabbix in our environment, we installed 2.4 on all of our up to date distributions, but when adding in a check to send 2.2 out to ubuntu Lucid hosts, it seems when using in our node definition:

if ( $lsbdistcodename == 'lucid' ) {
    $zabbix_version = '2.2'
  } else {
    $zabbix_version = '2.4'
  }

class { 'zabbix::agent':
      server         => '10.0.0.118',
      listenip       => '0.0.0.0',
      hostname       => $::fqdn,
      zabbix_version => $zabbix_version
    }

the 2.2 string is never actually sent to zabbix::repo to set up the repository.

Using notify, I traced $zabbix_version from our node definition, into zabbix::agent, but when zabbix::repo is called it uses the default value defined in zabbix::params regardless of $zabbix_version.

I was able to work around this in our environment by using the resource-style declaration in zabbix::agent

# Check if manage_repo is true.
  if $manage_repo {
    class {'zabbix::repo': zabbix_version => $zabbix_version }
    Package['zabbix-agent'] {require => Class['zabbix::repo']}
  }
@adamancini
Copy link
Author

Edit: Nevermind, this has already been fixed in the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant