[Puppet Users] Re: Melbourne puppet catch up?

2011-04-18 Thread denmat
Hi list, Just a reminder that if you want to meet up in Melbourne tomorrow night it will be at the Workshop at around 6pm (I'll probably be there by 5.30). http://www.theworkshop.com.au/ I will try to get a table inside and have a little puppet sign on it :) Cheers, Den On Apr 6, 3:39 pm, Denm

[Puppet Users] "Listing" the keys in a hash as an array

2011-04-18 Thread Miki Shapiro
Hi all I've got node definition on the site with server interface, bonding and TCP/IP configurations inscribed in a per-node [ hash + accompanying array-of-interface-names ] (e.g. $array = [ 'eth0', 'eth1' ] $hash = { eth0 => { ipaddress => 1.2.3.4, ... } eth1 => { ip

Re: [Puppet Users] Logging configuration

2011-04-18 Thread Ben Hughes
On Mon, Apr 18, 2011 at 09:16:13AM -0700, Kal McFate wrote: > How do I tell puppet to log somewhere other than /var/log/messages. None of > the logging configuration options seem to do anything any more. Specifically > puppetdlog. /var/log/messages, will, I presume, be your syslog daemon's logg

Re: [Puppet Users] Re: What to do if something is not required on the clients?

2011-04-18 Thread Ian Mortimer
On Mon, 2011-04-18 at 23:22 +1000, jcbollinger wrote: > (I am fairly sure that > this is why the yum Package provider uses "rpm -e" instead of "yum > remove" in the first place.) Except that installing or removing packages with rpm is now deprecated: http://illiterat.livejournal.com/7834.html

[Puppet Users] Re: How to create multi-option yum repo file?

2011-04-18 Thread Sans
On Apr 18, 6:11 pm, jcbollinger wrote: > > > [rpmforge-extras] > > name = RHEL $releasever - RPMforge.net - extras > > baseurl =http://apt.sw.be/redhat/el5/en/$basearch/extras > > enabled = 0 > > protect = 0 > > If the file exists before the Puppet run, then Puppet will not split > it up, but wh

[Puppet Users] Facts with mcollective

2011-04-18 Thread Douglas Garstang
All, Just started to use mcollective. I found an example at http://www.semicomplete.com/blog/geekery/puppet-facts-into-mcollective.html: file { "/etc/mcollective/facts.yaml": ensure => file, content => inline_template("<%= scope.to_hash.reject { |k,v| !( k.is_a?(String) && v.is_a?

Re: [Puppet Users] Re: Deleted zypper repo not re-created on subsequent puppetd runs

2011-04-18 Thread Michael Knox
No problem, Are you sure that the manifest is being included? I don't see any mention of zypprepo in the debug output below. Perhaps try something like puppet agent --test --debug --tags zypprepo so you only see what zypprepo is doing. Also could you post the relevant section of your manifest?

[Puppet Users] Certificate request does not match existing certificate

2011-04-18 Thread Sylvain
Hello there, I have a problem while I'm trying to puppetize a client, I get this error: err: Could not request certificate: Certificate retrieval failed: Certificate request does not match existing certificate; run 'puppetca --clean puppetclienttest'. Here is how I proceed: -Ask for a certificate

[Puppet Users] Certificate request does not match existing certificate

2011-04-18 Thread Sylvain
Hello there, I have a problem while I'm trying to puppetize a client, I get this error: err: Could not request certificate: Certificate retrieval failed: Certificate request does not match existing certificate; run 'puppetca --clean puppetclienttest.sl.ss'. I checked -Shutdown puppet on client/se

[Puppet Users] How do you implement "revert changes'

2011-04-18 Thread Mohamed Lrhazi
I forgot to think about a little detail, while introducing Puppet to our environment :) For each change to production systems, one has to submit a script detailing what changes will be made and how to revert them back.. I was wondering if any of you, who implemented something similar, would care t

[Puppet Users] Re: Could not find dependency Package[] for Package

2011-04-18 Thread Edd Grant
Oh crap - I see what you mean. Somehow I'd convinced myself that Package["libxine1-ffmpeg"] should directly invoke my repository manager but of course that is not the case. Thanks. Edd On Apr 18, 9:50 pm, Denmat wrote: > Hi, > > Where is> Package["libxine1-ffmpeg"] > > declared in the first exa

