[Puppet Users] Re: how to have "multilines" ?

2009-06-17 Thread Serge LE LOUARNE
Hi,

I install blender ;-)

My pp file (in actual state, I have no backup of previous versions)  :

class blender {
file { "/tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":
   owner => root,
   group => root,
   mode => 644,
source => 'puppet://
formation01.giprecia.net/test/blender-2.49-linux-glibc236-py25-i386.tar.bz2
'}
Exec { path => "/usr/bin:/bin:/usr/sbin:/sbin":logoutput => false,
"tar -jxf /tmp/blender-2.49-linux-glibc236-py25-i386.tar.bz2":logoutput
=> false,
"cp -R  /tmp/blender-2.49-linux-glibc236-py25-i386 /opt/":logoutput =>
false,
"chmod -R  755 /opt/blender-2.49-linux-glibc236-py25-i386":logoutput =>
false,
"cp -R /opt/blender-2.49-linux-glibc236-py25-i386/.blender
/home/serge/":logoutput => false,
"chown -R serge:serge /home/serge/.blender":logoutput => false,
unless => "test -d /home/serge/.blender" }
}

The "unless" statement isn't follow by the puppet agent. The logs said that
the 8th line is wrong : Puppet look for a "}" ...

Thank
Serge

2009/6/17 Evan Hisey 

>
> On Wed, Jun 17, 2009 at 8:56 AM,
> serge.leloua...@free.fr wrote:
> >
> > Hi
> >
> > All is in title ;-)
> >
> > I have to run multiples Bash commands. It is just for readability of
> > the pp file.
> >
> > Thank
> > Serge
> What are you trying to do? It sounds like you are trying to work
> against the way puppet operates.
>
> Evan
>
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Gentoo rc-update and syntaxe

2009-06-17 Thread Serge LE LOUARNE
hi,

yes :


