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

$bin_dir path incorrect for FreeBSD in params.pp #396

Closed
rick-pri opened this issue Nov 13, 2017 · 2 comments
Closed

$bin_dir path incorrect for FreeBSD in params.pp #396

rick-pri opened this issue Nov 13, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@rick-pri
Copy link

The params.pp has an incorrect value for FreeBSD when it comes to the binary directory.
We receive the below error on FreeBSD 11.1 and the latest version 1.3.3 of this module:

Error: Could not find command 'icinga2'
Error: /Stage[main]/Icinga2::Pki::Ca/Exec[create-icinga2-ca]/returns: change from notrun to 0 failed: Could not find command 'icinga2'

The error occurs because puppet-icinga2/manifests/params.pp has the following:

    'FreeBSD': {
      $bin_dir = '/usr/local/sbin/icinga2'
      ...

Which should be the following (after changing this locally on the puppet server I can get past this error):

    'FreeBSD': {
      $bin_dir = '/usr/local/sbin'
      ...

Our manifest:

class profiles::monitoring::icinga::master (
  String $icinga_user    = 'icinga2',
  String $icinga_db_pass = 'supersecret',
  String $icinga_master  = 'icinga2-master',
  String $ticket_salt    = '00000000000000000000000000000000',
) {

  contain ::postgresql::server

  class { '::icinga2':
    manage_package => false,
    features       => ['checker','mainlog','notification','statusdata','compatlog','command'],
    constants      => {
      'NodeName'   => $icinga_master,
      'ZoneName'   => 'master',
      'TicketSalt' => $ticket_salt,
    },
    require        => ::Sysrc::Sysrc[$icinga_user];
  }

  class{ '::icinga2::feature::idopgsql':
    user          => $icinga_user,
    password      => $icinga_db_pass,
    database      => $icinga_user,
    import_schema => true,
    require       => Postgresql::Server::Db[$icinga_user];
  }

  class { '::icinga2::feature::api':
    pki   => 'none',
    zones => {
      'master' => {
        'endpoints' => [ $icinga_master ],
      },
    };
  }

  class { '::icinga2::pki::ca': }

  ::sysrc::sysrc { $icinga_user:
    key   => 'icinga2_enable',
    value => 'YES';
  }

  postgresql::server::db { $icinga_user:
    user     => $icinga_user,
    password => postgresql_password($icinga_user, $icinga_db_pass),
  }

}
  • Module version: 1.3.3
  • Puppet version: 4.10.8
  • OS: FreeBSD 11.1-RELEASE
@lbetz
Copy link
Contributor

lbetz commented Nov 13, 2017

Do you know the path on FreeBSD 10, it's the same like on version 11?

@lbetz lbetz added the bug label Nov 13, 2017
@lbetz lbetz self-assigned this Nov 13, 2017
@lbetz lbetz added this to the v1.3.4 milestone Nov 13, 2017
@rick-pri
Copy link
Author

Hi @lbetz I've checked this on FreeBSD 10.4-RELEASE and the behaviour is the same as 11.1-RELEASE.

I'd not noted this before, but this is with package version icinga2-2.7.1_2

@lbetz lbetz closed this as completed in 86a6c48 Nov 16, 2017
lbetz added a commit that referenced this issue Nov 16, 2017
…eeBSD-396

fix #396 incorrect bin_dir path for FreeBSD
n00by pushed a commit to n00by/puppet-icinga2 that referenced this issue Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants