[Puppet Users] strange service behaviour in kickstart chroot

2012-02-14 Thread hai wu
This is a simple test code, named as 'a.pp': service { 'cups': enable => false, } During RHEL kickstart process, I tried to run the above after doing "chroot /mnt/sysimage" If 'chkconfig --list cups' shows cups is on, no mater how many time you ran "puppet apply a.pp", it always seems to see n

[Puppet Users] Re: Dynamically extending the group membership of a custom system user

2012-02-14 Thread jcbollinger
On Feb 13, 6:59 am, Christian Requena wrote: > Hello, > > I need to expand the membership of a custom system user depending on the > availability of some group on the target system i.e. > >     user { >      "logger": >      name => "logger", >      ensure => "present", >      groups => ["adm",

[Puppet Users] Re: SSL certificates issues with some of the nodes

2012-02-14 Thread jcbollinger
On Feb 13, 10:58 am, Mukul Malhotra wrote: > Hi, > > I am getting the following error message as after removing the SSL > certificates from the node & server, > > *err: Could not request certificate: Retrieved certificate does not match > private key; please remove certificate from server and re

[Puppet Users] Re: strange service behaviour in kickstart chroot

2012-02-14 Thread jcbollinger
On Feb 14, 2:59 am, hai wu wrote: > This is a simple test code, named as 'a.pp': > > service { 'cups': >   enable => false, > > } > > During RHEL kickstart process, I tried to run the above after doing "chroot > /mnt/sysimage" > > If 'chkconfig --list cups' shows cups is on, no mater how many ti

Re: [Puppet Users] Re: strange service behaviour in kickstart chroot

2012-02-14 Thread hai wu
There are no single or double quotes. That is the exact file I manually run inside chroot environment during kickstart phase. I am kickstarting RHEL6U2 server, and in kickstart ssh access is turned on, so I could ssh into chroot environment, and do "chroot /mnt/sysimage". When I manaully run this c

[Puppet Users] inherits from parametrized class

2012-02-14 Thread ruslan usifov
Hello In is possible inherits from parametrized class?? For example i have base php52 class like this: class linux::php52($pools, $extensions='') inherits linux { .. } and whants to inherit it like this: class linux::php52::cluster inherits linux::php52 for cluster configuration (c

[Puppet Users] Re: SSL certificates issues with some of the nodes

2012-02-14 Thread mukulm
Thanks for the valuable info but my scenario is option (A) but my question is if once SSL certificates are signed for a node then how & due to what reason the SSL private key changes & what does preserving SSL private keys means ? Thanks mukulm On Feb 14, 7:14 pm, jcbollinger wrote: > On Feb

[Puppet Users] Re: Removing the ability to serve symlinks as symlinks from the master...

2012-02-14 Thread jcbollinger
On Feb 13, 4:58 pm, Daniel Pittman wrote: > G'day. > > We recently found some issues with the `links => follow` setting in > recursive file copying; the designed behaviour is that it should allow > you to determine if the master serves a symlink in a module as a > symlink, or as the content of t

[Puppet Users] exec: How to logoutput => on_failure and get STDERR too?

2012-02-14 Thread Peter Valdemar Mørch
When a *nix command fails, it most often prints an error to STDERR: capmon@peter:~> /bin/rm /nonexist /bin/rm: cannot remove `/nonexist': No such file or directory exec's logoutput => true doesn't capture STDERR by default: capmon@peter:~> puppet -e 'exec { e: command => "/bin/rm /nonexist", lo

[Puppet Users] How to escape exec command parameters?

2012-02-14 Thread Peter Valdemar Mørch
If I have a "simple" variable value, this works fine: capmon@peter:~> puppet -e '$v="xyz" exec { f: command => "/bin/echo v is $v", logoutput => true }' notice: /Stage[main]//Exec[f]/returns: v is xyz notice: /Stage[main]//Exec[f]/returns: executed successfully But how do I escape "bad" values of

[Puppet Users] Re: inherits from parametrized class

2012-02-14 Thread Bill Proud
You can only inherit from a parameterised class if you provide defaults for all of the parameters (and then of course those are the values that are used). What you could do is just have a single class with something like a type parameter. Then your class would have something like: if $type == "lo

[Puppet Users] Re: strange service behaviour in kickstart chroot

2012-02-14 Thread hai wu
I tried the following by uninstalling puppet client rpm inside kickstart chroot environment, and reinstalling the following puppet agent rpm, and all of them are failing in the same way: puppet-2.6.9-2.el6.noarch.rpm puppet-2.7.9-1.el6.noarch.rpm puppet-2.7.10-1.el6.noarch.rpm On 2/14/12, hai wu

Re: [Puppet Users] inherits from parametrized class

2012-02-14 Thread Nan Liu
On Tue, Feb 14, 2012 at 6:49 AM, ruslan usifov wrote: > Hello > > In is possible inherits from parametrized class?? It's not currently possible, and I don't know if it's 100% clear when you inherit and add parameters do you intend inherit the parent's default, override the parent's default, or to

[Puppet Users] iterating over an array of hashs

2012-02-14 Thread spokra
Since there are no looping constructs in puppet other that passing an array to a defined resource. I'm passing an array of hashs to a defined resource and I'm getting a string that is the contests of the hash. is there away in puppet to cast a variable to the correct data type?Or is there a

Re: [Puppet Users] iterating over an array of hashs

2012-02-14 Thread Gary Larizza
Steven, You can use Hashes all the way. See --> https://github.com/glarizza/puppet-datademo/blob/master/hieradb/puppetmaster.puppetlabs.vm.yaml for my Hiera YAML file and declare with: $war_installs = hiera_hash('war_installs') create_resources('tomcat::war', $war_installs) Does this help? O

[Puppet Users] Re: strange service behaviour in kickstart chroot

2012-02-14 Thread hai wu
Further troubleshooting shows that this is likely caused by 'chkconfig cups' command does not run well in kickstart chroot environment: # chkconfig cups cannot determine current run level While the same command is working fine in a normal RHEL6 environment. This is the file "puppet/provider/servi

[Puppet Users] Undocumented feature: puppet --noop

2012-02-14 Thread Peter Valdemar Mørch
http://docs.puppetlabs.com/man/apply.html does not mention a --noop parameter, but it works: capmon@peter:~> puppet apply --noop -e 'file { "/tmp/foo": ensure => present }' notice: /Stage[main]//File[/tmp/foo]/ensure: is absent, should be present (noop) Can I rely on this in future versions? If s

[Puppet Users] Re: strange service behaviour in kickstart chroot

2012-02-14 Thread hai wu
I think this is confirmed now. In kickstart chroot in RHEL6, 'runlevel' would return this output: "unknown". If I change the binary '/sbin/runlevel' file with a shell script after backing it up first: # cat /sbin/runlevel echo "N 3" Then everything is fine. Also by replacing /var/run/utmp with

Re: [Puppet Users] iterating over an array of hashs

2012-02-14 Thread Steven Pokrandt
here is my code, yaml and error: what am i missing here? define tomcat::wars($environment,$hostname) { $instance=$name $wars = hiera_hash('wars') create_resources('tomcat::war',$wars) } class tomcat::war ( $wars = {} ) { notice($wars) } wars: 'card-managment': app_version:

Re: [Puppet Users] iterating over an array of hashs

2012-02-14 Thread Gary Larizza
On Tue, Feb 14, 2012 at 11:04 AM, Steven Pokrandt wrote: > here is my code, yaml and error: > > what am i missing here? > > define tomcat::wars($environment,$hostname) { > $instance=$name > $wars = hiera_hash('wars') > create_resources('tomcat::war',$wars) > These two lines should be in yo

Re: [Puppet Users] iterating over an array of hashs

2012-02-14 Thread Steven Pokrandt
We run many tomcat instances on each machine. and the instance is not know until another hiera call is made. is it not possible to use create resource in a class? On Tue, Feb 14, 2012 at 11:13 AM, Gary Larizza wrote: > > > On Tue, Feb 14, 2012 at 11:04 AM, Steven Pokrandt wrote: > >> here is

Re: [Puppet Users] iterating over an array of hashs

2012-02-14 Thread Gary Larizza
Inside a class is fine, but notice that you did it INSIDE the very defined resource type that you're calling out to (i.e. you're trying to declare resources of type yum::wars INSIDE the parameter declaration section OF the yum::wars defined resource type) :) Try putting them in another class (or

Re: [Puppet Users] iterating over an array of hashs

2012-02-14 Thread Steven Pokrandt
ok now that I have that working... thank you!! I have one more question,, say i have the following strings. $version="1.2.3" $url="/path/to/file-${version}" is there have puppet do the replacement as if it were $version="1.2.3" $string = "/path/to/file-${version}" On Tue, Feb 14, 2012 at

Re: [Puppet Users] iterating over an array of hashs

2012-02-14 Thread Gary Larizza
In Hiera? Use %{} in place of ${} and give it a shot :) On Tuesday, February 14, 2012, Steven Pokrandt wrote: > ok now that I have that working... thank you!! I have one more question,, > say i have the following strings. > $version="1.2.3" > $url="/path/to/file-${version}" > > is there have p

[Puppet Users] Augeas question a

2012-02-14 Thread rvlinden
Hi, I'm having some 'strange' issues with augeas and an onlyif statement This is my code augeas { "classx_sysctl_shmmax": incl=> '/etc/sysctl.conf', lens=> 'Sysctl.lns', changes => "set kernel.shmmax ${sysctl_kernel_shmmax}", onlyif => "get kernel.shmmax < ${sysctl_kerne

[Puppet Users] Re: Augeas question a

2012-02-14 Thread rvlinden
FYI, I use puppet enterprise 2.0.2 and augeas 0.10 on RHEL6, but the same problem occured on Puppet 2.7.9 and augeas 0.9 on RHEL5/6 -- 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.c

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

2012-02-14 Thread MBroderick@TDS
We are trying to conditionalize what is required by a resource... service { "xxx": ... require => $bool-var ? { true => [ list1 ], false => [ list2 ], } } But false always seems to get selected regardless of the value of bool- var (true or false). As a workaround, we

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 "

[Puppet Users] Yaml server facts, weird message: "id00"

2012-02-14 Thread chrobry
Hello I looked on google, and here but can't seem to find a solution to my issue. I just deployed puppet to few servers, rhel6.1, and my /var/lib/puppet/ yaml/facts are having some weird variables in them. For instance on one of my servers server.yaml here is what I see: puppetversion: *id001 se

Re: [Puppet Users] puppetd hanging on some nodes

2012-02-14 Thread Daniel Pittman
On Thu, Feb 9, 2012 at 17:19, Gonzalo Servat wrote: > On Thu, Feb 9, 2012 at 5:08 PM, Gonzalo Servat wrote: >>> >>> Damn.  Well, at least we eliminated one possible cause.  Is there any >>> chance you can run with `--debug` enabled on one of the failed >>> machines, and see if that points to the

Re: [Puppet Users] Yaml server facts, weird message: "id00"

2012-02-14 Thread Daniel Pittman
On Tue, Feb 14, 2012 at 15:52, chrobry wrote: > I looked on google, and here but can't seem to find a solution to my > issue. You don't have an issue. ;) > I just deployed puppet to few servers, rhel6.1, and my /var/lib/puppet/ > yaml/facts are having some weird variables in them. > For instanc

Re: [Puppet Users] puppetd hanging on some nodes

2012-02-14 Thread Gonzalo Servat
On Wed, Feb 15, 2012 at 11:02 AM, Daniel Pittman wrote: > Sorry for not getting back to this sooner. If you are running 2.7.10, > can you try removing the file > `puppet/util/instrumentation/listeners/process_name.rb` and see if > that fixes the problem? > No worries Daniel. Yes. It did fix the

Re: [Puppet Users] puppetd hanging on some nodes

2012-02-14 Thread Daniel Pittman
On Tue, Feb 14, 2012 at 16:28, Gonzalo Servat wrote: > On Wed, Feb 15, 2012 at 11:02 AM, Daniel Pittman > wrote: >> >> Sorry for not getting back to this sooner.  If you are running 2.7.10, >> can you try removing the file >> `puppet/util/instrumentation/listeners/process_name.rb` and see if >> t

Re: [Puppet Users] Austin Puppet User's meetup

2012-02-14 Thread Jeff Adams
I'm interested, and I may have a co-worker or two interested as well. Thanks! - Jeff On 02/07/2012 09:04 PM, Dan Bode wrote: Hi Austin Puppet Users, I will be in the area in a few weeks and I would like to try to get some of the local users together to talk Puppet and have a few beers. Curio

Re: [Puppet Users] Austin Puppet User's meetup

2012-02-14 Thread Dan Bode
Just a quick update. I am currently working out the location and the exact date. It may wind up being the following week. Although I am still happy to grab a beer with some folks next week :) On Tue, Feb 14, 2012 at 8:04 PM, Jeff Adams wrote: > I'm interested, and I may have a co-worker or two i

Re: [Puppet Users] Yaml server facts, weird message: "id00"

2012-02-14 Thread Marek Dohojda
The problem I am having is that I am using this to pull inventory from the puppet server. I don't want to use mcollective since when server is down I can't get inventory. I been using this for a long time, without an issue. Not sure if this is RHEL6 issue or what? So how can I read the actua