[Puppet Users] Re: Setting savedefult options with augeas/puppet

2011-10-13 Thread Luke Bigum
Can you give me an example of a grub.conf file that you want to achieve? I don't have a dual boot windows system so not exactly sure what option you mean. On Oct 12, 9:15 pm, "James A. Peltier" wrote: > Hi All, > > I'm trying to create a puppet manifest that sets the grub default= value to > sav

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

2011-10-13 Thread Alexandre
Hi, I am trying to manage the puppet.conf file, but both my classes 'puppet' and 'puppet::master' need to manage it. Basically, the class 'puppet::master' should be able to override the resource, which could be done by inheritance. My problem is that my class 'puppet' is a parameterized class:

[Puppet Users] How to divide the puppet.conf file in multiple files ?

2011-10-13 Thread Alexandre
Hi, How can i divide my puppet.conf file in multiple files ? I would like to have the [main] and [agent] section in puppet.conf and [master] in puppetmaster.conf for example. I could call sone "include" or "import" statement inside puppet.conf to include the content of puppetmaster.conf in my co

[Puppet Users] Re: Cannot reassign variable

2011-10-13 Thread jcbollinger
On Oct 12, 4:23 pm, Mohamed Lrhazi wrote: > I have a custom fact called:  gu_app_oracle_rac > > Which gets set, indirectly, by puppet itself... and so in the very > first run it does not exist... I will be changing the whole business > of how I set these facts, but I need a quick workaround to t

Re: [Puppet Users] Re: Cannot reassign variable

2011-10-13 Thread Mohamed Lrhazi
Thanks guys, I did not realize "defined" was for resources only, not variables. The custom fact is created using a custom fact creator "fact", which makes other custom facts out of strings in a text file. the text file itself is managed by puppet. http://www.devco.net/archives/2008/06/16/rework_o

Re: [Puppet Users] How to divide the puppet.conf file in multiple files ?

2011-10-13 Thread Dean Wilson
On Thu, Oct 13, 2011 at 03:29:29AM -0700, Alexandre wrote: > How can i divide my puppet.conf file in multiple files ? > I would like to have the [main] and [agent] section in puppet.conf and > [master] in puppetmaster.conf for example. I could call sone "include" > or "import" statement inside pu

Re: [Puppet Users] Puppet cant find a class

