Comments (12)
Ok, i see the prob. If you have a good solution for arrays I will merge it happily :)
from puppet-graphite.
The defined function can be a pain in the ass, because if you have multipe defineds with different parameters. e.g. one installes
if ! defined(Package['gcc']) {
package { 'gcc': ensure => installed }
}
and another
if ! defined(Package['gcc']) {
package { 'gcc': ensure => "4.2.3" }
}
then its just luck which of them wins and will be executed.
So maybe the best way will be to just replace the package install part with an exec command like "yum -q -y install foo bar"
from puppet-graphite.
I would recommend adding a $manage_packages
option to the main graphite class. This class is how the user decides if the graphite module is managing the packages (in the only-graphite use case) or if the packages will be managed outside the graphite class (more of a roles/profiles use case).
from puppet-graphite.
Agree with @nibalizer, I asked the guys on #puppet-dev
and they said that the only real way of handling it
Alternatively, there's a method in https://github.com/puppetlabs/puppetlabs-stdlib to check an array of packages with ! defined(Package['foo'])
, more hacky though.
from puppet-graphite.
I wanted to experiment with Graphite today and hit this issue:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Duplicate declaration: Package[git] is already declared in file /etc/puppet/modules/graphite/manifests/install/redhat.pp:26;
from puppet-graphite.
So it looks like another module of yours already installs git. An easy workaround is just to remove the git package from the list of the packages to be install for redhat in the params.pp
from puppet-graphite.
I'd like to vote for the $manage_packages
params.
I can easily exclude the offending module (it's part of my sysadmin::base
role), but workarounds aren't long-term solutions :) I am already doing this in my test environment.
from puppet-graphite.
! defined() is not a good pattern as it is parse-order dependent.
from puppet-graphite.
from puppet-graphite.
This issue should be solved with release 6.0.0. See #48 . At least for RedHat distros.
from puppet-graphite.
Their was a whole refactoring of the module since this is issue was created. Is it still up-to-date?
from puppet-graphite.
@dwerder Let me double check.
In the mean time, I'm making a basic Beaker test to check this scenario, PR coming soon! 👍
from puppet-graphite.
Related Issues (20)
- [Enhancement] make the installation of graphite-web optional HOT 1
- Can you release a new version in the forge, please ? HOT 3
- graphite-web not starting with graphite-web version 1.0.2
- ImportError: No module named django.conf HOT 1
- Carbon Flow Control Missing HOT 1
- [Release] Debian Stretch HOT 2
- Fresh install fails on CentOS 7.4 using Graphite v1.1.1 HOT 7
- gr_graphiteweb_storage_dir breaks puppet
- /opt/graphite not available - puppet run fails HOT 4
- ensuring order for storage aggregation rules HOT 3
- Gunicorn can't listen on TCP socket
- Support Debian Buster HOT 3
- Add support for graphite tags
- Acceptance Tests need update
- Installation of Graphite-Web with URL prefix
- manage.py no more available from graphite-web 1.0.x HOT 2
- validate functions from stdlib are deprecated
- https://github.com/echocat/puppet-graphite/releases/tag/v8.0.0 HOT 1
- Support for Ubuntu 20.4
- Doesn't work on Debian bullseye due to it trying to install python-tz...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-graphite.