Re: [Puppet Users] scope of default values

2011-05-02 Thread Andreas Kuntzagk
Hi, Since I also have many nfsmounts and want to make sure that the mountpoint exist, I'd like to use require. Is there a way I can reference the name of the mountpoint in the require? Like so. mount {"test2": device => "server1:/test2", require => File[$name] } If you have

[Puppet Users] Puppet bootstrap: via cdist

2011-05-02 Thread Nico -telmich- Schottelius
Good morning puppets, as stated for reallife, "one always meets more than one time", this is true for puppet and me: Although I'm migrating away from puppet [0] to cdist [1], a customer requests a new puppet installation. This brings me again to the question on how to bootstrap a new puppet infra

Re: [Puppet Users] Re: Is this a valid statement?

2011-05-02 Thread Felix Frank
On 04/30/2011 01:52 AM, Roberto Bouza wrote: > Thanks for the help. > > I opted to used strings on the variables, which to me is not good!!! > (not a proper defined language) > > I should be able to use the types true, false and should be able to > check for the nothing/nil/undef variable which I

Re: [Puppet Users] Adding already defined users to a group when its created

2011-05-02 Thread Felix Frank
On 05/01/2011 01:05 PM, Denmat wrote: > Hi, > > Sorry, just so I'm clear. > > You want create a user and a user group, and then add that user to an sshuser > group? > > Can you create the user with all those groups by default? I don't see why it > has to be so complicated unless you have some

Re: [Puppet Users] scope of default values

2011-05-02 Thread Felix Frank
On 05/02/2011 09:28 AM, Andreas Kuntzagk wrote: > Hi, > >>> Since I also have many nfsmounts and want to make sure that the >>> mountpoint >>> exist, I'd like to use require. Is there a way I can reference the >>> name of >>> the mountpoint in the require? Like so. >>> >>> mount {"test2": >>>

Re: [Puppet Users] Connection reset by peer

2011-05-02 Thread Dmitry
Thank you!!! It was a problem with DNS-server. The second DNS-server, that was in resolv.conf, don't answer for requests. -- 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 uns

[Puppet Users] help with template and has_variable?

2011-05-02 Thread Arnau Bria
Hi all, I'm getting crazy with this... I have some templates where I use has_variable? with no problem. But now I have problems in new one. nods.pp node 'my_node' { $CVMFS_mountpoint = "/mnt/cvmfs" $CVMFS_file = "/etc/auto.cvmfs" [...] include some_class_that_already_inclu

Re: [Puppet Users] help with template and has_variable?

2011-05-02 Thread Felix Frank
On 05/02/2011 03:24 PM, Arnau Bria wrote: > /nfsfile:/etc/auto.home > -rw,hard,intr,tcp,async,rsize=32768,wsize=32768,timeo=600 > <% if has_variable?("CVMFS_mountpoint") and has_variable?("CVMFS_file") %> > <%= CVMFS_mountpoint %> <%= CVMFS_file %> > <% end %> > > This gives : > > err:

[Puppet Users] exec resource: negate onlyif condition

2011-05-02 Thread Andreas Kuntzagk
Hi, today I'm stupid. How can I negate the test for execs onlyif? I want to run the exec onlyif command returns 1. regards, Andreas -- 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

Re: [Puppet Users] exec resource: negate onlyif condition

2011-05-02 Thread Felix Frank
On 05/02/2011 03:37 PM, Andreas Kuntzagk wrote: > Hi, > > today I'm stupid. How can I negate the test for execs onlyif? > > I want to run the exec onlyif command returns 1. > > regards, Andreas Hi, use "unless" instead of "onlyif". Cheers, Felix -- You received this message because you are

Re: [Puppet Users] help with template and has_variable?

2011-05-02 Thread Arnau Bria
On Mon, 02 May 2011 15:31:01 +0200 Felix Frank wrote: [...] > "Constant"? > > This is a complete shot in the dark, but have you tried downcasing > those to "cvmfs_mountpoint" and "cvmfs_file"? that worked! > Looks to me like ruby thinks its dealing with constants, whereas it > should be looking

Re: [Puppet Users] help with template and has_variable?

2011-05-02 Thread Felix Frank
On 05/02/2011 03:41 PM, Arnau Bria wrote: > On Mon, 02 May 2011 15:31:01 +0200 > Felix Frank wrote: > > [...] >> "Constant"? >> >> This is a complete shot in the dark, but have you tried downcasing >> those to "cvmfs_mountpoint" and "cvmfs_file"? > that worked! > >> Looks to me like ruby thinks i

Re: [Puppet Users] exec resource: negate onlyif condition

2011-05-02 Thread Andreas Kuntzagk
Stupid me! Did not see this. Thanks. Felix Frank wrote: On 05/02/2011 03:37 PM, Andreas Kuntzagk wrote: Hi, today I'm stupid. How can I negate the test for execs onlyif? I want to run the exec onlyif command returns 1. regards, Andreas Hi, use "unless" instead of "onlyif". Cheers, Felix

Re: [Puppet Users] help with template and has_variable?

2011-05-02 Thread Christian Kauhaus
Am 02.05.2011 15:41, schrieb Arnau Bria: > so, any ideawhy is ruby doing it? Identifiers beginning with uppercase letters denote constants in Ruby. The most visible example for this rule are class names. Class names are constants that point to their respective class objects. Regards Christian

[Puppet Users] Re: How to check if a package exists

2011-05-02 Thread jcbollinger
On May 1, 2:14 am, "Rakhesh Sasidharan" wrote: > On Sat, 30 Apr 2011 23:21 -0700, "Sans" wrote: > > On May 1, 4:59 am, Matthew Black wrote: > > > You can put a requires in the file resource > > > > require => Package["packagename"] > > > > then it will install the package first then put in the

