Skip to content
This repository has been archived by the owner on Feb 4, 2020. It is now read-only.

Duplicate Apt Resource #36

Closed
s33dunda opened this issue Mar 24, 2015 · 5 comments
Closed

Duplicate Apt Resource #36

s33dunda opened this issue Mar 24, 2015 · 5 comments

Comments

@s33dunda
Copy link

When trying to install sensu client on the same node I get:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: 
Apt::Source[sensu] is already declared in file 
/etc/puppet/environments/branches/sensu/modules/uchiwa/manifests/repo/apt.pp:34; cannot redeclare 
at /etc/puppet/environments/branches/sensu/modules/sensu/manifests/repo/apt.pp:35 
on node txxxxxx.com

Can we name the uchiwa resource something else? like uchiwa or sensu-uchiwa?

@pauloconnor
Copy link
Contributor

You can just ask Uchiwa not to manage the repo instead:

class 'uchiwa' { install_repo = false }

@bleuchtang
Copy link
Contributor

I have the same issue.

@pauloconnor : I think your answer was not the good way to resolve this issue. Indeed puppet-uchiwa recipe can be executed before sensu-puppet recipe and in this case we should run puppet twice because the first puppet run failed on puppet-uchiwa recipe.

I made a PR #43 to correct this issue, and the same on sensu-puppet side sensu/sensu-puppet#356

@pauloconnor
Copy link
Contributor

@bleuchtang In that case, I would chain sensu-puppet and puppet-uchiwa

class 'sensu-puppet': { }->
class 'uchiwa': { install_repo: false }

I think this is a much cleaner, and easier way of installing these packages.

@bleuchtang
Copy link
Contributor

OK, but I don't think we can do that with Hiera.

@solarkennedy
Copy link
Contributor

@pauloconnor's suggestion is the most appropriate. (I think)
I've updated the front page docs to include this (common) configuration option in #51.

Hiera alone is not enough to manage lots of puppet classes together in a sane way.
If possible I recommend making a profile_sensu class that can combine modules together in a particular way, and then use hiera to include that class.

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

No branches or pull requests

4 participants