2011-10-13 Thread Nan Liu
On Wed, Oct 12, 2011 at 2:31 PM, Boskey wrote: > Hi, > > I am having trouble getting puppet to find a class thats defined in > one of the modules.I have a module/folder called 'webserver' in /etc/ > puppet/modules/, which has a init.pp file with the below content > > class webserver{ > file {'test

Re: [Puppet Users] How to use parsedfile for more than name

2011-10-13 Thread Guy Matz
Hey!! Did you ever get anywhere with this? If so, I'd love to bounce a couple of things off of you. The lack of documentation for ParsedFile is annoying . . . thanks, Guy On Thu, Aug 4, 2011 at 9:35 PM, windowsrefund wrote: > All, > > I'm working on a provider which uses ParsedFile and am run

Re: [Puppet Users] Puppet cant find a class

2011-10-13 Thread Craig White
On Oct 12, 2011, at 2:31 PM, Boskey wrote: > Hi, > > I am having trouble getting puppet to find a class thats defined in > one of the modules.I have a module/folder called 'webserver' in /etc/ > puppet/modules/, which has a init.pp file with the below content > > class webserver{ > file {'test.

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

2011-10-13 Thread Nan Liu
On Thu, Oct 13, 2011 at 3:16 AM, Alexandre wrote: > Hi, > > I am trying to manage the puppet.conf file, but both my classes > 'puppet' and 'puppet::master' need to manage it. Basically, the class > 'puppet::master' should be able to override the resource, which could > be done by inheritance. > My

[Puppet Users] how to check if a hash/array is empty or not in puppet .pp/module (not in template)?

2011-10-13 Thread midair77
Dear all, I have a parameterized class and one of the args is a hash or an array and I would like to check if they are empty or not? I tried with class test($hash, $array){ if $hash.empty? == true { } if $array.empty? == true { } } but when I just puppet parser validate init.pp I would g

Re: [Puppet Users] how to check if a hash/array is empty or not in puppet .pp/module (not in template)?

2011-10-13 Thread Jacob Helwig
On Thu, 13 Oct 2011 10:01:49 -0700, midair77 wrote: > > Dear all, > > I have a parameterized class and one of the args is a hash or an array > and I would like to check if they are empty or not? > > I tried with > > class test($hash, $array){ >if $hash.empty? == true > { > } > if $array.e

Re: [Puppet Users] puppet apache module

2011-10-13 Thread Dan Sheffner
I found what I had was working. Was just thrown off by the warnings. On Thu, Oct 13, 2011 at 12:07 AM, thesheff17 wrote: > I'm getting this and it isn't applying my apache module. Is it because > of these warnings? > > notice: Starting Puppet client version 2.7.5 > /usr/local/rvm/gems/ruby-1.9.

[Puppet Users] Re: how to check if a hash/array is empty or not in puppet .pp/module (not in template)?

2011-10-13 Thread midair77
Thank you very much.. I am writing a function to do that. On Oct 13, 10:51 am, Jacob Helwig wrote: > On Thu, 13 Oct 2011 10:01:49 -0700, midair77 wrote: > > > Dear all, > > > I have a parameterized class and one of the args is a hash or an array > > and I would like to check if they are empty o

Re: [Puppet Users] Re: how to check if a hash/array is empty or not in puppet .pp/module (not in template)?

2011-10-13 Thread Dan White
Please share it back with the list when you get it working. Thanks. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) - midair77 wrote: > Thank you very much.. I am writing

[Puppet Users] Re: Problem with custom function returning array

2011-10-13 Thread Nate
Anybody have any thoughts on this? On Oct 7, 8:50 am, Nate wrote: > Hi, > > I'm trying create acustomfunctionthat willreturnanarrayof file > paths for the file type source.  Instead of defining the followingarrayfor > source for each file type: > > file: { "some_file": >   source => [ "puppet://

Re: [Puppet Users] Re: Problem with custom function returning array

2011-10-13 Thread Jacob Helwig
Did you topo part of the function definition, or does it actually have 'returnsources' at the end of the newfunction block? You should have 'return sources', 'sources', or just leave that bit off, since 'sources << "puppet:///files/common/#{filename}"' will return the value of sources. -- Jacob

[Puppet Users] Re: Could not retrieve local facts: private method `split' called for nil:NilClass

2011-10-13 Thread Berry Sizemore
I would use puppet-enterprise-1.2.3-solaris-10-sparc instead of 1.2.1, but the installer is broken. I filed this bug on the issue - http://projects.puppetlabs.com/issues/10069 - and if the package doesn't have a problem, then I have no idea what dependency we haven't satisfied. Thanks, Berry On

[Puppet Users] Announce: Puppet 2.7.6rc3 available

2011-10-13 Thread Michael Stahnke
Puppet 2.7.6rc3 is available. This release candidate fixes a regression in the Exec resource that prevented multi-line execs from working properly. Release Notes for 2.7.6 series -- https://projects.puppetlabs.com/projects/puppet/wiki/Release_Notes This release is available for download at: ht

Re: [Puppet Users] parsedfile help needed

2011-10-13 Thread Guy Matz
Thanks for the reply!! One more thing I can't quite figure out: How to get a new entry in my target file! I can parse, but an entry in manifests doesn't magically appear. Do I need to add something to my provider or type to get that to happen? Any help would be s appreciated; i'm getting t

Re: [Puppet Users] Re: Setting savedefult options with augeas/puppet

2011-10-13 Thread James Peltier
On Thu, Oct 13, 2011 at 1:24 AM, Luke Bigum wrote: > Can you give me an example of a grub.conf file that you want to > achieve? I don't have a dual boot windows system so not exactly sure > what option you mean. > # grub.conf generated by anaconda > # > # Note that you do not have to rerun gr

Re: [Puppet Users] Re: Setting savedefult options with augeas/puppet

2011-10-13 Thread James A. Peltier
- Original Message - | On Thu, Oct 13, 2011 at 1:24 AM, Luke Bigum | wrote: | | > Can you give me an example of a grub.conf file that you want to | > achieve? I don't have a dual boot windows system so not exactly sure | > what option you mean. | | | | | > # grub.conf generated by ana

Re: [Puppet Users] Problem with custom function returning array

2011-10-13 Thread Nan Liu
On Fri, Oct 7, 2011 at 6:50 AM, Nate wrote: > Hi, > > I'm trying create a custom function that will return an array of file > paths for the file type source.  Instead of defining the following > array for source for each file type: > > file: { "some_file": >  source => [ "puppet:///file/$hostname/

Re: [Puppet Users] Re: how to check if a hash/array is empty or not in puppet .pp/module (not in template)?

2011-10-13 Thread Nan Liu
On Thu, Oct 13, 2011 at 11:41 AM, midair77 wrote: > Thank you very much..  I am writing a function to do that. > > > On Oct 13, 10:51 am, Jacob Helwig wrote: >> On Thu, 13 Oct 2011 10:01:49 -0700, midair77 wrote: >> >> > Dear all, >> >> > I have a parameterized class and one of the args is a hash

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 bot

Re: [Puppet Users] parsedfile help needed

2011-10-13 Thread Adrien Thebo
Unfortunately, the parsedfile provider is mainly documented by code that uses it. I've been meaning to write up a document on it, but I've been unable to find the time. In the mean time, the OSUOSL has some providers for gentoo that use the parsedfile provider, found at https://github.com/ramereth/

[Puppet Users] I managed to break my Cent5 mongrel puppetmaster after upgrading from EPEL .25.5 to 2.6.6

2011-10-13 Thread Mark Christian
CentOS release 5.7 (Final) puppet-server-2.6.6-1.el5.noarch ruby-1.8.5-19.el5_6.1.x86_64 rake, version 0.9.2 The upgrade from 25.5 to 2.6.6 had been working fine. Not sure if this is relevant: I then attempted to get puppet-dashboard working using this guide: http://docs.puppetlabs.com/guides/in

[Puppet Users] Re: I managed to break my Cent5 mongrel puppetmaster after upgrading from EPEL .25.5 to 2.6.6

2011-10-13 Thread Mark Christian
I removed the rubygem-mongrel rpm and reinstalled it. That appears to have fixed my issue. On Oct 13, 6:22 pm, Mark Christian wrote: > CentOS release 5.7 (Final) > puppet-server-2.6.6-1.el5.noarch > ruby-1.8.5-19.el5_6.1.x86_64 > rake, version 0.9.2 > > The upgrade from 25.5 to 2.6.6 had been wo

[Puppet Users] defined resource type not working in 2.7.5

2011-10-13 Thread CraftyTech
Hello All, I'm having problems getting a simple defined resource type work. Here's an example of what I'm trying to run: class app_deployer2 { define fil($ensure) { file {$name: content => "this is a test" } } fil { "File1" :ensure => "/tmp/file1" } } # But when I run it, I ke

[Puppet Users] Re: defined resource type not working in 2.7.5

2011-10-13 Thread CraftyTech
This is the whole file: class app_deployer2 { define fil($ensure= "present", $path) { file {$name: content => "this is a test" } } fil { "File1": path => "/tmp/file1" } } # and this is the error message I keep on getting: "err: Failed to apply catalog: Parameter path failed: File paths mu

[Puppet Users] Redhat and Scientific Linux

2011-10-13 Thread Johan Sunnerstig
Hello. We're running a mix of Redhat and SL, for the same reasons I would guess many others do, which is to say it saves us money on "misc" servers where support contracts, ISV/IHV certification and so forth aren't needed. I'm curious about how others handle this with regards to Facter and OS d