[Puppet Users] Could not request certificate: undefined method `closed?' for nil:NilClass

2011-05-02 Thread crosmuller
Hi list, I am trying to get a puppet certificate on a new client but I get error: err: Could not request certificate: undefined method `closed?' for nil:NilClass I googled and found that it had something to do with reverse DNS lookup, the client is behind a NAT firewall so I assume a reverse loo

Re: [Puppet Users] Could not request certificate: undefined method `closed?' for nil:NilClass

2011-05-02 Thread James Turnbull
crosmuller wrote: > Hi list, > > I am trying to get a puppet certificate on a new client but I get > error: > > err: Could not request certificate: undefined method `closed?' for > nil:NilClass > > I googled and found that it had something to do with reverse DNS > lookup, the client is behind a

Re: [Puppet Users] Re: run stages and mixed class styles

2011-05-02 Thread vagn scott
I took another pass at this and it seems to work the way I expected it to. I'm not sure why it didn't work before, and I don't have time right now to look into it. Anyway, thanks to those who replied. If I find anything interesting I will post it. -- thanks, vagn On 04/29/2011 10:53 AM, jcbo

[Puppet Users] Re: run stages and mixed class styles

2011-05-02 Thread jcbollinger
On Apr 29, 11:29 am, "R.I.Pienaar" wrote: > Sounds like you want resource chaining[1], you can resource chaining to affect > the order of lots of other resources/classes. > > So: > > class aptproxy { >    # set up the proxy > >    Class["aptproxy"] -> Package <| provider == apt |> > > } > > now

[Puppet Users] Resolving/ Expanding module puppet:/// URI in exec line

2011-05-02 Thread Edd Grant
Hi All, I have defined the following module to untar/unzip and copy the Maven distributable to a convenient location: class apache-maven-v3 { exec { "/bin/tar xzf /etc/puppet/modules/apache-maven-v3/files/ apache-maven-3.0.3-bin.tar.gz": cwd => "/usr/local/java", creates => "/usr/local/

[Puppet Users] Re: ssh::auth Question

2011-05-02 Thread jcbollinger
On Apr 30, 6:01 pm, Douglas Garstang wrote: > Hmmm... I'm not sure how else to ask it. Does auth.pp run on the puppet > master or the clients? In an agent/master setup, all Puppet manifests are compiled on the master into a node-specific catalog that is sent to and applied on the client. To the

Re: [Puppet Users] Resolving/ Expanding module puppet:/// URI in exec line

2011-05-02 Thread Nan Liu
Use a file resource to deploy it to the agent and make the exec depend on the file resource. On May 2, 2011, at 7:58, Edd Grant wrote: > Hi All, > > I have defined the following module to untar/unzip and copy the Maven > distributable to a convenient location: > > class apache-maven-v3 { > exec

Re: [Puppet Users] Automating Nagios with Puppet

2011-05-02 Thread Juan-Francisco Diez
Hi all, Sorry to not reply earlier. All you mention work fine. The directory can be change using the target parameter. The path must be absolute. Thanks for all. Juan-FRancisco 2011/4/29 lluis > Hi, > beware of this if you change default file locations: > > "You can purge Nagios resources us

Re: [Puppet Users] Could not request certificate: undefined method `closed?' for nil:NilClass

2011-05-02 Thread Patrick
On May 2, 2011, at 7:43 AM, James Turnbull wrote: > crosmuller wrote: >> Hi list, >> >> I am trying to get a puppet certificate on a new client but I get >> error: >> >> err: Could not request certificate: undefined method `closed?' for >> nil:NilClass >> >> I googled and found that it had som

Re: [Puppet Users] Could not request certificate: undefined method `closed?' for nil:NilClass

2011-05-02 Thread Chantal Rosmuller
On Mon, May 2, 2011 at 6:56 PM, Patrick wrote: > > On May 2, 2011, at 7:43 AM, James Turnbull wrote: > > > crosmuller wrote: > >> Hi list, > >> > >> I am trying to get a puppet certificate on a new client but I get > >> error: > >> > >> err: Could not request certificate: undefined method `closed

Re: [Puppet Users] Could not request certificate: undefined method `closed?' for nil:NilClass

2011-05-02 Thread Patrick
On May 2, 2011, at 11:01 AM, Chantal Rosmuller wrote: > > > On Mon, May 2, 2011 at 6:56 PM, Patrick wrote: > > On May 2, 2011, at 7:43 AM, James Turnbull wrote: > > > crosmuller wrote: > >> Hi list, > >> > >> I am trying to get a puppet certificate on a new client but I get > >> error: > >>

Re: [Puppet Users] Resolving/ Expanding module puppet:/// URI in exec line

2011-05-02 Thread Patrick
This answer works. A move complicated answer for why is that an exec is basically just a command that's run. If tar doesn't know how to use puppet URIs, (which is doesn't) that syntax won't work. You can put the file on the machine using a file resource. Using wget to get the file works too.

[Puppet Users] Conditionals

2011-05-02 Thread Giovanni Bordello
Hi guys, I'm trying to get my head around conditionals and variables. What I'm trying to do now is to distinguish between puppet servers and puppet clients and deliver some settings differently. How can I do that? I tried to put a variable in the node classes: node 'puppet1' { $p

Re: [Puppet Users] Conditionals

2011-05-02 Thread Martin Alfke
Hi, general: it would be nice if you could also send logoutput. On 05/03/2011 08:34 AM, Giovanni Bordello wrote: > Hi guys, > > I'm trying to get my head around conditionals and variables. > > What I'm trying to do now is to distinguish between puppet servers and > puppet clients and deliver s