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

2014-05-20 Thread jcbollinger
On Monday, May 19, 2014 6:48:36 AM UTC-5, David Portabella wrote: so, one specific example, someone (not me) implemented a class tomcat with parameters port and ssl_port. I want to use that class, and I want that the ssl_port is always port + 1 (I don't want this to be

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

2014-05-19 Thread David Portabella
so, one specific example, someone (not me) implemented a class tomcat with parameters port and ssl_port. I want to use that class, and I want that the ssl_port is always port + 1 (I don't want this to be configurable in hiera) so, in my hiera data, I will specify port, and then I

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] puppet class require fails depending on declaration order

2014-04-15 Thread Felix Frank
On 04/15/2014 04:21 PM, David Portabella wrote: for a java/scala software developer like me, this does not look a good, because it makes it more difficult to unit test. maybe with puppet it is easy to build and pass different hiera data for unit testing? Sure, that shouldn't be (much) worse

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

2014-04-15 Thread jcbollinger
On Tuesday, April 15, 2014 9:21:38 AM UTC-5, David Portabella wrote: Ok, I see. Thanks for all this discussion! No, you *never* need to use parameterized classes. If you are determined to avoid resource-like class declarations, then you can replace each parameterized class in your

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

2014-04-14 Thread jcbollinger
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 dependencies in general? Anyway, I started to

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

2014-04-11 Thread David Portabella
I didn't know about this *evaluation-order dependency.* Why does this evaluation-order dependency exists in puppet? Is it done in purpose, or it is a technical problem of the puppet implementation? Do you have an example where we would want to use this evaluation-order dependency? Or could

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

2014-04-04 Thread jcbollinger
On Thursday, April 3, 2014 10:31:40 AM UTC-5, David Portabella wrote: * **Agree with John that you want to completely avoid using the parameterized style declaration of classes. Better to use 'include' statements and set all of your params in Hiera. * That's an interesting discussion,

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

2014-04-03 Thread Garrett Honeycutt
On 4/2/14, 3:23 PM, jcbollinger wrote: On Wednesday, April 2, 2014 4:57:39 AM UTC-5, David Portabella wrote: Oh My God! you mean that it's not a bug, it is a feature ? It is not a feature in the sense of a desired outcome, but it /is/ the intended behavior.

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

2014-04-03 Thread David Portabella
* **Agree with John that you want to completely avoid using the parameterized style declaration of classes. Better to use 'include' statements and set all of your params in Hiera. * That's an interesting discussion, but that's not the point of this post. the point of this post, as I

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

2014-04-02 Thread José Luis Ledesma
hi, from: http://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#declaring-classes Include-Like vs. Resource-Like Puppet has two main ways to declare classes: include-like and resource-like. *Note:* These two behaviors *should not be mixed* for a given class. Puppet's behavior

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

2014-04-02 Thread Bruno Bieth
Thanks Jose for your answer. The note from the doc is quite vague in my opinion. I would understand that class c1 { class { 'c2' : } require c3 } effectively mixes the two behaviors, but class { 'c1' : } class c1 { require c2 } should not be a case of mixed behavior. The following

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

2014-04-02 Thread David Portabella
Oh My God! you mean that it's not a bug, it is a feature ? On Wednesday, April 2, 2014 11:36:34 AM UTC+2, Jose Luis Ledesma wrote: hi, from: http://docs.puppetlabs.com/puppet/latest/reference/lang_classes.html#declaring-classes Include-Like vs. Resource-Like Puppet has two main ways

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

2014-04-02 Thread jcbollinger
On Wednesday, April 2, 2014 4:57:39 AM UTC-5, David Portabella wrote: Oh My God! you mean that it's not a bug, it is a feature ? It is not a feature in the sense of a desired outcome, but it *is* the intended behavior. Specifically, if there is any parameterized-style declaration of a

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

2014-04-01 Thread Bruno Bieth
Hi, I've got the following code that works as expected: class { c1: } class { c2: } class c1 { notice +++ } class c2 { require c1 notice +++ } But switching the declaration order of class c1 and c2: class { c2: } class { c1: } class c1 { notice +++ } class c2 { require c1

Re: [Puppet Users] puppet class dependencies

2014-03-27 Thread David Portabella
My colleague Guillaume showed me a possible implementation of the anchor pattern: class { c2: } - class { c3: } class c1 { notice +++ anchor {'before_c1':} - file {'/tmp/c1.txt': ensure = present } - anchor {'after_c1':} } class c2 { include c1 notice +++ anchor

Re: [Puppet Users] puppet class dependencies

2014-03-27 Thread David Portabella
it seems there is a bug in puppet --graph, that misses some dependencies. https://tickets.puppetlabs.com/browse/PUP-2075 so, this code actually works as expected: class { c3: } class c1 { exec { exec1: command = '/bin/echo exec1; exit 1' } } class c2 { * # include c1* * contain c1* exec

[Puppet Users] puppet class dependencies

2014-03-19 Thread David Portabella
class { c2: } class { c3: } class c1 { } class c2 { class { c1: } } class c3 { require c2 } c3 depends on c2 (as expected), but c3 does not depend on c1. this issue could be fixed by adding require c1 inside c3. however, in a general case, I don't know what is instantiated inside c2.

Re: [Puppet Users] puppet class dependencies

2014-03-19 Thread José Luis Ledesma
Works as expected You have to use contain if version 3.4 or anchor pattern http://docs.puppetlabs.com/puppet/latest/reference/lang_containment.html El 19/03/2014 12:18, David Portabella david.portabe...@gmail.com escribió: class { c2: } class { c3: } class c1 { } class c2 { class {

Re: [Puppet Users] puppet class dependencies

2014-03-19 Thread David Portabella
I still don't understand much the anchor pattern. could you please modify the previous example to use the anchor pattern? On Wednesday, March 19, 2014 12:22:31 PM UTC+1, Jose Luis Ledesma wrote: Works as expected You have to use contain if version 3.4 or anchor pattern

Re: [Puppet Users] puppet class dependencies

2014-03-19 Thread David Portabella
I've tried the anchor pattern as follows: class { c2: } class { c3: } class c1 { } class c2 { class { c1: } anchor { 'c1_first': } - Class['c1'] - anchor { 'c1_last': } } class c3 { require c2 } but still puppet apply --graph test.pp shows that c3 does not depend on c1. so, how to apply

Re: [Puppet Users] puppet class dependencies

2014-03-19 Thread David Portabella
I've even simplified the example: class { c3: } class c1 { notice +++ file {'/tmp/c1.txt': ensure = present } } class c2 { # include c1 contain c1 notice +++ file {'/tmp/c2.txt': ensure = present } } class c3 { # include c2 contain c2 notice +++ file {'/tmp/c3.txt': ensure =

Re: [Puppet Users] puppet class dependencies

2014-03-19 Thread David Portabella
I've even simplified the example: class { c2: } class { c3: } class c1 { notice +++ file {'/tmp/c1.txt': ensure = present } } class c2 { # include c1 contain c1 notice +++ file {'/tmp/c2.txt': ensure = present } } class c3 { require c2 notice +++ file {'/tmp/c3.txt': ensure =

Re: [Puppet Users] puppet class if

2013-10-14 Thread jcbollinger
On Friday, October 11, 2013 8:59:10 AM UTC-5, Werner Flamme wrote: I'm not Jakub (the OP), it is not my problem. I'm only the one who wanted to know where the couple of errors are. Peter was mistaken. There are no actual errors in the OP's manifest, and it might work in some

[Puppet Users] puppet class if

2013-10-11 Thread Jakub Bittner
Hello, I created puppet class and I want the file operation to be executed on all servers but not on server with hostname 'server1.domain.com. I tried this class, but it does not work. Is there any other way? Thanks class test { if $hostname != 'server1.domain.com' { file

Re: [Puppet Users] puppet class if

2013-10-11 Thread Peter Bukowinski
On Oct 11, 2013, at 5:48 AM, Jakub Bittner rex...@gmail.com wrote: Hello, I created puppet class and I want the file operation to be executed on all servers but not on server with hostname 'server1.domain.com. I tried this class, but it does not work. Is there any other way? Thanks

Re: [Puppet Users] puppet class if

2013-10-11 Thread Werner Flamme
Peter Bukowinski [11.10.2013 14:39]: On Oct 11, 2013, at 5:48 AM, Jakub Bittner rex...@gmail.com wrote: Hello, I created puppet class and I want the file operation to be executed on all servers but not on server with hostname 'server1.domain.com. I tried this class, but it does not work.

Re: [Puppet Users] puppet class if

2013-10-11 Thread Peter Bukowinski
On Oct 11, 2013, at 9:06 AM, Werner Flamme werner.fla...@ufz.de wrote: Peter Bukowinski [11.10.2013 14:39]: On Oct 11, 2013, at 5:48 AM, Jakub Bittner rex...@gmail.com wrote: Hello, I created puppet class and I want the file operation to be executed on all servers but not on server with

Re: [Puppet Users] puppet class if

2013-10-11 Thread Werner Flamme
Peter Bukowinski [11.10.2013 15:57]: On Oct 11, 2013, at 9:06 AM, Werner Flamme werner.fla...@ufz.de wrote: Peter Bukowinski [11.10.2013 14:39]: On Oct 11, 2013, at 5:48 AM, Jakub Bittner rex...@gmail.com wrote: Hello, I created puppet class and I want the file operation to be executed on

Re: [Puppet Users] puppet class if

2013-10-11 Thread Bernd Weber
Guys, check this out: http://docs.puppetlabs.com/puppet/3/reference/lang_expressions.html Either way should work. @Jakub, 2 things I see here: * you should generally make sure to use the right scope in your variables. I'm assuming from your code that you want the global facter variable

Re: [Puppet Users] puppet class and user groups question

2012-08-13 Thread jcbollinger
On Monday, August 13, 2012 12:35:32 AM UTC-5, yersinia.spiros wrote: For situation like this define the group as a virtual group , better yet define a module that contain the virtual group including it in your class and realize it when necessary. Or sometime better use the spaceship

[Puppet Users] puppet class and user groups question

2012-08-12 Thread Andrew
Hi all, so, summary: I am cant think of a way to supply group creds on the same group to two different classes that both require access to the ssl certificates. The ssl certs are group but not world accessible, 'mode = 660'. I have ldap doing tls, in one class, so the ldap user needs to be in

Re: [Puppet Users] puppet class and user groups question

2012-08-12 Thread devzero2000
For situation like this define the group as a virtual group , better yet define a module that contain the virtual group including it in your class and realize it when necessary. Or sometime better use the spaceship operator if you want to realize with a command multiple user resources, virtual of

Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3

2012-05-09 Thread heriyanto
Thank you, Dom, now its working good, epel already release new puppet and resolved my issue. On 05/04/2012 03:31 PM, Dominic Cleal wrote: On 04/05/12 04:57, heriyanto wrote: Yes nice.. its work thank you Dominic, but its still execute even its already changed its normal for new augeas?

Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3

2012-05-04 Thread Dominic Cleal
On 04/05/12 04:57, heriyanto wrote: Yes nice.. its work thank you Dominic, but its still execute even its already changed its normal for new augeas? because for old augeas not trying to change if already change. returns: executed successfully Which version of Puppet are you using? Bug

Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3

2012-05-03 Thread heriyanto
Yes nice.. its work thank you Dominic, but its still execute even its already changed its normal for new augeas? because for old augeas not trying to change if already change. returns: executed successfully my onlyif doesn't work. onlyif = match *[/files/etc/modprobe.conf[install = '$module

[Puppet Users] Puppet class not working after use augeas-0.10.0-3

2012-05-01 Thread heriyanto
Hi , This my puppet class, working nicely. But after i upgarde augeas into augeas-0.10.0-3 class modprobe { modprobe::disableModule{Disable cramfs, 2.2.2.5: module = cramfs } modprobe::disableModule{Disable freevxfs, 2.2.2.5: module = freevxfs }

Re: [Puppet Users] Puppet class not working after use augeas-0.10.0-3

2012-05-01 Thread Dominic Cleal
On 01/05/12 13:00, heriyanto wrote: Hi , This my puppet class, working nicely. But after i upgarde augeas into augeas-0.10.0-3 There was an incompatible change to the modprobe lens in Augeas 0.10.0: Modprobe: Parse commands in install/remove stanzas (this introduces a backwards

[Puppet Users] Puppet class dependency

2011-10-28 Thread Jean Baptiste Favre
Hello, There's something I don't understand with classes dependency. I saw many thread about this subject, but still can not figure how it works exactly. I'm trying to setup a debian package repository. For that, I need: - a vhost, served by nginx - repo managment tools as well as GPG key

[Puppet Users] Puppet Class is applied but is not executed

2011-06-24 Thread christian huber
Hi all, i' am having a strange problem with a puppet class, basically i wrote a small class, no special content (ensure packed is installed). I applied this class to a linuxbox with puppetclient 2.6.4 installed (and working for the other classes). So the problem if I'am forcing now the client to

[Puppet Users] Puppet Class execution order

2011-06-14 Thread Larry Ludwig
For the life of me I'm not sure why this isn't working properly but Puppet appears to execute classes in the order it feels like, not how I'm specifying it within the language. I've tried the newer sytax Class['one'] - Class['two'] Yet, I see Class two get executed first. I've also tried

[Puppet Users] puppet class syntax error

2009-07-22 Thread al...@leapfrog
I'm in the process of setting up our puppet environment, and am creating dummy classes so that I can test/use our node classification script, however my dummy classes are throwing the following error. puppetmasterd[3908]: Could not parse for environment production: Syntax error at 'Stage_cis2'