Re: [Puppet Users] Re: Are facts cached?

2011-04-18 Thread Mohamed Lrhazi
That definitely explains the db part.. I still have no clue why the puppet agent ganerated facts would be effected by the database on the master though. Thanks a lot. On Mon, Apr 18, 2011 at 9:39 AM, Frank Sweetser wrote: > On 4/18/2011 12:38 AM, Mohamed Lrhazi wrote: >> >> This was driving me n

[Puppet Users] Re: Deleted zypper repo not re-created on subsequent puppetd runs

2011-04-18 Thread scarts
Hi Michael, Thanks for the quick reply. Hopefully this is what you're looking for. Sorry for the obfuscation - it's important where I work. In summary, below you can see I have SUSE-Linux-Enterprise-Server-11 repository defined. I applied this through zypprepo successfully. Then I manually remove i

Re: [Puppet Users] Could not find dependency Package[] for Package

2011-04-18 Thread Denmat
Hi, Where is > Package["libxine1-ffmpeg"] declared in the first example? You would need a package resource named libxine.. for puppet to reference. Cheers, Den On 19/04/2011, at 6:06, Edd Grant wrote: > Hi All, > > I am running Puppet on Ubuntu 10.10. AMD64. I have defined a class > (below)

Re: [Puppet Users] editing property files

2011-04-18 Thread Denmat
Hi, Don't think so. You can use Augeas for editing config files in place, templates for adding in values on the fly or source files for direct copies. I don't know of others but someone else on the list might know cooler tricks. Cheers, Den On 18/04/2011, at 23:08, David Kavanagh wrote: > I

Re: [Puppet Users] Deleted zypper repo not re-created on subsequent puppetd runs

2011-04-18 Thread Michael Knox
Hi, For checking that a resource exists Zypprepo (and yumrepo) simply check for the presence of the repo file. Is your zypprepo defined using the name SUSE-Linux-Enterprise-Server-11? zypprepo {"SUSE-Linux-Enterprise-Server-11": } This causes zypprepo to look for /etc/zypp/repos.d/SU

[Puppet Users] Could not find dependency Package[] for Package

