Re: [Puppet Users] Learn from MY Mistake: false != false

2011-12-19 Thread Henrik Lindberg
On 2011-20-12 24:57, James Turnbull wrote: Dan White wrote: Thanks for pointing that out for two reasons: (1) In the flow of the mailing list, simple little tricks like this can flash right past you if you are not reading carefully. (2) That thread gave me a better approach for what I am doing

Re: [Puppet Users] Re: [Puppet-dev] Re: When the lint accumulates...

2011-12-20 Thread Henrik Lindberg
On 2011-20-12 16:21, Walter Heck wrote: looks nice so far, wish we could have this in geppetto soon :) cheers, -- Walter Heck Just a quick note regarding Geppetto in this respect, and to let you know what the plans are (I am not trying to hijack this thread :)... I follow the lint project

Re: [Puppet Users] Re: How are people regression testing their code for variable scoping?

2012-01-05 Thread Henrik Lindberg
Geppetto and puppet-lint are two useful tools for checking for problems. Hope that helps. Regards - henrik On 2012-03-01 18:15, Trevor Vaughan wrote: Any takers? On Wed, Dec 28, 2011 at 9:19 AM, Trevor Vaughantvaug...@onyxpoint.com wrote: I think I've found all of the cases, but I'd like a

[Puppet Users] Announcement: Geppetto 2.1.2 released

2012-02-02 Thread Henrik Lindberg
Hi, I am happy to announce that Geppetto 2.1.2 has been released and is available as an update from within Geppetto. If you do not already have Geppetto installed, start by downloading version 2.1.0 here https://github.com/cloudsmith/geppetto/downloads In release 2.1.2 *

Re: [Puppet Users] Announcement: Geppetto 2.1.2 released

2012-02-05 Thread Henrik Lindberg
On 2012-05-02 1:59, Walter Heck wrote: Guess it should make me happy that I found only a few warnings in our repo :) I found warnings in the puppetmaster log of one of our puppetmasters I recently upgraded to 2.7.10 though, they are not reported by geppetto as of now I think (something about

Re: [Puppet Users] using a boolean selector inside require always returns false

2012-02-14 Thread Henrik Lindberg
On 2012-15-02 24:07, MBroderick@TDS wrote: We are trying to conditionalize what is required by a resource... service { xxx: ... require = $bool-var ? { true = [ list1 ], false = [ list2 ], } } is $bool-var really a boolean, or does it contain the text true

Re: [Puppet Users] Puppet syntax check for Komodo Edit

2012-02-18 Thread Henrik Lindberg
On 2012-18-02 11:54, Alexander Fortin wrote: On 2/17/12 7:30 PM, Spirit wrote: I was tried to find syntax highlighting for komodo and did not found it. But i found gepetto that based on eclipse. Try it. Thanks Spirit, I'm trying it even if I said myself Eclipse will never find its way on my

Re: [Puppet Users] Puppet syntax check for Komodo Edit

2012-02-19 Thread Henrik Lindberg
On 2012-19-02 16:24, Alexander Fortin wrote: On 2/18/12 9:01 PM, Mister IT Guru wrote: Hi All, Please forgive me for jumping on this thread, but I'm a bit shocked - Syntax highlighting for puppet? Sorry for being slow on this one, I have been cracking my eyes using nano, and basic text editors

Re: [Puppet Users] openstack-puppet mailing list

2012-04-05 Thread Henrik Lindberg
Will you get the google group listed on news.gmane.org to enable reading via news/nntp ? Regards - henrik On 2012-05-04 6:23, Dan Bode wrote: Hi all, I have been working to create a community around a set of modules for configuring and deploying OpenStack. For folks who are interested in

Re: [Puppet Users] Is paramater ordering non-deterministic?

2012-04-16 Thread Henrik Lindberg
The evaluation order of the parameters is not deterministic as I learned when implementing validation of references in Geppetto. (BTW, Geppetto issues warnings/errors when trying to reference potentially uninitialized variables as in your example). You need to move the logic computing the

[Puppet Users] puppet 3.0.0 and hiera

2012-07-09 Thread Henrik Lindberg
Hi, If I have understood it correctly, puppet 3.0.0 will include / require hiera. In order to add support for hiera directly in Geppetto I downloaded the puppet 3.0.0rc tarball expecting to find the puppet-hiera functions, but they where not there. What is the expected packaging going to be

Re: [Puppet Users] puppet 3.0.0 and hiera

2012-07-09 Thread Henrik Lindberg
/ It looks like the source needs to be copied into puppet's modulepath drectory - will this be different in 3.0.0 Regards - henrik On Jul 9, 2012, at 9:21 AM, Henrik Lindberg henrik.lindb...@cloudsmith.com wrote: Hi, If I have understood it correctly, puppet 3.0.0 will include / require hiera

[Puppet Users] Re: Please send me your puppet formatting puzzles...

2012-07-26 Thread Henrik Lindberg
, 2012 10:11:58 AM UTC-5, Henrik Lindberg wrote: Hi, I have been working on a new puppet code formatter for Geppetto for some time, and it is now starting to work quite well. The plan is to release it in Geppetto 3.0. Sounds promising. If you want to, you can help by sending

Re: [Puppet Users] Puppet and Java/OSGi?

2012-07-27 Thread Henrik Lindberg
On 2012-26-07 9:34, Mikoo wrote: Hi, We are looking for a framework that will facilitate deployment and configuration of our applications. Puppet seems to be one possibility but I have some questions: First of all, our applications are written in Java. Is there an impact concerning the

Re: [Puppet Users] How to syntax debug in puppet 3?

2012-08-24 Thread Henrik Lindberg
On 2012-24-08 13:58, Sandra Schlichting wrote: Yes, you may either use it as an Eclipse plugin or as a standalone program.. [snip] That sounds interesting. How do I do that? =) The standalone Geppetto is downloadable from https://github.com/cloudsmith/geppetto/downloads (linux,

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-24 Thread Henrik Lindberg
EXCELLENT GUIDE !!! I which that had been available when I started on Geppetto :) Here are some things that I would like the documentation to clarify: - How do I create strings that span multiple lines? (Since there is no string concatenation operator 'x' + 'y' does not work). Can I write a

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-25 Thread Henrik Lindberg
Hi, On 2012-25-08 1:02, Nick Fagerlund wrote: Yeah that reply isn't coming back. Anyway, I was totally hoping you'd chime in with some holes you found. :) Comments below... On Friday, August 24, 2012 6:33:01 AM UTC-7, Henrik Lindberg wrote: - How do I create strings that span multiple

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-26 Thread Henrik Lindberg
On 2012-25-08 1:02, Nick Fagerlund wrote: - Can I write more complex expressions in an interpolation? Can I do something like The sum is ${$a + $b}, and if that is the case, is it possible to have any expression interpolated (including nested strings with interpolation)? Nope!

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-27 Thread Henrik Lindberg
On 2012-28-08 24:34, Nick Fagerlund wrote: ...blurry... ...ticket tracker ... outstanding bug ...DON'T DO THIS... Ah, which reminded me about the fun and games that can be played with node inheritance and regular expressions. There is a bug logged for that. Problem being that a node can

