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

document manage_package with manage_repo #381

Closed
baurmatt opened this issue Sep 22, 2017 · 3 comments
Closed

document manage_package with manage_repo #381

baurmatt opened this issue Sep 22, 2017 · 3 comments
Assignees
Labels
Milestone

Comments

@baurmatt
Copy link
Contributor

The docs state that the following code should be used if you want to specify the package version as the icinga2 module doesn't allow it.

package { 'icinga2':
  ensure => latest,
  notify => Class['icinga2'],
}

class { '::icinga2':
  manage_package => false,
}

Expected Behavior

Using the above code and adding manage_repo => true for the icinga class one would expect that Puppet installs the package from the icinga2 repository.

Current Behavior

This line disables the repository management silently if manage_packages = false even though manage_repo = true

  if $::icinga2::manage_repo and $::icinga2::manage_package {

Possible Solution

  1. First solution:
-  if $::icinga2::manage_repo and $::icinga2::manage_package {
+  if $::icinga2::manage_repo {

Which also breaks the example above. But this could be fixed by #334 and:

 package { 'icinga2':
   ensure => latest,
-  notify => Class['icinga2'],
+  before => Class['icinga2::install'],
+  notify => Class['icinga2::service'],
 }
  1. Second solution:
    Reconsider Allow specificing icinga2 version #376

Steps to Reproduce (for bugs)

package { 'icinga2':
  ensure => latest,
  notify => Class['icinga2'],
}

class { '::icinga2':
  manage_package => false,
  manage_repo       => true,
}

Check for which repository the package is installed.

Context

As this module will not have a way to specify the package version (#376) we need to do this in our wrapper/profile. But obviously we still want to use the repository management of this module.

Your Environment

  • Module version (puppet module list): For or less current master
  • Puppet version (puppet -V): 4.10.1
  • Operating System and version: Ubuntu 16.04.02
@lbetz
Copy link
Contributor

lbetz commented Sep 23, 2017

This behavior is described:

[manage_repo]
When set to true this module will install the packages.icinga.com repository. With this official repo you can get the latest version of Icinga. When set to false the operating systems default will be used. As the Icinga Project does not offer a Chocolatey repository, you will get a warning if you enable this parameter on Windows. Defaults to false. NOTE: will be ignored if manage_package is set to false.

@lbetz
Copy link
Contributor

lbetz commented Sep 23, 2017

But we'll correct the example and add the management of a repository before installing the package.

@lbetz lbetz added this to the v1.3.1 milestone Sep 25, 2017
@lbetz lbetz added the docs label Sep 27, 2017
@lbetz
Copy link
Contributor

lbetz commented Sep 27, 2017

if you use manage_package=>false and you manage the package in front of the icing class you also have to manage a repo within an icing package before. It's not possible to use icinga2 with manage_repo because of dependency cycles.

@lbetz lbetz changed the title manage_package with manage_repo document manage_package with manage_repo Sep 27, 2017
@lbetz lbetz closed this as completed in 796670d Sep 27, 2017
@lbetz lbetz self-assigned this Sep 27, 2017
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