Jun 18 08:19:49 server puppetd[13617]: Starting catalog run
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns) usage:
rc-update -a|add script runlevel1 [runlevel2 ...]
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
rc-update -d|del script [runlevel1 ...]
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
rc-update -s|show [-v|--verbose] [runlevel1 ...]
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns) examples:
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)#
rc-update add net.eth0 default
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)Adds the
net.eth0 script (in /etc/init.d) to the "default" runlevel.
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)#
rc-update del sysklogd
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)Deletes
the sysklogd script from all runlevels.  The original script
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)is not
deleted, just any symlinks to the script in /etc/runlevels/*.
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)#
rc-update del net.eth2 default wumpus
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)Delete
the net.eth2 script from the default and wumpus runlevels.
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)All
other runlevels are unaffected.  Again, the net.eth2 script
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)residing
in /etc/init.d is not deleted, just any symlinks in
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
/etc/runlevels/default and /etc/runlevels/wumpus.
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)#
rc-update show
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)Show all
enabled scripts and list at which runlevels they will
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns)
execute.  Run with --verbose to see all available scripts.
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[rc-update remove bb]/returns) change from
notrun to 0 failed: rc-update remove bb returned 1 instead of 0 at
/etc/puppet/lca/devel/modules/bbRemove/manifests/bbRemove.pp:3
Jun 18 08:19:49 server puppetd[13617]:
(//Node[default]/bbremove/Exec[/etc/init.d/bb stop]/returns) change from
notrun to 0 failed: Could not find executable /etc/init.d/bb
Jun 18 08:19:50 server puppetd[13617]: (//Node[default]/bbremove/Exec[rm -f
/etc/init.d/bb]/returns) executed successfully
Jun 18 08:19:50 server puppetd[13617]: (//Node[default]/bbremove/Exec[rm -fR
/opt/bb]/returns) executed successfully
Jun 18 08:19:50 server puppetd[13617]: Finished catalog run in 0.61 seconds
===

Oups ! yes, it is better with a comma. I dont think that resolv my problem,
but I'll try as soon as possible ...

Thank
Serge

2009/6/17 RijilV 

> |...|
>
> Could you post the relevant output of a puppetd --test from the  client?
>
> I think you're also missing a comma between the logoutput and onlyif
>
>
> .r'
>
>
> >
>

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Getting started with puppet

2009-06-17 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matt Delves wrote:
| Hey Folks,
| I'm just starting to look into Puppet though am finding it a bit
| confusing as to how to get it setup on the network I administer.
At the
| moment it is a combination of RHEL 4 and SLES 10 boxes with
windows and
| novell also.
|
| I know that windows / novell is beside the point though am
wondering how
| to get puppet setup on the RHEL and SLES side of things.
|
| Any good howto's or tutorials would be greatly appreciated.

Lots of documentation out there - start with:

http://reductivelabs.com/trac/puppet/wiki/DocumentationStart

There are some tutorials cited on that page too (in the Additional
Documentation section from memory).

The next release, 0.25.0, will have Windows support for some simple
stuff initially.

Regards

James Turnbull

- --
Author of:
* Pro Linux Systems Administration
(http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet
(http://tinyurl.com/pupbook)
* Pro Nagios 2.0
(http://tinyurl.com/pronagios)
* Hardening Linux
(http://tinyurl.com/hardeninglinux)
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKOdiF9hTGvAxC30ARAkLpAJ9EsNqq+ERKtGo0TgeyM1X5fWJjwACgsRtr
TFZrjSxXrEJKF6RBAZl6xJI=
=zfKL
-END PGP SIGNATURE-

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Getting started with puppet

2009-06-17 Thread Dhruv Soi

I wrote a short howto for our internal use. Probably, could be useful to you
as well. This is for CentOS and should work for RHEL as well:
http://in.torridnetworks.com/wiki/index.php/Install_Puppet_On_CentOS 

Many Thanks,
Dhruv

-Original Message-
From: puppet-users@googlegroups.com [mailto:puppet-us...@googlegroups.com]
On Behalf Of Matt Delves
Sent: Thursday, June 18, 2009 9:27 AM
To: puppet-users@googlegroups.com
Subject: [Puppet Users] Getting started with puppet


Hey Folks,
I'm just starting to look into Puppet though am finding it a bit
confusing as to how to get it setup on the network I administer. At the
moment it is a combination of RHEL 4 and SLES 10 boxes with windows and
novell also.

I know that windows / novell is beside the point though am wondering how
to get puppet setup on the RHEL and SLES side of things.

Any good howto's or tutorials would be greatly appreciated.

Thanks,
Matt Delves




--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Getting started with puppet

2009-06-17 Thread Matt Delves

Hey Folks,
I'm just starting to look into Puppet though am finding it a bit
confusing as to how to get it setup on the network I administer. At the
moment it is a combination of RHEL 4 and SLES 10 boxes with windows and
novell also.

I know that windows / novell is beside the point though am wondering how
to get puppet setup on the RHEL and SLES side of things.

Any good howto's or tutorials would be greatly appreciated.

Thanks,
Matt Delves


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Testing if a resource is already defined

2009-06-17 Thread Avi Miller

Hi gang,

Is it possible to test if a particular resource has already been 
defined? I'd like to do something like this:

if !Host["$fqdn"] {
host {"$fqdn": ip => "$ipaddress_eth0" }
}

Essentially, test to see if there is no Host resource defined for the 
current server and if not, add a host entry for itself using the IP 
address of eth0.

Possible?

Ta,
Avi

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: passenger on Mac OS X question

2009-06-17 Thread Nigel Kersten
On Wed, Jun 17, 2009 at 5:46 PM, Allan Marcus  wrote:

>
> Yes, correct. But how can I tell if puppet is using Passenger?
>
> I see the following in my /var/log/apache2/error_log file:
>
> [Tue Jun 16 17:32:01 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/
> 2.2.11 OpenSSL/0.9.7l PHP/5.2.8 Phusion_Passenger/2.2.2 configured --
> resuming normal operations
>
> I see the following too:
>
> $ ps ax | grep -i Pass
>  2436   ??  S  0:00.04 /opt/local/lib/ruby/gems/1.8/gems/
> passenger-2.2.2/ext/apache2/ApplicationPoolServerExecutable 0 /opt/
> local/lib/ruby/gems/1.8/gems/passenger-2.2.2/bin/passenger-spawn-
> server  /opt/local/bin/ruby  /tmp/passenger.2413
>  2437   ??  S  1:28.57 Passenger spawn server
>
> but is a Passenger log? Is there anyway to confirm that puppet is
> using passenger?


You're using passenger.

Unless you also have a virtual host set up with mod_proxy to talk to mongrel
backends, or have a standalone puppetmasterd process that is using webrick,
you're using it.

Are you seeing processes like this in your process listing?

Rack: /usr/share/puppet/rack/puppetmasterd




>
>
> On Jun 17, 2009, at 6:34 PM, Nigel Kersten wrote:
>
> >
> >
> > On Wed, Jun 17, 2009 at 5:21 PM, Allan Marcus  wrote:
> >
> > How can I tell if it's using Passenger?
> >
> > So how are you starting it now?
> >
> > If you've followed those instructions on the wiki, you should only
> > be starting apache and nothing else, and the virtual host you've
> > defined will be using passenger/Rack.
> >
> >
> >
> >
> >
> > ---
> > Thanks,
> >
> > Allan Marcus
> > 505-667-5666
> >
> >
> >
> > On Jun 16, 2009, at 6:24 PM, Nigel Kersten wrote:
> >
> > >
> > > On Tue, Jun 16, 2009 at 4:39 PM, Allan Marcus wrote:
> > >>
> > >> hello,
> > >>
> > >> I have installed an configered passenger on my OS X server
> > according
> > >> to http://reductivelabs.com/trac/puppet/wiki/UsingPassenger
> > >>
> > >> Now, how do I tell puppet to use it? Do I need to put something in
> > >> my /
> > >> etc/puppet/puppet.conf file?
> > >
> > > Nope. If you have config.ru set up correctly, there's nothing
> > special
> > > for Passenger required in puppet.conf
> > >
> > > Just start apache, and it will set up a rack puppetmasterd
> > > application.
> > >
> > >>
> > >> ---
> > >> Thanks,
> > >>
> > >> Allan Marcus
> > >> 505-667-5666
> > >>
> > >>
> > >>
> > >>
> > >>>
> > >>
> > >
> > >
> > >
> > > --
> > > Nigel Kersten
> > > nig...@google.com
> > > System Administrator
> > > Google, Inc.
> > >
> > > >
> >
> >
> >
> >
> >
> >
> > --
> > Nigel Kersten
> > nig...@google.com
> > System Administrator
> > Google, Inc.
> >
> > >
>
>
> >
>


-- 
Nigel Kersten
nig...@google.com
System Administrator
Google, Inc.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: passenger on Mac OS X question

2009-06-17 Thread Allan Marcus

Yes, correct. But how can I tell if puppet is using Passenger?

I see the following in my /var/log/apache2/error_log file:

[Tue Jun 16 17:32:01 2009] [notice] Apache/2.2.11 (Unix) mod_ssl/ 
2.2.11 OpenSSL/0.9.7l PHP/5.2.8 Phusion_Passenger/2.2.2 configured --  
resuming normal operations

I see the following too:

$ ps ax | grep -i Pass
  2436   ??  S  0:00.04 /opt/local/lib/ruby/gems/1.8/gems/ 
passenger-2.2.2/ext/apache2/ApplicationPoolServerExecutable 0 /opt/ 
local/lib/ruby/gems/1.8/gems/passenger-2.2.2/bin/passenger-spawn- 
server  /opt/local/bin/ruby  /tmp/passenger.2413
  2437   ??  S  1:28.57 Passenger spawn server

but is a Passenger log? Is there anyway to confirm that puppet is  
using passenger?


---
Thanks,

Allan Marcus
505-667-5666



On Jun 17, 2009, at 6:34 PM, Nigel Kersten wrote:

>
>
> On Wed, Jun 17, 2009 at 5:21 PM, Allan Marcus  wrote:
>
> How can I tell if it's using Passenger?
>
> So how are you starting it now?
>
> If you've followed those instructions on the wiki, you should only  
> be starting apache and nothing else, and the virtual host you've  
> defined will be using passenger/Rack.
>
>
>
>
>
> ---
> Thanks,
>
> Allan Marcus
> 505-667-5666
>
>
>
> On Jun 16, 2009, at 6:24 PM, Nigel Kersten wrote:
>
> >
> > On Tue, Jun 16, 2009 at 4:39 PM, Allan Marcus wrote:
> >>
> >> hello,
> >>
> >> I have installed an configered passenger on my OS X server  
> according
> >> to http://reductivelabs.com/trac/puppet/wiki/UsingPassenger
> >>
> >> Now, how do I tell puppet to use it? Do I need to put something in
> >> my /
> >> etc/puppet/puppet.conf file?
> >
> > Nope. If you have config.ru set up correctly, there's nothing  
> special
> > for Passenger required in puppet.conf
> >
> > Just start apache, and it will set up a rack puppetmasterd
> > application.
> >
> >>
> >> ---
> >> Thanks,
> >>
> >> Allan Marcus
> >> 505-667-5666
> >>
> >>
> >>
> >>
> >>>
> >>
> >
> >
> >
> > --
> > Nigel Kersten
> > nig...@google.com
> > System Administrator
> > Google, Inc.
> >
> > >
>
>
>
>
>
>
> -- 
> Nigel Kersten
> nig...@google.com
> System Administrator
> Google, Inc.
>
> >


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: passenger on Mac OS X question

2009-06-17 Thread Nigel Kersten
On Wed, Jun 17, 2009 at 5:21 PM, Allan Marcus  wrote:

>
> How can I tell if it's using Passenger?


So how are you starting it now?

If you've followed those instructions on the wiki, you should only be
starting apache and nothing else, and the virtual host you've defined will
be using passenger/Rack.




>
>
> ---
> Thanks,
>
> Allan Marcus
> 505-667-5666
>
>
>
> On Jun 16, 2009, at 6:24 PM, Nigel Kersten wrote:
>
> >
> > On Tue, Jun 16, 2009 at 4:39 PM, Allan Marcus wrote:
> >>
> >> hello,
> >>
> >> I have installed an configered passenger on my OS X server according
> >> to http://reductivelabs.com/trac/puppet/wiki/UsingPassenger
> >>
> >> Now, how do I tell puppet to use it? Do I need to put something in
> >> my /
> >> etc/puppet/puppet.conf file?
> >
> > Nope. If you have config.ru set up correctly, there's nothing special
> > for Passenger required in puppet.conf
> >
> > Just start apache, and it will set up a rack puppetmasterd
> > application.
> >
> >>
> >> ---
> >> Thanks,
> >>
> >> Allan Marcus
> >> 505-667-5666
> >>
> >>
> >>
> >>
> >>>
> >>
> >
> >
> >
> > --
> > Nigel Kersten
> > nig...@google.com
> > System Administrator
> > Google, Inc.
> >
> > >
>
>
> >
>


-- 
Nigel Kersten
nig...@google.com
System Administrator
Google, Inc.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: passenger on Mac OS X question

2009-06-17 Thread Allan Marcus

How can I tell if it's using Passenger?

---
Thanks,

Allan Marcus
505-667-5666



On Jun 16, 2009, at 6:24 PM, Nigel Kersten wrote:

>
> On Tue, Jun 16, 2009 at 4:39 PM, Allan Marcus wrote:
>>
>> hello,
>>
>> I have installed an configered passenger on my OS X server according
>> to http://reductivelabs.com/trac/puppet/wiki/UsingPassenger
>>
>> Now, how do I tell puppet to use it? Do I need to put something in  
>> my /
>> etc/puppet/puppet.conf file?
>
> Nope. If you have config.ru set up correctly, there's nothing special
> for Passenger required in puppet.conf
>
> Just start apache, and it will set up a rack puppetmasterd  
> application.
>
>>
>> ---
>> Thanks,
>>
>> Allan Marcus
>> 505-667-5666
>>
>>
>>
>>
>>>
>>
>
>
>
> -- 
> Nigel Kersten
> nig...@google.com
> System Administrator
> Google, Inc.
>
> >


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Centralized puppet install?

2009-06-17 Thread Joe McDonagh

alop wrote:
> Has anyone had experience with a centralized puppet install?
> The preferred MO at my shop is to have minimal packages installed on a
> system locally, and most apps are installed on an NFS filer. At first
> glance it seems easy to simply have the init.d script call puppetd off
> of the share, but are their any issues with all the associated
> libraries and facter?
>
>
> This is on RHEL5 and Solaris 10.
>
> >
>   
Generally it is best practice to do it this way; you have your 
provisioning system install the bare minimum, and puppet does the rest 
for you. Of course, you'll have to test with your setup to determine if 
you need to add something to the provisioning part such as installing ruby.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Centralized puppet install?

2009-06-17 Thread alop

Has anyone had experience with a centralized puppet install?
The preferred MO at my shop is to have minimal packages installed on a
system locally, and most apps are installed on an NFS filer. At first
glance it seems easy to simply have the init.d script call puppetd off
of the share, but are their any issues with all the associated
libraries and facter?


This is on RHEL5 and Solaris 10.

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: how to have "multilines" ?

2009-06-17 Thread Evan Hisey

On Wed, Jun 17, 2009 at 8:56 AM,
serge.leloua...@free.fr wrote:
>
> Hi
>
> All is in title ;-)
>
> I have to run multiples Bash commands. It is just for readability of
> the pp file.
>
> Thank
> Serge
What are you trying to do? It sounds like you are trying to work
against the way puppet operates.

Evan

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet on SLES

2009-06-17 Thread Jeff Falgout

Justin -

On Tue, Jun 16, 2009 at 2:36 PM,  wrote:
> I currently manage approximately 150 hosts with a handful of ZLM policies,
> but I've had one too many policies lost by the management server to keep
> using this solution.
>
> I'm wondering if anyone has any experiences (good or bad) they'd be willing
> to share specific to using Puppet with SLES (9 and 10).

I've been running puppet on SLES9, SLES10, and just got SLES11 working
for a couple of years now. No problems outside of the normal puppet
ones.

>
> What experiences have you had with package management tools?  Would it be
> worth the effort to install the same tool (yum, zypper, rug, etc.) on every
> host, or just use whatever is included with the O/S?

I ditched rug and zypper and went with yum. There were enough
resources out there for yum and syncing with opensuse repositories
made it easy.
Rug and zypper, IMO, were disasters and never worked well for me - way
too slow and a PITA to configure repositories.

>
> My plan is to use two virtualized sles 10 servers to host services as listed
> below.  Do you see anything wrong with the following design?
>
> mgt01:
> -puppetmasterd/mongrel behind Apache2
> -svn repository hosted here
> -CruiseControl or some other build automation tool
> -reporting scripts
>
> mgt02:
> -installation sources for sles 9 and 10, along with a custom repo that
> contains facter, puppet, and ruby rpms
> -updates mirrored using Novell's smt
> -autoyast control files
> -dhcp/pxe (future)
>
> I'm still digging through James Turnbull's book, but are there any other
> must-read sources out there?  (besides the wiki)

Wiki and mailing list (Along with the training) were all I've used.
James' book is on my list of todos.



Jeff

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Gentoo rc-update and syntaxe

2009-06-17 Thread RijilV
2009/6/17 serge.leloua...@free.fr 

>
> hi,
>
> I use rc-update in a pp file. The same syntax typed in ssh terminal
> doesn't return anything to the standart output.
> when pupeetd launch this, an syntax error is detected !
>
> my pp :
>
>  class bbRemove {
>exec {"rc-update del bb && "/etc/init.d/bb stop && rm -f /etc/
> init.d/bb && rm -fR /opt/bb":logoutput => on_failure
>onlyif [`test -e /etc/init.d/bbr']
>}
> }
>
> Note that : the first time, BB was running : no problems ...
>
> Any idéa ?
>


Could you post the relevant output of a puppetd --test from the  client?

I think you're also missing a comma between the logoutput and onlyif


.r'

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] how to have "multilines" ?

2009-06-17 Thread serge.leloua...@free.fr

Hi

All is in title ;-)

I have to run multiples Bash commands. It is just for readability of
the pp file.

Thank
Serge
--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Gentoo rc-update and syntaxe

2009-06-17 Thread serge.leloua...@free.fr

hi,

I use rc-update in a pp file. The same syntax typed in ssh terminal
doesn't return anything to the standart output.
when pupeetd launch this, an syntax error is detected !

my pp :

 class bbRemove {
exec {"rc-update del bb && "/etc/init.d/bb stop && rm -f /etc/
init.d/bb && rm -fR /opt/bb":logoutput => on_failure
onlyif [`test -e /etc/init.d/bbr']
}
}

Note that : the first time, BB was running : no problems ...

Any idéa ?

Thank
Serge

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Solaris Packages

2009-06-17 Thread Andy Kocher

Hi,

I'm having troubles installing more than one Solaris package. My
nodes.pp looks like:

start
#/etc/puppet/test/manifests/node.pp

node basenode {
include package_OpenSSH
include package_sudo
include package_SMCfping
}

node default inherits basenode{
}
-end

Only the first include is processed.

Any help is appreciated.

cheers,
Andy


--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Server Hierarchies and other configuration questions

2009-06-17 Thread Don

> My own ntp module[1] only knows two kinds of ntp hosts: servers and
> clients. The former connect to each other and external sources, while
> the latter only connect to the local servers. The distinction is easily
> done: those nodes which have set $ntp_servers are those which connect to
> these external servers and thus _are_ servers. All others are clients.
I did this too initially- but I consider NTP an "enterprise" service
and was
going to put it in /services/ but then I would end up with two NTP
modules-
one for NTP servers in /services and one for NTP clients. That seems
really
hackish.

> You can include classes that inherit from classes that are already
> included and this will "patch up" the resources. The following is legal
> and will result in a disabled openssh service on the node "strange":
>
> class openssh {
>         service { openssh: ensure => running, enable => true }
>         class disabled inherits openssh {
>                 Service[openssh] { ensure => stopped, enable => false }
>         }
> }
>
> node fine {
>         include openssh
> }
>
> node strange inherits fine {
>         include openssh::disabled
> }
I understand how this would work for a service like ssh- but what
about in the case of something
like NTP? In that case I would have:

class ntp {
file { "/etc/ntp.conf":
source  => "puppet:///ntp/ntpclient.conf",
require => Package["ntp"]
}
}

class s_ntp {   # in /services
file { "/etc/ntp.conf":
source  => "puppet:///s_ntp/ntpserver.conf",
require => Package["ntp"]
}
}

node basenode {
include ntp
}

node xyz inherits basenode {
}

Now if I do this for my NTP master:

node ntpmaster inherits basenode {
include s_ntp
}

I'm going to have two NTP files. Is there a way to excude the earlier
definition of NTP so I'm not trying to have it update the same file
twice?

Is there a more sensible way of doing this that I'm not thinking of?

Should I just avoid /services because I clearly don't understand what
it's
for?

-Don

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: POLL: Migrating web changes across load-balanced servers

2009-06-17 Thread Marc Fournier

On Mon, 15 Jun 2009 08:41:31 -0700 (PDT)
drmikecrowe  wrote:

> 
> Hi Tim,
> 
> That's very close to where I am now, except we use mercurial instead
> of svn.  :)
> 
> However, I'm more searching for non-same hosts (i.e. no SAN).  I'm
> basically asking the question of puppet managed ( file
> { source=>"puppet:// } ) vs. another scheme.
> 
> My hunch is I do NOT want puppet managing 1000's of files and
> propagating them.  Maybe have puppet monitor a version file, and when
> that changes, execute an rsync to bring the directories into sync.

I have similar needs but have not found any satisfying solution yet.

Maybe this feature might prove useful, once it is implemented:
http://projects.reductivelabs.com/issues/184

I imagine this would allow us to do something like this:

file { "/var/www/whatever/":
  ensure => "r123",
  source => "svn://myproject.com/svn/repository/"
}

Marc



--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Server Hierarchies and other configuration questions

2009-06-17 Thread David Schmitt

Don wrote:
> I apologize if this has been asked before but if it has- my google
> technique has failed me. If anyone can point me at the right docs I'm
> happy to dive right in.
> 
> While I'm not having any problems with Puppet, I am having some
> trouble understanding the best practices.
> 
> Specifically:
> I have a basenode defined. I also have several different collections
> of servers and workstations. I've created a class called prodservers,
> a class called devservers and a class called workstations- each one
> inherits basenode and is then inherited by specific nodes. Should I be
> doing this in a class? If so what is the best place to store these
> class definitions- right now I am using manifests/classes/
> workstation.pp and server.pp. Should this be done in a module instead?
> Putting specific configuration settings in a module (even if it is a
> module called "workstation" just feels wrong.
> 
> http://reductivelabs.com/trac/puppet/wiki/PuppetBestPractice
> specifically says:
> "Stop using the manifests area to house classes, definitions, etc.
> Instead, use module exclusively to manage almost every single class,
> definition, template, file, etc."
> 
> That would seem to run counter to the way I've done things. What am I
> missing? I'd like the admin that comes after me to be able to make
> sense of this deployment.

I like to think about modules as "implementation", while the manifests 
area is "configuration" and "policy." That a node of the "webserver" 
kind should have an apache and a NTP client is policy and thus belongs 
into the manifest area. What in _means_ to have apache and NTP installed 
is implentation and should be defined in their respective modules.

> Another question:
> The sample templates.pp in the best practices page defines a baseclass
> and then several types of servers. In what case would you define a
> baseclass instead of a basenode that you inherit?

 > If you have different classes of servers then templates.pp can easily
 > get unwieldy. I'm using templates.pp and just including my server and
 > workstation specific classes. Is there a more sensible way to organize
 > this?
 >

If you ever want to switch to external node classification, it is good 
to have nodes that look like this:

node name {
$var1 = val1
$var2 = val2

include class1, class2
}

> Lastly:
> Was there a technical reason to split out /services/ and /clients/
> from the rest of the modules? It seems somewhat arbitrary and makes
> configuring certain services a little less intuitive (for example: NTP
> which is included on all servers, but has a different configuration on
> the NTP master).

My own ntp module[1] only knows two kinds of ntp hosts: servers and 
clients. The former connect to each other and external sources, while 
the latter only connect to the local servers. The distinction is easily 
done: those nodes which have set $ntp_servers are those which connect to 
these external servers and thus _are_ servers. All others are clients.


 > What's the best practice here? Do people create a
> subclass that overrides and disables the generic NTP config and
> substitutes a server config? What's the best way to define a
> "::disabled" class? The best practices gives openssh::disabled as an
> example but I'm having trouble understanding how that would work if
> the openssh class was already added to the generic server class, but
> needed to be disabled on a specific system.

You can include classes that inherit from classes that are already 
included and this will "patch up" the resources. The following is legal 
and will result in a disabled openssh service on the node "strange":


class openssh {
service { openssh: ensure => running, enable => true }
class disabled inherits openssh {
Service[openssh] { ensure => stopped, enable => false }
}
}

node fine {
include openssh
}

node strange inherits fine {
include openssh::disabled
}




Regards, DavidS


[1] http://git.black.co.at/?p=module-ntp

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Schedule puppet runs

2009-06-17 Thread David Schmitt

drmikecrowe wrote:
> I created this little batch file I put in cron.hourly (You can adapt
> to put in crontab to run on the hours you want it to):
> 
> ##
> #!/bin/bash
> SERVER="--server URL.PUPPETMASTER.COM"
> FIRST=`echo $RANDOM%1800 | bc`
> sleep $FIRST
> /usr/sbin/puppetd --onetime --no-daemonize --logdest syslog $SERVER --
> waitforcert 60
> SECOND=$((1800-$FIRST+`echo $RANDOM%1800 | bc`))
> sleep $SECOND
> /usr/sbin/puppetd --onetime --no-daemonize --logdest syslog $SERVER --
> waitforcert 60
> ##
> 
> This runs randomly between 0-30 minutes, then after 30m, another
> random interval.  So, it runs twice/hour randomly (to help with load
> spreading).  YMMV


You might want to look into creating a true cronjob using fqdn_rand() to 
avoid blocking the cron.hourly run.


Regards, DavidS

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: trying to understand puppet internal

2009-06-17 Thread David Schmitt

James Turnbull wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Aurelien Degremont wrote:
> | Jean-Baptiste Quenot a écrit :
> |> 2009/6/12 Aurelien Degremont :
> |>> Arnau Bria a écrit :
> |>>> Hi all,
> |>>>
> |>>> More test
> |>>>
> |>> If your doing benchmarking with puppet
> |>> try:
> |>>
> |>> # puppetd -t --summarize
> |>>
> |>> Really helpful.
> |> Interesting.  Any reason why this option is not documented in puppetd
> |> -h?  I'm using 0.24.8 FWIW.
> |
> | Unfortunately, there is more than just this argument which is not
> | implemented. Here is some of them:
> |
> | . centrallogging
> | . no-splay
> | . show_diff
> |
> | Those ones are visible in puppetd man page, but not explicit list in
> | OPTIONS section:
> |
> | . no-usecacheonfailure
> | . ignorecache
> | . tags
> |
> | Mainly, all options, settable in puppet.conf configuration file are
> | supported on command-line.
> | You can see all of them here:
> |
> | /usr/lib/ruby/site_ruby/1.8/puppet/defaults.rb
> |
> | 'puppetmasted' and 'puppet' command also supports much more args
> it is
> | explained in its help page.
> 
> See http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference
> 
> Every Puppet executable (generally) accepts all configuration
> options but some are obviously not appropriate.  For particular
> executables we try to document key options in the man page or --help
> output but not every possible option.
> 
> If you think one or other option SHOULD be documented in there
> please free to suggest it or submit a patch.

Don't forget that some parameters that are accepted by the programs are 
not configration options. An example would be puppetd's --test.


Regards, DavidS

--~--~-~--~~~---~--~~
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 unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---