Re: [Puppet Users] Array References?

2012-08-28 Thread Henrik Lindberg
On 2012-28-08 5:02, Douglas Garstang wrote: The first notice command shows the array as having two elements. The second notice command shows the same array as having only one element. Some sort of variable reference thing? How can I make a copy of the $nodes array rather than make a reference to

Re: [Puppet Users] The rewritten Puppet 2.7 language reference is live

2012-08-29 Thread Henrik Lindberg
https://github.com/puppetlabs/puppet/commit/193e19eb14ff640a68f2a21fd525ef6c8825dbf2 Don't think that was in the language guide. And the new 'unless' statement in 3.0. - henrik -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this

Re: [Puppet Users] Re: Managing Eclipse with Puppet

2012-08-29 Thread Henrik Lindberg
To install additional plugins into Eclipse, you want to use the p2 director application. It is embedded inside the Eclipse IDE itself so once the IDE is unzipped and Java is installed, it is possible to run the director. The director app can install new things, update, and uninstall. There

Re: [Puppet Users] Re: Managing Eclipse with Puppet

2012-08-29 Thread Henrik Lindberg
On 2012-29-08 16:04, Henrik Lindberg wrote: To install additional plugins into Eclipse, you want to use the p2 director application. It is embedded inside the Eclipse IDE itself so once the IDE is unzipped and Java is installed, it is possible to run the director. The director app can install

[Puppet Users] Announcement: Geppetto 3.0 released

2012-09-23 Thread Henrik Lindberg
Geppetto 3.0.0 == The 3.0.0 release of Geppetto (Puppet IDE) is available as ready to run download or update from within Geppetto for all users of 2.x. This is the biggest release of Geppetto functionality since its creation with more than a 100 fixed issues and enhancements. In

Re: [Puppet Users] Puppet warning error messages after upgrading to version 3

2012-10-04 Thread Henrik Lindberg
On 2012-03-10 20:29, Brent Clark wrote: Good day I seem to have a problem whereby, I get the following message when I do a puppet run. Warning: Unable to fetch my node definition, but the agent run will continue: Warning: Could not intern from pson: source '#Puppet::Node:0x7f' not in PSON! I

[Puppet Users] Attention Stockholm/Sweden puppet users