2011-04-18 Thread Edd Grant
Hi All, I am running Puppet on Ubuntu 10.10. AMD64. I have defined a class (below) with which I wish to install basic audio and video packages. class audio-video { $packagelist = ["vlc", "amarok"] package { $packagelist: ensure => installed, # Require xine to be installed prior to th

[Puppet Users] Re: Dependencies between nodes

2011-04-18 Thread Michael.Lausch
On Apr 18, 3:04 pm, Felix Frank wrote: > On 04/17/2011 10:56 AM, Michael.Lausch wrote: > > > > > > > > > > > Hi, > > I'm just getting my feet wet with puppet and I want to solve inter- > > node dependencies. > > For example I want to install client-server programs on different > > nodes and make

[Puppet Users] Re: Duplicate definition: Service[cron] is already defined

2011-04-18 Thread jcbollinger
On Apr 18, 4:50 am, Wilmer van der Gaast wrote: > Hello, > > To avoid silly micro-management of my "fleet" I've started using > Puppet. Now I'm probably missing some "best practices". > > I'm currently getting a "Duplicate definition: Service[cron] is > already defined" on my configs. Indeed the

[Puppet Users] Deleted zypper repo not re-created on subsequent puppetd runs

2011-04-18 Thread scarts
I'm testing zypprepo successfully to configure additional repositories to my SLES/SLED boxes, but as a final test I deleted a named repo manually from a computer that had previously been successfully configured by puppet, re-ran puppetd and it just seems to think the repo is still there. My agent l

[Puppet Users] Re: Root Password and Stages

2011-04-18 Thread jcbollinger
On Apr 18, 2:36 am, Alexander Bien wrote: > >> The problem it's that when I run the class with stages it fails with a > >> dependency cicle. > > I have a similar problem as the OP of this thread. When i deploy run > stages to have the class "yum" in the pre stage, it works fine untill i > "reali

[Puppet Users] Re: Installing port on FreeBSD

2011-04-18 Thread fafaforza
On Apr 18, 11:29 am, Felix Frank wrote: > Yes, you definitely want to set "log_output => 'on_failure'" (I think it > was) in your exec resource. > > Regards, > Felix Thanks again. it's right in the documentation :P I should pay better attention! And surprisingly openldap client installed as a

[Puppet Users] Re: Defined types and stages

2011-04-18 Thread jcbollinger
On Apr 16, 11:55 am, flzz wrote: > Greetings,  I'm doing some experimentation with stages and can't quite > figure out how to leverage stages when calling a defined type from > within a node definition.  For example if I have a class defined > > class hosts { >   define entry ($val) { >     # se

[Puppet Users] Re: How to create multi-option yum repo file?

2011-04-18 Thread jcbollinger
On Apr 16, 6:07 am, Sans wrote: > Dear all, > > How can I create a yum repo like this? > > [rpmforge] > name = RHEL $releasever - RPMforge.net - dag > baseurl =http://apt.sw.be/redhat/el5/en/$basearch/rpmforge > enabled = 1 > protect = 0 > gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-da

[Puppet Users] Re: How to setup database for Inventory Service

2011-04-18 Thread Alessandro Franceschi
Thank you for the feedback. I've momentarily postponed the inventory setup but, for the chronicle, just inserting the query you posted didn't work out of the box. I'll get back on this when sorted out other things. Al On Tuesday, April 12, 2011 1:16:07 PM UTC+2, Greg Sutcliffe wrote: > > Heya, >

[Puppet Users] Logging configuration

2011-04-18 Thread Kal McFate
How do I tell puppet to log somewhere other than /var/log/messages. None of the logging configuration options seem to do anything any more. Specifically puppetdlog. # The log file for puppet agent. This is generally not used. # The default value is '$logdir/puppetd.log'. puppetdlog

[Puppet Users] Re: ERB advice

2011-04-18 Thread jcbollinger
On Apr 15, 9:30 am, Rob McBroom wrote: > Details below, but the essential problem is this: I need to take a list of > hostnames and assign an integer for each one and ensure that the integer “is > non-negative and is no more than three decimal digits in length”. I’d prefer > that the each hos

Re: [Puppet Users] Re: Installing port on FreeBSD

2011-04-18 Thread Felix Frank
On 04/18/2011 05:23 PM, fafaforza wrote: > > > On Apr 18, 8:55 am, Felix Frank > wrote: > >> Your path syntax looks funny: > > Yeah, I wasn't sure whether Puppet did anything with it as a comma > separated variable (not an array). Set it to the normal Unix colon > separated string and seems t

[Puppet Users] Re: Installing port on FreeBSD

2011-04-18 Thread fafaforza
On Apr 18, 8:55 am, Felix Frank wrote: > Your path syntax looks funny: Yeah, I wasn't sure whether Puppet did anything with it as a comma separated variable (not an array). Set it to the normal Unix colon separated string and seems to have worked. This is the current resource: 84:ex

[Puppet Users] Re: ERB strangness, or ruby/puppet internals I don't understand

2011-04-18 Thread jcbollinger
On Apr 15, 2:10 pm, Clay Caviness wrote: > Let's say I have a very simple template > template.erb: > <% if not has_variable?("foobar") then foobar = "undefined" end -%> > foobar: <%= foobar %> > class: <%= foobar.class %> > > And a basic manifest: > template.pp: > $mytemp = template('template.er

[Puppet Users] Re: puppet can not set password for a local user account. Plus puppet can not add members to a group

2011-04-18 Thread jcbollinger
On Apr 15, 3:34 pm, hyzhang wrote: > I try to create a user account for example test1 and set the password > for it. Both puppet master and client are CentOS 5.5. > > My code on master: > > class localaccountmgmt { >         user { 'test1': >         allowdupe => 'true', >         ensure => 'pre

Re: [Puppet Users] Re: Are facts cached?

2011-04-18 Thread Frank Sweetser
On 4/18/2011 12:38 AM, Mohamed Lrhazi wrote: This was driving me nuts... I did an rm -rf /var/lib/puppet, on a client machine, and after a rerun of puppet agent, the buggy facts appear again. when I run the agent against the test master, no buggy facts... and then it hit me that I am using stored

[Puppet Users] Re: What to do if something is not required on the clients?

2011-04-18 Thread jcbollinger
On Apr 15, 8:04 pm, Sans wrote: > On Apr 15, 9:37 am, Martijn Grendelman wrote > > > > > > On Apr 15, 9:12 am, Patrick wrote: > > >> For the package example, I'd try "ensure => absent".  I think I remember > > >> that works. > > "ensure => absent" uses "rpm -e' to remove a package, which is a

Re: [Puppet Users] Re: What to do if something is not required on the clients?

2011-04-18 Thread Felix Frank
On 04/16/2011 09:12 AM, Sans wrote: > > > On Apr 16, 2:36 am, Patrick wrote: >> >>> "ensure => absent" uses "rpm -e' to remove a package, which is a >>> problem for the packages with related dependencies. Is there any way >>> to use "yum remove" to do that? Cheers!! >> >> It's been too long sinc

[Puppet Users] editing property files

2011-04-18 Thread David Kavanagh
I assumed this would be simple. I thought about using augeas, but don't want to pull that in if I don't really need it. Is there a built-in resource that I could use to edit property files that I'm missing? Thanks, David -- You received this message because you are subscribed to the Google Groups

Re: [Puppet Users] Duplicate definition: Service[cron] is already defined

2011-04-18 Thread Felix Frank
On 04/18/2011 11:50 AM, Wilmer van der Gaast wrote: > Hello, > > To avoid silly micro-management of my "fleet" I've started using > Puppet. Now I'm probably missing some "best practices". > > I'm currently getting a "Duplicate definition: Service[cron] is > already defined" on my configs. Indeed

Re: [Puppet Users] Dependencies between nodes

2011-04-18 Thread Felix Frank
On 04/17/2011 10:56 AM, Michael.Lausch wrote: > Hi, > I'm just getting my feet wet with puppet and I want to solve inter- > node dependencies. > For example I want to install client-server programs on different > nodes and make sure the version installed on the clients are the same > as on the serv

Re: [Puppet Users] is class inheritance misbehaving?

2011-04-18 Thread Felix Frank
Hi, On 04/16/2011 11:56 PM, praddy wrote: > Hey Guys, > > I was experimenting with puppet lang ( as in just learning ), found > something like below happening, i couldn't explain it to myself so > thought asking here. I have installed puppet 2.6.7 using rubygems. > > here's the manifest: > > ==

Re: [Puppet Users] Installing port on FreeBSD

2011-04-18 Thread Felix Frank
On 04/16/2011 12:26 AM, fafaforza wrote: > New user trying to get a port to compile: I tried searching but all I > get are links to the FreeBSD port of puppet. Easier to find a needle > in a haystack. > > A class has: > > exec { "port-sudo": > cwd => "/usr/ports/security/sudo",

Re: [Puppet Users] ERB strangness, or ruby/puppet internals I don't understand

2011-04-18 Thread Felix Frank
On 04/15/2011 09:10 PM, Clay Caviness wrote: > Let's say I have a very simple template > template.erb: > <% if not has_variable?("foobar") then foobar = "undefined" end -%> > foobar: <%= foobar %> > class: <%= foobar.class %> > > And a basic manifest: > template.pp: > $mytemp = template('template.

[Puppet Users] Re: Root Password and Stages

2011-04-18 Thread ikkaro
I've solved the lsb-release problem in this way: $temp_version=$operatingsystemrelease $major_version=regsubst($temp_version,'^(\d+).*$','\1') case $operatingsystem { debian: { case $major_version

[Puppet Users] Re: Root Password and Stages

2011-04-18 Thread ikkaro
I've solved the lsb-release problem in this way: $temp_version=$operatingsystemrelease $major_version=regsubst($temp_version,'^(\d+).*$','\1') case $operatingsystem { debian: { case $major_version

[Puppet Users] Duplicate definition: Service[cron] is already defined

2011-04-18 Thread Wilmer van der Gaast
Hello, To avoid silly micro-management of my "fleet" I've started using Puppet. Now I'm probably missing some "best practices". I'm currently getting a "Duplicate definition: Service[cron] is already defined" on my configs. Indeed there are two places that define the service. One's the duplicity