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

Align documentation for duplicate repository #131

Closed
TheBigfoot opened this issue Apr 24, 2017 · 7 comments
Closed

Align documentation for duplicate repository #131

TheBigfoot opened this issue Apr 24, 2017 · 7 comments
Assignees
Milestone

Comments

@TheBigfoot
Copy link

I was just trying to use the icinga2 and icingaweb2 module on the same host. It failed with "Duplicate declaration: Yumrepo[icinga-stable-release]", as this is already defined.

This is correct, but maybe you should add a little note about this in the docs.

@bobapple bobapple self-assigned this May 15, 2017
@lingfish
Copy link

It's not particularly clear what to do when faced with this situation...

@ikirker
Copy link

ikirker commented Jun 1, 2017

IIRC you're supposed to declare the Yumrepo as a a "virtual resource" and then realize it in both modules, since virtual resources can be "realized" more than once (but the relevant actual resource will still only be managed once).

There's some information about it in the docs, but I don't have any experience of actually using it in production: https://docs.puppet.com/puppet/4.10/lang_virtual.html#declaring-a-virtual-resource

@rgevaert
Copy link
Contributor

rgevaert commented Aug 1, 2017

I had the same issue on Debian. A work around could be to disable it in one class.
@ikirker that would work, but would still lead to confusion that the package will or will not be installed from upstream or distro repo. Depending on the order.

@yaron-idan
Copy link

I've tried disabling it on one of the packages and got unexpected behavior each time for the package I disabled it for (for example import_schema failed on icingweb2 because the schema file was not where the puppet class expected it to be)

Would really appreciate an example of a single host icinga2 and icingaweb2 setup.

@rgevaert
Copy link
Contributor

rgevaert commented Aug 3, 2017

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

  class {'icingaweb2':
    manage_repo => false,
    import_schema => true,
    db_type       => 'mysql',
    db_host       => $icingaweb2_db_host,
    db_username   => $icingaweb2_db_user,
    db_password   => $icingaweb2_db_pass,
    require       => [Mysql::Db['icingaweb2'],Class['icinga2']],
  }

@yaron-idan
Copy link

Thanks @rgevaert , this does start icinga2 and icingaweb2 on the same host without giving me the error I was getting. It still doesn't config icingaweb2 to use icinga2 as a backend and I can't find an example for that in the docs but that's sidetracking the issue a bit.

@bobapple
Copy link
Contributor

Ref: voxpupuli/puppet-icinga2#353

@bobapple bobapple added this to the v2.0.0 milestone Aug 16, 2017
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

6 participants