2012-10-04 Thread Henrik Lindberg
On October 24, James Turnbull from Puppetlabs is visiting Stockholm and there will be a meetup at Spotify's office - talks, and opportunity to network with fellow devops people. Details posted here: http://www.meetup.com/DevOps-Stockholm/events/85307662/ Looking forward to seeing you there!

Re: [Puppet Users] Custom Resource type Fail

2012-10-05 Thread Henrik Lindberg
From a quick glance, it seems like you are trying to reassign a variable value - that is not allowed in puppet. You may assign to a variable that exists in an outer scope (thereby shadowing it), but not reassign in the same scope. As an example: case $semisync_master { on: {

Re: [Puppet Users] Puppet 3.0 upgrade issue

2012-10-08 Thread Henrik Lindberg
On 2012-08-10 11:43, Thomas Bendler wrote: -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to

Re: [Puppet Users] Re: How to remove warnings related to Resource references should now be capitalized when starts with number?

2012-10-08 Thread Henrik Lindberg
On 2012-08-10 18:11, llowder wrote: comments in line.. On Monday, October 8, 2012 9:38:05 AM UTC-5, jcbollinger wrote: On Thursday, October 4, 2012 8:42:39 AM UTC-5, Carlos Tapia wrote: Hi Guys! I want to clean warning messages: *warning: Deprecation notice:

Re: [Puppet Users] Possible to disable global definition outside of nodes?

2012-10-09 Thread Henrik Lindberg
Afaik, there is no way to make puppet tell you about this. Puppet is a powerful tool and you got what you asked for :-) What you can do is to write Rspec tests for your catalogs and use that as a regression test. Hope that helps. - henrik On 2012-09-10 10:45, Sandra Schlichting wrote: Hi =)

Re: [Puppet Users] Create a variable variable

2012-10-15 Thread Henrik Lindberg
Did you consider using a hash? $x = { 'app1' = 'app1user1,app1user2', 'app2 = '...' } $group = 'app1' $y = split($x[$group], ',') In the DSL it is not possible to reference a variable in a dynamic way (i.e. compute the variable name), but you can compute a hash key. e.g. $group_nrb = 1 $y =

Re: [Puppet Users] creating a list of files from an external define

2012-10-28 Thread Henrik Lindberg
On 2012-25-10 22:33, danielt wrote: When I call the define from within my apache2 class with this: helper::files{$files: owner = root, group = root, mode = 644, path = puppet:///files/apache2/, ensure= present, requires = File[$folders] }

Re: [Puppet Users] how to intercept a catalog and perform a diff

2012-10-29 Thread Henrik Lindberg
On 2012-29-10 16:25, Kevin G. wrote: I'm re-reading the puppet docs http://docs.puppetlabs.com/learning/manifests.html and just noticed this footnote If you drastically refactor your manifest code and want to make sure it still generates the same configurations, you can just intercept the

Re: [Puppet Users] anyway to inherit the argument list from a puppet define?

2012-11-28 Thread Henrik Lindberg
On 2012-28-11 17:43, Ben Schofield wrote: Is there anyway to inherit the argument list from a puppet define so that a wrapping define does not have to declare the same variables twice? No. Sorry. For example define my_define($arg1, $arg2, $arg3){ ... } define wrapper { #modify arg2

Re: [Puppet Users] Re: Are these the same?

2012-12-02 Thread Henrik Lindberg
On 2012-01-12 24:25, Jakov Sosic wrote: On 11/30/2012 11:48 PM, Johan De Wit wrote: Thy both includes the class, but require adds a dependency to the included class. from the docs : This function is a superset of the ‘include’ function, adding a class relationship so that the requiring class

Re: [Puppet Users] geppeto packaging

2013-01-14 Thread Henrik Lindberg
On 2013-14-01 16:58, GRANIER Bernard (MORPHO) wrote: Due to internet policy of my company, I can not access to gepetto install site thru eclipse. Is it possible to download gepetto plugin as a zip ? I mean not a full eclipse but just the plugin. It is not available to the public, please

Re: [Puppet Users] Parameters using other parameters

2013-03-03 Thread Henrik Lindberg
On 2013-03-03 15:00, Andrei Burd wrote: Hi, i'm writing a define to custom apache configuration, with nagios check, using Geppeto. I want to define a parameter to check specific web page for ssl, because not all the site are available trough SSL, just couple of pages. I'm using previously

[Puppet Users] (announcement) Geppetto 3.2.0 Released

2013-07-18 Thread Henrik Lindberg
Hi, Geppetto 3.2.0 was just pushed to the download and update site. In brief: * Support for Puppet 3.2, including --parser future (iteration, lambdas) * Direct Publishing to the Forge * Improved Editing of Modulefile / module meta data. * Based on (compatible with) Eclipse Kepler * Bug Fixes

Re: [Puppet Users] PC EU feedback: exported resource syntax is too magical, hard to read

2011-05-21 Thread Henrik Lindberg
On 5/21/11 10:42 AM, Brice Figureau wrote: If you really want to simplify people's life, make those extra attributes become metaparameters : user { luke: ensure = present, virtual = [boolean] } That would even allow us to parametrize virtuality/exportability with the help of an expression

[Puppet Users] Geppetto is ready

2011-06-20 Thread Henrik Lindberg
Geppetto 1.0 is released and ready for download. We want all the feedback we can get, so try it out and let us know what you think! Full story at: http://cloudsmith.github.com/geppetto/ If you haven’t been following the project, Geppetto is an integrated toolset for working with Puppet

Re: [Puppet Users] Geppetto is ready

2011-06-21 Thread Henrik Lindberg
repository in /tmp/apache/.git/ warning: You appear to have cloned an empty repository Maybe its an option to clone an empty repo and just give a warning instead of bailing out. -- Martin Willemsma 2011/6/21 Henrik Lindberg henrik.lindb...@cloudsmith.com mailto:henrik.lindb...@cloudsmith.com

[Puppet Users] need help with name parameter

2011-06-22 Thread Henrik Lindberg
Hi, A bit of help is needed with this geppetto issue: https://github.com/cloudsmith/geppetto/issues/87 It is about the parameter name in relation to file. Appreciate feedback. Regards - henrik -- You received this message because you are subscribed to the Google Groups Puppet Users group.

[Puppet Users] When will puppet versions later than 2.6.4 be available on macports?

2011-06-25 Thread Henrik Lindberg
Title says it all... When will puppet versions later than 2.6.4 be available on macports? Regards - henrik -- You received this message because you are subscribed to the Google Groups Puppet Users group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from

Re: [Puppet Users] Eclipse Task Tags

2011-06-28 Thread Henrik Lindberg
On 6/29/11 1:09 AM, Vlad wrote: Does anyone know if you can get task tags for Gepetto in Eclipse. I see that it works only for CSS, HTML and a couple more. Can I add this functionality for puppet projects? Hint - there is a Geppetto forum at google groups:

Re: [Puppet Users] Re: eclipse install gepetto

2011-06-28 Thread Henrik Lindberg
Hi Jake, Thanks for the report, I have updated the Geppetto FAQ (http://cloudsmith.github.com/geppetto/faq.html#2011/06/02/can-i-use-geppetto-in-eclipse) with the fact that Geppetto requires at least Eclipse 3.6 (Helios). I am pleased to hear that it installed fine into 3.7 Indigo. Hint -

Re: [Puppet Users] Re: Eclipse Task Tags

2011-06-29 Thread Henrik Lindberg
Hi, please file an enhancement request for this (at https://github.com/cloudsmith/geppetto/issues) as this is something that needs to be added to Geppetto. Comments must be parsed to find the todos and turn them into Tasks (this is easy). It is a bit more involved to keep the tasks in sync as

[Puppet Users] Announcing: Geppetto 1.0.1

2011-06-30 Thread Henrik Lindberg
Hi, Geppetto 1.0.1 is now available. If you are among the 300 users that already have Geppetto 1.0.0 installed, you can get the new release by selecting Help Check for Updates. If you are on Mac OS X you need to make a very simple and small adjustment to your installed Geppetto 1.0.0 as

Re: [Puppet Users] Parse Puppet Manifests

2011-08-11 Thread Henrik Lindberg
Don't know exactly what you are looking for, but you may be interested in http://cloudsmith.github.com/geppetto/ which is tooling for puppet development - editor with syntax coloring, cross-reference checking, module-dependency checking, etc. As Geppetto contains its own parser that creates a

[Puppet Users] Announcement: Geppetto 1.0.2 released

2011-08-18 Thread Henrik Lindberg
Hi, I am happy to announce that the 1.0.2 release of Geppetto is available as an update from within Geppetto for all users of 1.0.x. Please see the FAQ (http://cloudsmith.github.com/geppetto/faq.html) for information if you run into problems updating from 1.0.0. Checkout

Re: [Puppet Users] handy tip against unhelpful Could not intern from pson error

2011-08-24 Thread Henrik Lindberg
I can't see any difference between your two examples. Typo? - henrik On 8/24/11 5:23 PM, Luke Bigum wrote: Not sure if people are already aware of this, but it might save someone some time in the future. I've been tracking down the following error today, it's rather unhelpful in telling you

Re: [Puppet Users] Re: Parameterized classes vs defined-types

2011-08-24 Thread Henrik Lindberg
On 8/24/11 3:46 PM, jcbollinger wrote: If you have an OO background then the words class and type may have connotations and implied similarity for you that just don't apply in Puppet. Puppet classes are not types in the type theory sense. Defined types are closer to that, but it may help to use

Re: [Puppet Users] Quick help… GitHub Puppet Environments...

2011-09-14 Thread Henrik Lindberg
This is a good presentation of a good git branching strategy in general: http://nvie.com/posts/a-successful-git-branching-model/ Since github does not manage permissions per branch you really do need additional repositories - or at least one if you are willing to accept that developers can

[Puppet Users] Announcement: Geppetto 2.0.0 released

2011-09-18 Thread Henrik Lindberg
The 2.0.0 release of Geppetto is available as download and updates from within Geppetto for all users of 1.0.x. Please see the FAQ at: http://cloudsmith.github.com/geppetto/faq.html for information if you run into problems updating. Checkout

Re: [Puppet Users] Announcement: Geppetto 2.0.0 released

2011-09-21 Thread Henrik Lindberg
We are experiencing problems with downloads from github at the moment. Trying to fix the issues. Regards - henrik On 9/19/11 4:59 AM, Henrik Lindberg wrote: The 2.0.0 release of Geppetto is available as download and updates from within Geppetto for all users of 1.0.x. Please see the FAQ

Re: [Puppet Users] How to inherit a parameterized class ? What is the syntax ?

2011-10-13 Thread Henrik Lindberg
Don't know if I am out on a limb here, but did you try setting class defaults? class puppet::master inherits puppet { class { 'puppet': puppetmaster_fqdn = my wanted value } # ... } - henrik On 10/13/11 12:16 PM, Alexandre wrote: Hi, I am trying to manage the puppet.conf file, but both

Re: [Puppet Users] Variables syntax

2011-10-19 Thread Henrik Lindberg
$operatingsystem $operatingsystem ${operatingsystem} ${operatingsystem} Produce exactly the same thing. One would assume that the short forms for expression interpolation i.e.: ${operatingsystem} $operatingsystem would recognize an initial empty namespace (i.e. ::operatingsystem). If not, I

Re: [Puppet Users] Re: need clarity on built-on variables for defined types

2011-10-20 Thread Henrik Lindberg
Yeah, Arrgh, the language guide not very precise. The issue I am trying to solve is how to help a user with available variables in a given scope (this is in Geppetto). What I currently do is check if a variable is known. If not know suggestions are computed. There is no problem with

[Puppet Users] What are the reserved namespaces?

2011-10-20 Thread Henrik Lindberg
I found this in the documentation: $settings::name of setting — Provided by the puppet master; exposes all of the master’s configuration settings as variables in the settings namespace. Note that other than $environment, the agent’s settings aren’t available in manifests. Added in Puppet

Re: [Puppet Users] Dynamically create arguments for a define (or parametrized class)

2011-10-27 Thread Henrik Lindberg
Did you try something like: define boo($a=a, $b=b, $c=c) { bar { $title: a = $a, b = $b, c = $c, } } boo { 'the title' : a = a value, c = c value } - henrik On 10/27/11 1:29 PM, Alessandro Franceschi wrote: Maybe I'm asking too much, but is there a way to dynamically

[Puppet Users] Rules for numerical variable use

2011-10-30 Thread Henrik Lindberg
Need help with Geppetto issue #226 regarding rules for numerical variables - https://github.com/cloudsmith/geppetto/issues/226 This is to allow geppetto to correctly validate their use. Help much appreciated. Regards - henrik -- You received this message because you are subscribed to the

Re: [Puppet Users] Rules for numerical variable use

2011-11-01 Thread Henrik Lindberg
On 10/31/11 2:04 AM, Henrik Lindberg wrote: Need help with Geppetto issue #226 regarding rules for numerical variables - https://github.com/cloudsmith/geppetto/issues/226 This is to allow geppetto to correctly validate their use. Help much appreciated. Regards - henrik Thanks everyone who

Re: [Puppet Users] Re: What is the offical variable scope best practice?

2011-11-16 Thread Henrik Lindberg
On 11/16/11 3:54 PM, jcbollinger wrote: On Nov 16, 3:59 am, flexfrostyn...@gmail.com wrote: I read the guide athttp://docs.puppetlabs.com/guides/scope_and_puppet.htmlandothers' mail, i am a little confused now, below is my understanding: 1. top scope only refers to site.pp, not include

[Puppet Users] pp grammar test-files?

2010-12-10 Thread Henrik Lindberg
Hi, I am working on some tools that read and write pp files, and I wonder if there are some pp files available somewhere that can be used to test a parser. I am especially interested in if there are some tests written that capture invalid syntax. - henrik -- You received this message because

Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Henrik Lindberg
Hi, I understand that - I wonder if there is a set of pp files available for testing the parser. - henrik On Dec 10, 2010, at 5:04 PM, Dan Bode wrote: --parseonly option will catch parsing mistakes. On Fri, Dec 10, 2010 at 8:00 AM, Henrik Lindberg henrik.lindberg.priv...@gmail.com wrote

Re: [Puppet Users] pp grammar test-files?

2010-12-10 Thread Henrik Lindberg
Thanks, that is a good starting point. Are the underlying pp files available in git by any chance? - henrik On Dec 10, 2010, at 5:47 PM, Felix Frank wrote: On 12/10/2010 05:42 PM, Henrik Lindberg wrote: Hi, I understand that - I wonder if there is a set of pp files available

Re: [Puppet Users] pp grammar test-files?

2010-12-11 Thread Henrik Lindberg
Thanks everyone for all the tips on where I can get pp files for testing. Very helpful. Some answers to questions below: On Dec 10, 2010, at 11:32 PM, Daniel Pittman wrote: I wonder if there is a set of pp files available for testing the parser. Puppet labs don't have a hidden repository

Re: [Puppet Users] pp grammar test-files?

2010-12-11 Thread Henrik Lindberg
- henrik 11 dec 2010 kl. 19:28 skrev Nigel Kersten ni...@puppetlabs.com: On Sat, Dec 11, 2010 at 10:17 AM, Henrik Lindberg henrik.lindberg.priv...@gmail.com wrote: I have created an EMF ecore model for puppet manifests. The technology I use (Xtext) helps with generating a .pp parser

Re: [Puppet Users] Puppet Parse Trees (for a lint checker)

2011-03-01 Thread Henrik Lindberg
An alternative is to use the Geppetto tool which parses puppet manifests into a model. There is a Java API for this model. It can also be serialized in other formats that allow processing in other languages. I am interested in what lint rules you had in mind, maybe we could collaborate to

Re: [Puppet Users] Accessing hiera_hash values in puppet templates

2013-08-11 Thread Henrik Lindberg
On 2013-09-08 17:13, Rafi wrote: %- @instance_names.each do | instance_name | -% define host { host_name%= @instance_name % alias%= @instances[@instance_name]['public_ip'] % address %= @instances[@instance_name]['private_ip'] % } %- end -% I know I can access

Re: [Puppet Users] dynamic hiera_config setting

2013-08-13 Thread Henrik Lindberg
On 2013-13-08 24:25, jamese wrote: Hi Pablo, Thanks for the response. I've tried setting the environment in the master section, the agent section, the main section. Regardless of whether I set the environment anywhere in the masters puppet.conf, it always looks for the hiera.yaml file in the

Re: [Puppet Users] default data lookup w/ hiera2? Data in Modules

2013-09-11 Thread Henrik Lindberg
Thank you for the feedback, very good comments. See more inline... On 2013-11-09 11:02, robbyt wrote: I am reading over the release notes for Puppet 3.3, and buried under data in modules is a link to ARM-9. There is a good chance that I don't get it - Puppet is moving pretty fast these days

Re: [Puppet Users] Re: Announce: Puppet 3.3.0 Available

2013-09-14 Thread Henrik Lindberg
On 2013-14-09 9:05, Robin Powell wrote: In the announcement, http://projects.puppetlabs.com/issues/16856 is introduced as data in modules, and that we should see ARM-9 ( https://github.com/puppetlabs/armatures/blob/master/arm-9.data_in_modules/index.md ). But #16856 itself never references

Re: [Puppet Users] Re: Announce: Puppet 3.3.0 Available

2013-09-15 Thread Henrik Lindberg
On 2013-15-09 3:11, William Van Hevelingen wrote: Hi Henrik or Eric, Is it possible to error on failed lookups? This is useful for replacing the fail('osfamily not supported') lines in most params.pp files. Ryan mentioned the same thing in the ticket and I wasn't sure if it was resolved. It

Re: [Puppet Users] Parse puppet manifests in rspec tests

2013-09-15 Thread Henrik Lindberg
On 2013-16-09 24:05, James Kyle wrote: I want to do a syntax check of all our managed puppet manifests in rspec. It's an easy way to generate build reports for use in a CI. My first attempt looks like this: Puppet::Face[:parser, '0.0.1'].validate('puppet/manifests/site.pp') But this

Re: [Puppet Users] Run a custom function through the ruby debugger

2013-09-18 Thread Henrik Lindberg
Here is how to invoke the function 'fqdn_rand(30)' in irb irb require 'puppet' irb scope = Puppet::Parser::Scope.new_for_test_harness('localhost') irb scope.function_fqnrand([30]) = 1 That may not work if your function requires a fully configured system. If you need that set the breakpoint

Re: [Puppet Users] default data lookup w/ hiera2? Data in Modules

2013-09-18 Thread Henrik Lindberg
On 2013-16-09 20:34, robbyt wrote: Henrik, Thank you for your quick response. Sorry mine wasn't so quick- Google ate my message, perhaps it contained too many curly braces. :) Anyhow, adding a default argument option to lookup() would be great. But adding the option to pass a hash with

Re: [Puppet Users] default data lookup w/ hiera2? Data in Modules

2013-09-22 Thread Henrik Lindberg
On 2013-19-09 13:48, robbyt wrote: On Wednesday, September 18, 2013 3:15:18 PM UTC+3, Henrik Lindberg wrote: Here are the possible alterantives: arity 1: String key arity 1: Hash options arity 2: String key, String | Type type arity 2: String key, Hash options arity 3

Re: [Puppet Users] Re: Puppet 3.2: add element to array

2013-10-24 Thread Henrik Lindberg
On 2013-24-10 11:19, Erik Dalén wrote: It is possible in a lot of puppet versions but it is a bug and might get fixed. $a = [1,2] $a[2]=3 notice($a) It is a bug that is planned to be fixed in Puppet 4. (It cannot be changed in the 3.x series as it would potentially be a breaking change).

Re: [Puppet Users] puppet code snippet

2013-10-31 Thread Henrik Lindberg
On 2013-31-10 16:49, John wrote: Note the following code snippet I've written for my puppet module. My question is there a better (perhaps more efficient) method to accomplish this in a puppet module? The logic requires if a string (say aaa) is in an ldap_conf file, then install a specific

Re: [Puppet Users] How to identify unset variables?

2013-11-13 Thread Henrik Lindberg
On 2013-12-11 17:45, Schofield wrote: I want to list out all the variables that do not have values set for a catalog. Can puppet do this? No, not really - in theory it is an infinite number of variables :-) What is it you are trying to achieve? Here are some tips based on guessing what it

Re: [Puppet Users] Nested parametrized defines

2013-11-14 Thread Henrik Lindberg
On 2013-14-11 12:32, Patricia Jung wrote: Dear puppet wizards, http://docs.puppetlabs.com/puppet/3/reference/lang_defined_types.html does not suggest to me that nested parametrized defines would be forbidden, hence I expected the following code to work: add_to_ssh_authorized_keys.pp:

Re: [Puppet Users] Custom Functions and hash as parameter

2013-11-27 Thread Henrik Lindberg
On 2013-27-11 17:33, Israel Calvete wrote: Hi all, I try write a custom function My code: / $gluster = {/ /'10.241.5.6' = '/data/gv0/brick1',/ /'10.241.5.7' = '/data/gv0/brick1',/ / }/ / / / $a = glusterFunctions($gluster)/ / / / notify{$a:}/ My simple custom function: /require

Re: [Puppet Users] Re: Unable to specify hierarchy for data-in-modules

2013-12-05 Thread Henrik Lindberg
On 2013-06-12 1:30, chengkai liang wrote: Well, I can execute this with for individual module via *puppet apply --binder true ...* I haven't been able to do this successfully on my vagrant box. I found out that vagrant use --detailed-exitcode option with puppet apply, which interfere with

Re: [Puppet Users] Trigger ant script via puppet agent from windows

2013-12-22 Thread Henrik Lindberg
On 2013-22-12 2:45, Harshita Sinha wrote: Hi All, Is there any documentation to trigger ant scripts for build in eclipse in puppet? Regards Harshita There are two modules on the Puppet Forge that deals with installation of ANT itself. Have not seen anything that runs ant scripts. It

[Puppet Users] Blogged about the coming Type System in Puppet

2013-12-30 Thread Henrik Lindberg
Hi, In case you are interested in what is happening on the bleeding edge of Puppet development, I have started with a series of blog posts about the new Type System that will be released in Puppet 4 and is available as an experimental feature in the experimental --future parser released in

Re: [Puppet Users] Constructing rvalues from exported resources.

2014-01-29 Thread Henrik Lindberg
On 2014-28-01 13:16, Krist van Besien wrote: Hello, I am using the Radez/Paxemaker modules, and this allows me to define a cluster like this: class {'pacemaker::corosync': cluster_name = $control_clu_name, cluster_members = $control_clu_members, require = [

Re: [Puppet Users] Is there a way to find unused puppet code (2.7)?

2014-02-09 Thread Henrik Lindberg
On 2014-09-02 2:53, Amos Shapira wrote: Hello, Is there a way to systematically find all modules we have which aren't used? Basically, the answer is no because it is not possible to statically analyze puppet code since all inputs are unknown. (This because references to types can be dynamic

Re: [Puppet Users] Is there a way to find unused puppet code (2.7)?

2014-02-09 Thread Henrik Lindberg
On 2014-09-02 17:36, Henrik Lindberg wrote: On 2014-09-02 2:53, Amos Shapira wrote: Hello, Is there a way to systematically find all modules we have which aren't used? Basically, the answer is no because it is not possible to statically analyze puppet code since all inputs are unknown

Re: [Puppet Users] Re: Is ensure_resource() evil?

2014-03-31 Thread Henrik Lindberg
On 2014-31-03 20:08, Dan Bode wrote: I disagree that ensure_resource is evil and should not be used. It is however, potentially problematic, and it's issues are worth discussing. It was written (full disclosure by me) as an improvement over defined(). While it is not perfect (it suffers from

Re: [Puppet Users] Re: Is ensure_resource() evil?

2014-04-01 Thread Henrik Lindberg
On 2014-01-04 15:22, jcbollinger wrote: On Monday, March 31, 2014 3:55:03 PM UTC-5, Henrik Lindberg wrote: Going forward, I think the Puppet Language should handle the situation where more than one resource definition / class definition is made and where the two are considered

Re: [Puppet Users] Need help optimizing our Puppet module

2014-04-08 Thread Henrik Lindberg
On 2014-07-04 22:03, Harrison Ripps wrote: Hey all-- Over at OpenShift https://www.openshift.com/ we are big fans of Puppet. We've developed our own module https://github.com/openshift/puppet-openshift_origin, which is central to our OpenShift Origin installer and to our Vagrant-based

Re: [Puppet Users] Re: Creating scope object in Puppet v3.x

2014-04-30 Thread Henrik Lindberg
On 2014-30-04 15:19, KomodoDave wrote: So I guess no-one knows how to achieve this? Suggest that you write rspec tests for your custom functions. Just mimic what is done for the built in functions. As an example of a simple function - look at spec/unit/parser/functions/sprintf_spec.rb -

Re: [Puppet Users] Re: Creating scope object in Puppet v3.x

2014-05-02 Thread Henrik Lindberg
On 2014-01-05 11:18, KomodoDave wrote: Thanks for the response, Henrik. I’ve tried what you suggested already: |node=Puppet::Node.new('localhost') compiler=Puppet::Parser::Compiler.new(node) scope=Puppet::Parser::Scope.new(compiler) | ..but the result is: |

Re: [Puppet Users] using ruby dsl in puppet manifest

2014-05-08 Thread Henrik Lindberg
On 2014-08-05 19:03, Ritesh Nanda wrote: Hello , I would like to use ruby dsl in my manifest . Online doc for this topic is very limited , i am stuck at a place where i want to use ruby DIr class to find a particular file in a directory and then run operation on it . Is it possible to use ruby

Re: [Puppet Users] using ruby dsl in puppet manifest

2014-05-08 Thread Henrik Lindberg
On 2014-08-05 19:36, Ritesh Nanda wrote: Thanks Henrik , I would like to find a file and parse it , so that would be on the agent , creating a puppet function would not work , as master will not be able to access those files. You said Can be done with Resources , how can i include a ruby

Re: [Puppet Users] Parsing issues in 3.5

2014-05-10 Thread Henrik Lindberg
On 2014-09-05 19:22, Joe Topjian wrote: Hello, I keep running into several parsing issues in 3.5 that don't exist in Puppet 3.4. I saw the thread about issues with the future parser and defined types: https://groups.google.com/forum/#!topic/puppet-users/HOVnQ1EXwjY I'm using the future

Re: [Puppet Users] Node definitions in 3.6 directory environments

2014-05-19 Thread Henrik Lindberg
On 2014-19-05 10:05, Paul Seymour wrote: Hello, Could I ask for a little clarification over node definitions in 3.6+ and directory environments please. On our 2.7 masters we have an /etc/puppet/manifests/site.pp with some defaults within it. import nodes/*.pp filebucket { 'main': server =

Re: [Puppet Users] puppet class require fails depending on declaration order

2014-05-19 Thread Henrik Lindberg
On 2014-14-04 16:43, jcbollinger wrote: On Friday, April 11, 2014 10:10:37 PM UTC-5, David Portabella wrote: I didn't know about this /evaluation-order dependency./ Why does this evaluation-order dependency exists in puppet? Do you mean this particular one, or evaluation-order

Re: [Puppet Users] Facts can override variables set by puppet master

2014-05-20 Thread Henrik Lindberg
On 2014-20-05 13:02, Boyan Tabakov wrote: Hi, On Mon May 19 16:39:25 2014, jcbollinger wrote: On Monday, May 19, 2014 6:06:45 AM UTC-5, Boyan Tabakov wrote: Hi, The variable I want to access is not defined in a module/class. It's the globally defined $::environment.

Re: [Puppet Users] Tracking orphaned resources

2014-05-29 Thread Henrik Lindberg
On 2014-29-05 15:58, Martin Langhoff wrote: As the complexity of our $workplace puppet configuration grows, I am increasingly worried that puppet gives us very limited visibility over resources it no longer manages. In practical terms: if I mess up my class include/require/inherit structure so

  1   2   3   4   5   >