[Puppet Users] Re: Facter + storeconfigs missing fact_values

2011-06-20 Thread josbal
I have added a simple notify check into our manifest for the offending
fact. If the value is set to expected it print a message into the
puppet log, however the nodes that aren't storing this fact in
database also are processing this conditional in the manifest as
expected.

Further more i have run puppet in debug on some of the nodes with this
issue, but there is no report attempting to process the condition,
even though i can see that require fact file is loaded at the start of
the run.

As a last resort i removed the state dir to force the client to
download the catalogue again and this seems to have forced both the
correct running of the conditional statement and the loading of the
fact value into the storeconfig database.

I shall refresh the state of all my nodes and see if this clears the
issue.

On Jun 20, 1:24 pm, Patrick Mohr kc7...@gmail.com wrote:
 Well, it would help if you can find out if the problem is with storeconfigs
 of the rest of puppet.  Does the fact seem to be affecting the manifest?







 On Sun, Jun 19, 2011 at 7:48 PM, josbal joshua.bald...@gmail.com wrote:
  Hi Guys,

  Was wondering if someone could point me in a way to diagnose my issue.

  I have a custom fact that i deployed on all my nodes. If i run the
  fact manually i get results as expected. When puppet runs only 5 or so
  nodes are storing this particular fact in the storeconfig mysql
  database. All other facts are storing fine for every node. As running
  the fact manually works on every node, i don't know why this fact for
  most nodes isn't populating in the database.

  Any ideas on how i could see what is happening within the puppet/
  facter processing?

  --
  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.

-- 
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.



Re: [Puppet Users] Adding LDAP users to system group

2011-06-20 Thread romuald FREBAULT
hi,

i'm maybe misunderstanding your quetiosn but for me there's 2 ways doing
thaht:

first with exec

exec {add_user_to_group:
 command = usermod -G mysql $user,
 unless = getent group mysql | grep $user
}

this will add mysql as secondary group for $user

or

user {$user:
groups = [primarygroup,mysql]

}

this will do the same

but for me, the best would be to handle this by your ldap configuration with
something like this

http://blog.dimaj.net/2010/07/howto-verify-that-a-member-is-part-of-a-secondary-group-in-openldap/


2011/6/14 Gareth Allen gal...@openworld.co.za

 Hi all,

 All our users are stored in LDAP, but I need to add users to a system
 group for sudo rules.  Is there a way to do this without having Puppet
 manage the user? For example:
 getent passwd gareth.allen
 gareth.allen:XX:1100:1100:Gareth Allen:/home/gareth.allen:/bin/bash

 /etc/group contents:
 mysql:x:27:

 Now, I need Puppet to do the following:
 mysql:x:27:gareth.allen

 The only way I can think of doing this is by having Puppet manage
 /etc/groups, but I'm a bit nervous of going that route. Does anyone
 have any ideas?

 Thanks,
 Gareth

 --
 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.



-- 
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.



Re: [Puppet Users] How to manage many nodes easily?

2011-06-20 Thread Ohad Levy
On Mon, Jun 20, 2011 at 6:25 AM, flex frostyn...@gmail.com wrote:
 We have many modules and many nodes, every node may use different module, so
 it's very unpleasant to modify the nodes.pp
 Then i saw the external node, but seems it only support class and we have
 many defines called in node.pp

 So here is my question: Is there another way for us to manage so many nodes
 easily or should i change all the defines to classes and using external
 nodes?
+1, later on you could restructure further if needed.


 --
 System Administrator, Focus on System Management and Basic Development

 --
 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.


-- 
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.



Re: [Puppet Users] How to manage many nodes easily?

2011-06-20 Thread Ohad Levy
On Mon, Jun 20, 2011 at 10:45 AM, Ohad Levy ohadl...@gmail.com wrote:
 On Mon, Jun 20, 2011 at 6:25 AM, flex frostyn...@gmail.com wrote:
 We have many modules and many nodes, every node may use different module, so
 it's very unpleasant to modify the nodes.pp
 Then i saw the external node, but seems it only support class and we have
 many defines called in node.pp

 So here is my question: Is there another way for us to manage so many nodes
 easily or should i change all the defines to classes and using external
 nodes?
 +1, later on you could restructure further if needed.
sorry, i meant to say you should probably start with replacing your
node statements with classes.

Ohad


 --
 System Administrator, Focus on System Management and Basic Development

 --
 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.



-- 
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 module layout

2011-06-20 Thread Bruce Bushby
One last question:

Would the list suggest implementing augeas where possible? and would
augeas fit into the module layout

Thanks
Bruce




On Jun 18, 9:29 am, Bruce Bushby bruce.bus...@gmail.com wrote:
 Hello

 I'm new to large scale puppet deployment and was hoping the list could
 offer some pointers on module layout

 My initial layout was motivated by a need to harden our Linux
 systems. I grouped the various hardening configs into:

 Kernel
 OS
 Network
 Shell
 Files
 Application

 I'm hoping I can create the same module structure within puppet.

 Using sudo as the first example, I want puppet to ensure /usr/bin/
 sudo has 4111 file perms and root:root ownership.

 Directory layout:
 I used this handy script from 
 ProfFalkenhttp://www.threedrunkensysadsonthe.net/2010/04/quick-creation-of-pupp...

 BUT...this is where things are getting a little grey.  I currently
 have:

 [root@laptop manifests]# pwd
 /etc/puppet/manifests
 [root@laptop manifests]#
 [root@laptop manifests]# tree os
 os
 |-- files
 |-- lib
 |   |-- facter
 |   `-- puppet
 |       |-- parser
 |       |-- provider
 |       `-- type
 |-- manifests
 |   |-- init.pp
 |   `-- sudo.pp
 `-- templates

 9 directories, 2 files
 [root@laptop manifests]#
 [root@laptop manifests]# cat os/manifests/sudo.pp
 # /etc/puppet/manifests/classes/sudo.pp

 class sudo {
     file { /etc/sudoers:
         owner = root,
         group = root,
         mode  = 4111,
     }}

 [root@laptop manifests]#

 Am I on the correct track?

 I'm guessing I should break the classes down into:
 sudo::perms
 sudo::ownership
 sudo::file (have puppet serve the sudo template)

 then in os/manifests/site.pp . would I import sudo?

 and the second question: How would I create hosts groups? I would like
 to group my hosts in dev, uat, staging and prod etc?

 ThanksBruce

-- 
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] Memory usage for reports

2011-06-20 Thread Matthias Saou
Hi,

I very recently upgraded from puppet 0.25.4 to 2.6.8 (both master and
all nodes), and I'm now facing serious memory usage issues. On the
master, I just added more RAM because I had the resources available
(from 2GB to 4GB). But on some nodes with 256MB of RAM, I now see some
load peaks and services being affected by high I/O caused by swapping.

My manifests haven't changed, only minor compatibility changes, so the
catalogs are performing the same.

I do see two major differences :
 * Update from 0.25.4 to 2.6.8
 * Enabled 'report' to start using Dashboard (on a separate server)

A quick testing reveals that puppet 2.6.8 on the client nodes does use
up more memory than 0.25.4 did. Where is remember seeing 40-50MB of
resident memory used (from the top of my head), I now see 80-90MB for
the same kind of node. Then with reports enabled this goes up to
110-120MB.

I already went hunting down useless or non optimized parts of the
catalogs, but apart from 2 nodes were I found recurse = true and
fixed it (using a different approach, these were nodes other than the
one for which I mention the memory usage and had puppetd at 300MB+), I
don't see anything more I could optimize, and I have looked in detail,
even analyzing a few dot files (the --graph option is really useful!).

Two questions :
1) Is it normal that memory usage of puppetd is so much higher just for
having the 'report' option enabled?
2) What can I do for low-memory nodes other than switching from puppetd
to running puppet from a cron job? (which would help somewhat, but not
fix the underlying issues)

Any pointers are welcome :-)

Matthias

-- 
Clean custom Red Hat Linux rpm packages : http://freshrpms.net/
Fedora release 14 (Laughlin) - Linux kernel 2.6.35.13-91.fc14.x86_64
Load : 0.29 0.27 0.28

-- 
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.



Re: [Puppet Users] Could not find a default provider for package

2011-06-20 Thread Christian Kauhaus
Am 19.06.2011 03:24, schrieb d0ugb:
 Need some help here. I am using puppet to mange some Gentoo boxes, and
 when working with packages I keep getting the following error:
 Could not find a default provider for package

I suspect that the portage package provider need 'eix' to function. Is eix
installed?

Regards

Christian

-- 
Dipl.-Inf. Christian Kauhaus  · k...@gocept.com · systems administration
gocept gmbh  co. kg · forsterstraße 29 · 06112 halle (saale) · germany
http://gocept.com · tel +49 345 1229889 11 · fax +49 345 1229889 1
Zope and Plone consulting and development

-- 
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] Puppet Caching Problem

2011-06-20 Thread markus
Hey,

I've got a MCollective Setup (1.2.0) with Puppet (2.6.4), an
provision
agent and an external node configuration script that fetches
configurations from a database.

Sometimes it happens, that puppet caches the configuration of the
server and doesn't notice a change in the configuration.
The only thing I can see in the log messages of a node is Caching
Catalog for ..., but I disabled caching on the puppetmaster
(ignorecache=true, usecacheonfailure=false, use_cached_catalog=false)
as well as on the node.

Is there anything I'm doing wrong here?
Markus

-- 
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.



Re: [Puppet Users] Puppet module layout

2011-06-20 Thread Ken Barber
 My initial layout was motivated by a need to harden our Linux
 systems. I grouped the various hardening configs into:

 Kernel
 OS
 Network
 Shell
 Files
 Application

 I'm hoping I can create the same module structure within puppet.

Start here:

http://docs.puppetlabs.com/guides/modules.html

 Using sudo as the first example, I want puppet to ensure /usr/bin/
 sudo has 4111 file perms and root:root ownership.

 Directory layout:
 I used this handy script from ProfFalken
 http://www.threedrunkensysadsonthe.net/2010/04/quick-creation-of-puppet-modules/

 BUT...this is where things are getting a little grey.  I currently
 have:

 [root@laptop manifests]# pwd
 /etc/puppet/manifests
 [root@laptop manifests]#
 [root@laptop manifests]# tree os
 os
 |-- files
 |-- lib
 |   |-- facter
 |   `-- puppet
 |       |-- parser
 |       |-- provider
 |       `-- type
 |-- manifests
 |   |-- init.pp
 |   `-- sudo.pp
 `-- templates

 9 directories, 2 files
 [root@laptop manifests]#

You have your modules in /etc/puppet/manifests directory - which is
probably not what you want. Modules should be located in something
like /etc/puppet/modules as per instructions above.

 [root@laptop manifests]# cat os/manifests/sudo.pp
 # /etc/puppet/manifests/classes/sudo.pp

 class sudo {
    file { /etc/sudoers:
        owner = root,
        group = root,
        mode  = 4111,
    }
 }
 [root@laptop manifests]#

 Am I on the correct track?

Close. The class with the same name as the module should live in init.pp.

So class sudo {} should be in:

$MODULE_PATH/sudo/manifests/init.pp

 I'm guessing I should break the classes down into:
 sudo::perms
 sudo::ownership
 sudo::file (have puppet serve the sudo template)

Far too fine grained probably :-). 1 class is enough to do all this
... depends on what you are trying to do. Don't go crazy with
organisation before you understand the language caveats. Start
developing _something_ and see how your organisation works for you.


 then in os/manifests/site.pp . would I import sudo?


You 'include sudo' or use the parameterized class syntax:

class { sudo: }

 and the second question: How would I create hosts groups? I would like
 to group my hosts in dev, uat, staging and prod etc?

How do you identify these hosts now?

I presume you have some DNS naming convention - this is generally what
most people do ... they have a dns name such as:

foo1.uat.mydomain.com

And they identify the class of machine this way by using regsubst or
inline_template to extract the 'uat' or 'dev' part out and use that as
a variable.

Otherwise ... you need to use node classification if your machines are
not meaningfully named and identify them with your own knowledge of
what the machines do:

node roadwarrior.mydomain.com {
  $hostgroup = uat

  include somestuff
}

node donaldduck.mydomain.com {
  $hostgroup = dev

  include somestuff
}

class somestuff {
  case $hostgroup {
uat : {
   # ... uat related stuff
}
dev : {
   # ... dev related stuff
}
  }
}

ken.

-- 
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.



Re: [Puppet Users] Re: Puppet module layout

2011-06-20 Thread Ken Barber
Augeas is a resource - I don't see how it fits in as a module. You may
_use_ it in your modules if you like.

On Mon, Jun 20, 2011 at 12:09 PM, Bruce Bushby bruce.bus...@gmail.com wrote:
 One last question:

 Would the list suggest implementing augeas where possible? and would
 augeas fit into the module layout

 Thanks
 Bruce




 On Jun 18, 9:29 am, Bruce Bushby bruce.bus...@gmail.com wrote:
 Hello

 I'm new to large scale puppet deployment and was hoping the list could
 offer some pointers on module layout

 My initial layout was motivated by a need to harden our Linux
 systems. I grouped the various hardening configs into:

 Kernel
 OS
 Network
 Shell
 Files
 Application

 I'm hoping I can create the same module structure within puppet.

 Using sudo as the first example, I want puppet to ensure /usr/bin/
 sudo has 4111 file perms and root:root ownership.

 Directory layout:
 I used this handy script from 
 ProfFalkenhttp://www.threedrunkensysadsonthe.net/2010/04/quick-creation-of-pupp...

 BUT...this is where things are getting a little grey.  I currently
 have:

 [root@laptop manifests]# pwd
 /etc/puppet/manifests
 [root@laptop manifests]#
 [root@laptop manifests]# tree os
 os
 |-- files
 |-- lib
 |   |-- facter
 |   `-- puppet
 |       |-- parser
 |       |-- provider
 |       `-- type
 |-- manifests
 |   |-- init.pp
 |   `-- sudo.pp
 `-- templates

 9 directories, 2 files
 [root@laptop manifests]#
 [root@laptop manifests]# cat os/manifests/sudo.pp
 # /etc/puppet/manifests/classes/sudo.pp

 class sudo {
     file { /etc/sudoers:
         owner = root,
         group = root,
         mode  = 4111,
     }}

 [root@laptop manifests]#

 Am I on the correct track?

 I'm guessing I should break the classes down into:
 sudo::perms
 sudo::ownership
 sudo::file (have puppet serve the sudo template)

 then in os/manifests/site.pp . would I import sudo?

 and the second question: How would I create hosts groups? I would like
 to group my hosts in dev, uat, staging and prod etc?

 ThanksBruce

 --
 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.



-- 
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.



Re: [Puppet Users] How to manage many nodes easily?

2011-06-20 Thread Ken Barber
Do you have a lot of boxes that perform the same function? You can use
the regex node syntax:

node /^db/ {
  include db
}

Or device some other way of extracting function out of the machine
name. It might save you some time.

Otherwise if your machines are fairly unique using ENC to configure
that would be a good path if you are getting sick of updating your
nodes file. Dashboard and The Foreman are two good tools to look at
for this purpose.

Ideally you want your node entries to contain only vars and classes
for a switchover to ENC to work. Param classes aren't supported in
either tool yet I believe.

ken.

On Mon, Jun 20, 2011 at 4:25 AM, flex frostyn...@gmail.com wrote:
 We have many modules and many nodes, every node may use different module, so
 it's very unpleasant to modify the nodes.pp
 Then i saw the external node, but seems it only support class and we have
 many defines called in node.pp

 So here is my question: Is there another way for us to manage so many nodes
 easily or should i change all the defines to classes and using external
 nodes?

 --
 System Administrator, Focus on System Management and Basic Development

 --
 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.


-- 
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: PuppetCA not signing Certificate-Requests

2011-06-20 Thread markus
I'm not sure whether it is a problem with the Provisioner I use.
I added a little sleep time between requesting the node to send its
CSR to the Server and the signing of this certificate on all nodes.

Until now it works perfectly.

On 18 Jun., 18:58, markus markus.fenste...@googlemail.com wrote:
 Hi!

 I'm having a setup with MCollective 1.2.0, Puppet 2.6.4 and an
 provision-agent. Most of the time this works great, but sometimes
 (every 10th node or so) I experience, that signing-requests of puppet-
 agents are not getting signed on the master.
 So the request of the puppet agent to /production/certificate/...
 ends everytime in an HTTP-Error 404.

 Does anyone have a glue about that?
 The problem is also hard to analyze because the logoutput is not very
 detailed.

 Puppet-Agent:
 Jun 18 16:10:38 ip-10-242-62-183 puppet-agent[1001]: Creating a new
 SSL key for ...
 Jun 18 16:10:38 ip-10-242-62-183 puppet-agent[1001]: Caching
 certificate for ca
 Jun 18 16:10:41 ip-10-242-62-183 puppet-agent[1001]: Creating a new
 SSL certificate request for ...
 Jun 18 16:10:41 ip-10-242-62-183 puppet-agent[1001]: Certificate
 Request fingerprint (md5): 6A:3F:63:8A:59:2C:F6:C9:5E:56:5F:39:16:FF:
 19:BE

 Puppet-Master:
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:39 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:39 +0200] GET /production/
 certificate_request/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:42 +0200] PUT /production/
 certificate_request/a.b.c.d HTTP/1.1 200 2202 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:42 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:43 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:03 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:04 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:04 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:26 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:26 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:26 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:48 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:48 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -

 Regards
 Markus

-- 
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.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread Ken Barber
The main reason I separate title from namevar is so when I have
references to the exec they stay consistent - but the command  args
can be updated independently. This matters more when I have references
that cross file boundaries.

ken.

On Sat, Jun 18, 2011 at 7:35 PM, vagn scott vagnsc...@gmail.com wrote:
 On 06/18/2011 10:31 AM, Markus Falb wrote:

 On 18.6.2011 05:30, vagn scott wrote:



 or you can do what I do and pipe that archive into tar:

         exec { true $title  wget -O - $upstream | tar xzf - --xform
 's,wordpress/,,':
                 cwd         =  $top,
                 creates     =  $top/license.txt,
                 before      =  File[ $top/setup.mysql ],
         }

 the reason for the 'true $title' part is
 that I want to be able to use this exec multiple times (it is in a
 defined class).
 So I need to get the $title in there so puppet doesn't think it is
 a duplicate definition.


 You can separate the title from the actual command

 exec { uniqe title maybe with $title in it:
        command =  wget...,
        ...
 }



 And then I have to make up a title that won't collide
 with another title somewhere else. Also, I lose a line
 of vertical space on the screen, and I have to go
 looking for what the exec is doing, instead of it being
 on the first line.   Shortcut operators don't slow me
 down at all.  Those are my tradeoffs, and why
 I chose this style.  YMMV.

 But, since you mentioned it: Is it so arcane a practice that
 I should avoid it for the sake of people reading my code?

 --
 vagn

 --
 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.



-- 
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.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
I could not do what you suggested at the weekend.
I tried all the tips you gave me. But I could not fix.
The file directory is specified, the problem is that it gives error
unpacking, and when I run the tar command line manually, it works fine.

Sorry for my English!

-- 
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: Could not find a default provider for package

2011-06-20 Thread d0ugb
Thanks for the help guys, I actually figured it out. We are using out
own build of Gentoo, which didnt include the /etc/gentoo-release file.
Therefore facter was not picking up the OS type, and didnt know what
to use for a package manager. Thanks again for the help you guys are
great!

On Jun 20, 8:04 am, Christian Kauhaus k...@gocept.com wrote:
 Am 19.06.2011 03:24, schrieb d0ugb:

  Need some help here. I am using puppet to mange some Gentoo boxes, and
  when working with packages I keep getting the following error:
  Could not find a default provider for package

 I suspect that the portage package provider need 'eix' to function. Is eix
 installed?

 Regards

 Christian

 --
 Dipl.-Inf. Christian Kauhaus  k...@gocept.com systems administration
 gocept gmbh  co. kg forsterstra e 29 06112 halle (saale) 
 germanyhttp://gocept.comtel +49 345 1229889 11 fax +49 345 1229889 1
 Zope and Plone consulting and development

-- 
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.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread Ken Barber
Did you try the logouput = on_failure in the exec?

Can you try that and run the content with the --debug flag so we can
all see the output? (try putting the output in pastie.org if its a lot
of information).

ken.

On Mon, Jun 20, 2011 at 1:28 PM, lucas.brig...@ymail.com
grillobri...@gmail.com wrote:
 I could not do what you suggested at the weekend.
 I tried all the tips you gave me. But I could not fix.
 The file directory is specified, the problem is that it
 gives error unpacking, and when I run the tar command line manually, it
 works fine.

 Sorry for my English!

 --
 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.


-- 
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: special handling for template file with XML?

2011-06-20 Thread jcbollinger


On Jun 16, 10:51 am, Guy Matz gm...@matz.org wrote:
 hi,
 i get the following error when trying to use a template with XML in it:
 Could not parse for environment production: Syntax error at ''

 So I tried using the HTML  codes for special chars but now get:
 Could not parse for environment production: Could not match lt;?xml

 anyone know if I need to specially handle XML templates?


Generally, no, you shouldn't need any special handling for templates
of XML files.  If you provide an example template with which the error
can be reproduced then we would have a better chance of helping you
more specifically.

Using XML character entities in your template is the wrong way to go,
however.  It might make ERB happier, but the resulting file wouldn't
mean the same thing to an XML processor.


John

-- 
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-dev] ANNOUNCE: Puppet 2.6.9rc1 is available

2011-06-20 Thread Todd Zullinger
Michael Stahnke wrote:
 This release is a maintenance release of the 2.6.x series of Puppet.

 This release is available for download at:
 http://puppetlabs.com/downloads/puppet/puppet-2.6.9rc1.tar.gz

Better late than never, I've pushed rpm's for this release to my
fedorapeople.org repo:

http://tmz.fedorapeople.org/repo/puppet/

Packages for EL 4 - 6 and Fedora 13 - 15 are available for testing.
Add the puppet.repo file from either the epel or fedora directories to
/etc/yum.repos.d to enable.

If you find problems with the packaging, please let me know.  If you
find other bugs, please file them in redmine:

http://projects.puppetlabs.com/projects/puppet/issues

Please note that 2.6.6 is in Fedora and EPEL testing repositories.  I
don't plan to update puppet there until 2.6.6 is pushed to the stable
updates repos.  Any help testing the 2.6.6 packages is most welcome.
Once that update is stable, we'll be better able to more closely track
the 2.6.x updates in the official repos.

-- 
ToddOpenPGP - KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~
Anyone who hates children and animals can't be all bad.
-- W.C. Fields



pgpNFxCQHenAf.pgp
Description: PGP signature


[Puppet Users] Re: Problem in wordpress moodule.

2011-06-20 Thread jcbollinger


On Jun 18, 1:35 pm, vagn scott vagnsc...@gmail.com wrote:
 On 06/18/2011 10:31 AM, Markus Falb wrote:



  On 18.6.2011 05:30, vagn scott wrote:

  or you can do what I do and pipe that archive into tar:

           exec { true $title  wget -O - $upstream | tar xzf - --xform
  's,wordpress/,,':
                   cwd         =  $top,
                   creates     =  $top/license.txt,
                   before      =  File[ $top/setup.mysql ],
           }

  the reason for the 'true $title' part is
  that I want to be able to use this exec multiple times (it is in a
  defined class).
  So I need to get the $title in there so puppet doesn't think it is
  a duplicate definition.

  You can separate the title from the actual command

  exec { uniqe title maybe with $title in it:
     command =  wget...,
     ...
  }

 And then I have to make up a title that won't collide
 with another title somewhere else. Also, I lose a line
 of vertical space on the screen, and I have to go
 looking for what the exec is doing, instead of it being
 on the first line.   Shortcut operators don't slow me
 down at all.  Those are my tradeoffs, and why
 I chose this style.  YMMV.

 But, since you mentioned it: Is it so arcane a practice that
 I should avoid it for the sake of people reading my code?


If your concern is for the people reading your code then yes, you
should give your Execs a plain-language title.  You might even find
that people reading your code includes you, six months from now.  Or
tomorrow.  The readability advantage compounds with the number of
Execs in your manifests and with the complexity of their commands.

There are advantages other than readability, as well.  In particular,
the resource title does not change when you tweak the command.  This
is important if your manifests refer to the Exec resource by title --
in another resource's before or notify parameter, for instance.


John

-- 
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.



Re: [Puppet Users] special handling for template file with XML?

2011-06-20 Thread Nigel Kersten
On Thu, Jun 16, 2011 at 8:51 AM, Guy Matz gm...@matz.org wrote:

 hi,
 i get the following error when trying to use a template with XML in it:
 Could not parse for environment production: Syntax error at ''

 So I tried using the HTML  codes for special chars but now get:
 Could not parse for environment production: Could not match lt;?xml

 anyone know if I need to specially handle XML templates?


What version of Puppet are you running? Can you post the manifest and
template?

-- 
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 module layout

2011-06-20 Thread Bruce Bushby
Thanks Ken.I think I'm getting itslowly :)

 ...Start  developing _something_ and see how your organisation works for 
 you..
RightI've started with the most basic setup  to test CA keys by
simply implementing file perms for /etc/sudoers

I think my initial confusion was that I didn't realize that when
deploying modules ... you still need a /etc/puppet/manifest/
site.pp etc

 How do you identify these hosts now?
Some of the prod systems have prod in their hostnamebut there
are a lot that don't confirm,  thanks for the examples for grouping
will give them a go.


Getting back to my ultra simple setup, I'm finding that I can't run
puppetd --test:
[root@msukpuppet02 puppet]# puppetd --test
err: Could not retrieve catalog from remote server: SSL_connect
returned=1 errno=0 state=SSLv3 read server certificate B: certificate
verify failed
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
[root@msukpuppet02 puppet]#


HOWEVER...this works perfectly:

[root@msukpuppet02 puppet]# puppetd --test --
server=msukpuppet01.mserv.local
info: Caching catalog for msukpuppet02.mserv.local
info: Applying configuration version '1308583986'
notice: Finished catalog run in 0.02 seconds
[root@msukpuppet02 puppet]#



My puppet config file sits in /etc/sysconfig/puppet


[root@msukpuppet02 puppet]# cat /etc/sysconfig/puppet
# The puppetmaster server
PUPPET_SERVER=msukpuppet01.mserv.local

# If you wish to specify the port to connect to do so here
PUPPET_PORT=8140

# Where to log to. Specify syslog to send log messages to the system
log.
PUPPET_LOG=/var/log/puppet/puppet.log

# You may specify other parameters to the puppet client here
PUPPET_EXTRA_OPTS=--waitforcert=500
[root@msukpuppet02 puppet]#


I have checked both systems time is correct perfect and both system
resolve in the dns correctly for both A and PTR records.
I'm using RHEL 6.1 (puppet-0.25.5-1.el6.noarch)


Thanks again for the help
Bruce




On Jun 20, 1:12 pm, Ken Barber k...@puppetlabs.com wrote:
 Augeas is a resource - I don't see how it fits in as a module. You may
 _use_ it in your modules if you like.







 On Mon, Jun 20, 2011 at 12:09 PM, Bruce Bushby bruce.bus...@gmail.com wrote:
  One last question:

  Would the list suggest implementing augeas where possible? and would
  augeas fit into the module layout

  Thanks
  Bruce

  On Jun 18, 9:29 am, Bruce Bushby bruce.bus...@gmail.com wrote:
  Hello

  I'm new to large scale puppet deployment and was hoping the list could
  offer some pointers on module layout

  My initial layout was motivated by a need to harden our Linux
  systems. I grouped the various hardening configs into:

  Kernel
  OS
  Network
  Shell
  Files
  Application

  I'm hoping I can create the same module structure within puppet.

  Using sudo as the first example, I want puppet to ensure /usr/bin/
  sudo has 4111 file perms and root:root ownership.

  Directory layout:
  I used this handy script from 
  ProfFalkenhttp://www.threedrunkensysadsonthe.net/2010/04/quick-creation-of-pupp...

  BUT...this is where things are getting a little grey.  I currently
  have:

  [root@laptop manifests]# pwd
  /etc/puppet/manifests
  [root@laptop manifests]#
  [root@laptop manifests]# tree os
  os
  |-- files
  |-- lib
  |   |-- facter
  |   `-- puppet
  |       |-- parser
  |       |-- provider
  |       `-- type
  |-- manifests
  |   |-- init.pp
  |   `-- sudo.pp
  `-- templates

  9 directories, 2 files
  [root@laptop manifests]#
  [root@laptop manifests]# cat os/manifests/sudo.pp
  # /etc/puppet/manifests/classes/sudo.pp

  class sudo {
      file { /etc/sudoers:
          owner = root,
          group = root,
          mode  = 4111,
      }}

  [root@laptop manifests]#

  Am I on the correct track?

  I'm guessing I should break the classes down into:
  sudo::perms
  sudo::ownership
  sudo::file (have puppet serve the sudo template)

  then in os/manifests/site.pp . would I import sudo?

  and the second question: How would I create hosts groups? I would like
  to group my hosts in dev, uat, staging and prod etc?

  ThanksBruce

  --
  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 
  athttp://groups.google.com/group/puppet-users?hl=en.

-- 
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.



Re: [Puppet Users] Rake failing to create puppet dashboard database on RHEL6

2011-06-20 Thread Jacob Helwig
On Mon, 20 Jun 2011 09:21:04 -0700, Pheran wrote:
 
 Hi folks,
 
 I'm trying to install puppet dashboard 1.1.1 on RHEL6 (following some
 instructions in the excellent Pro Puppet book) but the rake command is
 failing to create the database like so:
 
 # rake RAILS_ENV=production db:create
 (in /usr/share/puppet-dashboard)
 Couldn't create database for {encoding=utf8, adapter=mysql,
 username=dashboard, database=dashboard,
 password=mypassword}, charset: utf8, collation: utf8_unicode_ci
 (if you set the charset manually, make sure you have a matching
 collation)
 
 In the database.yml I have:
 
 production:
   database: dashboard
   username: dashboard
   password: mypassword
   encoding: utf8
   adapter: mysql
 
 Any ideas?  Thanks.
 

It looks like the dashboard MySQL user doesn't have CREATE DATABASE
permissions.

This is a pretty reasonable restriction to have on the user, so you may
need to create the database manually using a more privileged user, and
skip the db:create step.

-- 
Jacob Helwig


signature.asc
Description: Digital signature


Re: [Puppet Users] Puppet module layout

2011-06-20 Thread Nigel Kersten
On Sat, Jun 18, 2011 at 1:29 AM, Bruce Bushby bruce.bus...@gmail.comwrote:

 Hello

 I'm new to large scale puppet deployment and was hoping the list could
 offer some pointers on module layout

 My initial layout was motivated by a need to harden our Linux
 systems. I grouped the various hardening configs into:

 Kernel
 OS
 Network
 Shell
 Files
 Application

 I'm hoping I can create the same module structure within puppet.


In my experience, these module categories are too broad and it will make
maintenance difficult.

You don't want to get too fine-grained with your modules, but if you keep
things this broad, you'll end up having lots of complicated relationships
like Class[os::foo] - Class[files::foo]

I made this mistake on a large deployment and regretted it.

-- 
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.



Re: [Puppet Users] Puppet Caching Problem

2011-06-20 Thread Daniel Pittman
On Mon, Jun 20, 2011 at 05:11, markus markus.fenste...@googlemail.com wrote:

 I've got a MCollective Setup (1.2.0) with Puppet (2.6.4), an
 provision agent and an external node configuration script that fetches
 configurations from a database.

 Sometimes it happens, that puppet caches the configuration of the
 server and doesn't notice a change in the configuration.

Odds are, no: I suspect that if you run the agent a second time you
will have things work; 2.6.4 had a nasty bug that would cause the
master to ignore changes to your manifests the first time you ran it
after the file changed (and, theoretically, but never observed, more
than once.)

If you find that is the case, upgrading to 2.6.9 will fix things up,
or you can dig up the patch set I posted to the list earlier; it
should apply cleanly to 2.6.4 as a point-fix to get things working.
(You only need to upgrade the *master* for this to be fixed; a 2.6.4
client will work fine.)

Daniel
-- 
⎋ Puppet Labs Developer – http://puppetlabs.com
✉ Daniel Pittman dan...@puppetlabs.com
✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775
♲ Made with 100 percent post-consumer electrons

-- 
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: Rake failing to create puppet dashboard database on RHEL6

2011-06-20 Thread Pheran
Thanks Jacob, the book either forgot or glossed over creating the
database user with those permissions, but they do show how to manually
create the database using mysql, so I'll give that a shot.

On Jun 20, 12:28 pm, Jacob Helwig ja...@puppetlabs.com wrote:
 On Mon, 20 Jun 2011 09:21:04 -0700, Pheran wrote:

  Hi folks,

  I'm trying to install puppet dashboard 1.1.1 on RHEL6 (following some
  instructions in the excellent Pro Puppet book) but the rake command is
  failing to create the database like so:

  # rake RAILS_ENV=production db:create
  (in /usr/share/puppet-dashboard)
  Couldn't create database for {encoding=utf8, adapter=mysql,
  username=dashboard, database=dashboard,
  password=mypassword}, charset: utf8, collation: utf8_unicode_ci
  (if you set the charset manually, make sure you have a matching
  collation)

  In the database.yml I have:

  production:
    database: dashboard
    username: dashboard
    password: mypassword
    encoding: utf8
    adapter: mysql

  Any ideas?  Thanks.

 It looks like the dashboard MySQL user doesn't have CREATE DATABASE
 permissions.

 This is a pretty reasonable restriction to have on the user, so you may
 need to create the database manually using a more privileged user, and
 skip the db:create step.

 --
 Jacob Helwig

  signature.asc
  1KViewDownload

-- 
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.



Re: [Puppet Users] Re: Puppet module layout

2011-06-20 Thread Ken Barber
 Getting back to my ultra simple setup, I'm finding that I can't run
 puppetd --test:
 [root@msukpuppet02 puppet]# puppetd --test
 err: Could not retrieve catalog from remote server: SSL_connect
 returned=1 errno=0 state=SSLv3 read server certificate B: certificate
 verify failed
 warning: Not using cache on failed catalog
 err: Could not retrieve catalog; skipping run
 [root@msukpuppet02 puppet]#


 HOWEVER...this works perfectly:

 [root@msukpuppet02 puppet]# puppetd --test --
 server=msukpuppet01.mserv.local
 info: Caching catalog for msukpuppet02.mserv.local
 info: Applying configuration version '1308583986'
 notice: Finished catalog run in 0.02 seconds
 [root@msukpuppet02 puppet]#



 My puppet config file sits in /etc/sysconfig/puppet

Well - thats the RedHat specific environment file. Your configuration
file for puppet (at least the one we usually refer to) is usually
/etc/puppet/puppet.conf ;-).

Anyway - the error you are getting is an SSL certificate security
issue. When you run:

puppet agent --test

Its looking for the hostname 'puppet' and trying to connect to it. Now
if the server side certificate doesn't have the alias 'puppet' in the
CN field its going to get rejected by the client. Think web server
certificates in your browser ... except instead of giving you a
warning you can push through ... we reject the connection.

This is why using the alternate hostname works:

puppet agent --test --server=msukpuppet01.mserv.local

The hostname matches the CN field in the certificate this time :-).

So you have a few choices here. You can update the
/etc/puppet/puppet.conf on your clients with the setting:

[agent]
server=msukpuppet01.mserv.local

That way it will just use that each time you do a 'puppet agent -t'.

Or, you can regenerate your server certificate to have a number of
aliases: puppet, msukpuppet01.mserv.local, puppet.mserv.local etc. I
can explain this but ... what version of Puppet are you running btw? I
get the impression its an old one. I would recommend upgrading to 2.6
before you proceed too far :-). If you already run 2.6 let me know
:-).

ken.

-- 
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.



Re: [Puppet Users] Re: PuppetCA not signing Certificate-Requests

2011-06-20 Thread Denmat
Hi,
If you are using the standard webrick server that comes puppetmasterd then you 
will find it doesn't scale very well. 

Check out the scaling puppet docs on the puppetlabs site for your options.

Cheers,
Deb

On 20/06/2011, at 22:18, markus markus.fenste...@googlemail.com wrote:

 I'm not sure whether it is a problem with the Provisioner I use.
 I added a little sleep time between requesting the node to send its
 CSR to the Server and the signing of this certificate on all nodes.
 
 Until now it works perfectly.
 
 On 18 Jun., 18:58, markus markus.fenste...@googlemail.com wrote:
 Hi!
 
 I'm having a setup with MCollective 1.2.0, Puppet 2.6.4 and an
 provision-agent. Most of the time this works great, but sometimes
 (every 10th node or so) I experience, that signing-requests of puppet-
 agents are not getting signed on the master.
 So the request of the puppet agent to /production/certificate/...
 ends everytime in an HTTP-Error 404.
 
 Does anyone have a glue about that?
 The problem is also hard to analyze because the logoutput is not very
 detailed.
 
 Puppet-Agent:
 Jun 18 16:10:38 ip-10-242-62-183 puppet-agent[1001]: Creating a new
 SSL key for ...
 Jun 18 16:10:38 ip-10-242-62-183 puppet-agent[1001]: Caching
 certificate for ca
 Jun 18 16:10:41 ip-10-242-62-183 puppet-agent[1001]: Creating a new
 SSL certificate request for ...
 Jun 18 16:10:41 ip-10-242-62-183 puppet-agent[1001]: Certificate
 Request fingerprint (md5): 6A:3F:63:8A:59:2C:F6:C9:5E:56:5F:39:16:FF:
 19:BE
 
 Puppet-Master:
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:39 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:39 +0200] GET /production/
 certificate_request/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:42 +0200] PUT /production/
 certificate_request/a.b.c.d HTTP/1.1 200 2202 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:42 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:10:43 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:03 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:04 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:04 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:26 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:26 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:26 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:48 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 puppet:443 a.b.c.d - - [18/Jun/2011:18:11:48 +0200] GET /production/
 certificate/a.b.c.d HTTP/1.1 404 2298 - -
 
 Regards
 Markus
 
 -- 
 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.
 

-- 
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] confused about file ensure/require

2011-06-20 Thread Craig White
my base/default includes this ntp manifest

# cat modules/ntp/manifests/ntp.pp
# ntp.pp

class ntp {
  case $operatingsystem {
centos, redhat: { 
  $service_name = 'ntpd'
  $conf_file = 'ntp.conf.el'
}
debian, ubuntu: { 
  $service_name = 'ntp'
  $conf_file = 'ntp.conf.debian'
}
  }

  package { 'ntp':
ensure = installed,
  }

  service { 'ntp':
name = $service_name,
ensure = running,
enable = true,
subscribe = File['ntp.conf'],
  }

  file { 'ntp.conf':
path = '/etc/ntp.conf',
ensure = file,
require = Package['ntp'],
source = puppet:///ntp/files/${conf_file},
  }
}

# class {'ntp': }

So my questions...

1. I tested this by moving /etc/ntp.conf on my test client but it doesn't seem 
to replace the file though it clearly says 'ensure = file'
Is my understanding wrong?

2. Files ntp.conf.el  ntp.conf.debian are located in 
/etc/puppet/modules/ntp/files   - source = 
'puppet://puppet:///ntp/files/${conf_file} is this correct?

-- 
Craig White ~~  craig.wh...@ttiltd.com
1.800.869.6908 ~~~ www.ttiassessments.com 

Need help communicating between generations at work to achieve your desired 
success? Let us help!

-- 
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 module layout

2011-06-20 Thread Bruce Bushby

Thanks again Ken!!

I found it, /etc/puppet/puppet.conf requires:
server = server_name

and then:
puppetd --test
works without having to specify the server name..doh I should
have checked that this morning!

At last I can start testing a module layout and augeas :)) I'll be
sure to post the results in case others have a similar question.

Bruce




On Jun 20, 7:30 pm, Ken Barber k...@puppetlabs.com wrote:
  Getting back to my ultra simple setup, I'm finding that I can't run
  puppetd --test:
  [root@msukpuppet02 puppet]# puppetd --test
  err: Could not retrieve catalog from remote server: SSL_connect
  returned=1 errno=0 state=SSLv3 read server certificate B: certificate
  verify failed
  warning: Not using cache on failed catalog
  err: Could not retrieve catalog; skipping run
  [root@msukpuppet02 puppet]#

  HOWEVER...this works perfectly:

  [root@msukpuppet02 puppet]# puppetd --test --
  server=msukpuppet01.mserv.local
  info: Caching catalog for msukpuppet02.mserv.local
  info: Applying configuration version '1308583986'
  notice: Finished catalog run in 0.02 seconds
  [root@msukpuppet02 puppet]#

  My puppet config file sits in /etc/sysconfig/puppet

 Well - thats the RedHat specific environment file. Your configuration
 file for puppet (at least the one we usually refer to) is usually
 /etc/puppet/puppet.conf ;-).

 Anyway - the error you are getting is an SSL certificate security
 issue. When you run:

 puppet agent --test

 Its looking for the hostname 'puppet' and trying to connect to it. Now
 if the server side certificate doesn't have the alias 'puppet' in the
 CN field its going to get rejected by the client. Think web server
 certificates in your browser ... except instead of giving you a
 warning you can push through ... we reject the connection.

 This is why using the alternate hostname works:

 puppet agent --test --server=msukpuppet01.mserv.local

 The hostname matches the CN field in the certificate this time :-).

 So you have a few choices here. You can update the
 /etc/puppet/puppet.conf on your clients with the setting:

 [agent]
 server=msukpuppet01.mserv.local

 That way it will just use that each time you do a 'puppet agent -t'.

 Or, you can regenerate your server certificate to have a number of
 aliases: puppet, msukpuppet01.mserv.local, puppet.mserv.local etc. I
 can explain this but ... what version of Puppet are you running btw? I
 get the impression its an old one. I would recommend upgrading to 2.6
 before you proceed too far :-). If you already run 2.6 let me know
 :-).

 ken.

-- 
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.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
I tried using try the logouput = ON_FAILURE in the exec.
But my client is a puppet CentOS. (The puppet version is outdated).
Not recognizing this parameter.

As you asked, I used the - debug.
The output was this: http://pastie.org/2098147

I discovered that any command that has not executed any parameter. Only simple
commands.
exec {Free: path = [/ usr / bin]}

The problem really is in the function exec.

Attached is the module.

2011/6/20 Ken Barber k...@puppetlabs.com

 Did you try the logouput = on_failure in the exec?

 Can you try that and run the content with the --debug flag so we can
 all see the output? (try putting the output in pastie.org if its a lot
 of information).

 ken.

 On Mon, Jun 20, 2011 at 1:28 PM, lucas.brig...@ymail.com
 grillobri...@gmail.com wrote:
  I could not do what you suggested at the weekend.
  I tried all the tips you gave me. But I could not fix.
  The file directory is specified, the problem is that it
  gives error unpacking, and when I run the tar command line manually, it
  works fine.
 
  Sorry for my English!
 
  --
  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.
 

 --
 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.




-- 
Lucas Pereira Brígida
www.codebroken.wordpress.com

-- 
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.



wordpress-module.tar.gz
Description: GNU Zip compressed data


Re: [Puppet Users] Re: Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
2011/6/20 jcbollinger john.bollin...@stjude.org



 On Jun 18, 1:35 pm, vagn scott vagnsc...@gmail.com wrote:
  On 06/18/2011 10:31 AM, Markus Falb wrote:
 
 
 
   On 18.6.2011 05:30, vagn scott wrote:
 
   or you can do what I do and pipe that archive into tar:
 
exec { true $title  wget -O - $upstream | tar xzf -
 --xform
   's,wordpress/,,':
cwd =  $top,
creates =  $top/license.txt,
before  =  File[ $top/setup.mysql ],
}
 
   the reason for the 'true $title' part is
   that I want to be able to use this exec multiple times (it is in a
   defined class).
   So I need to get the $title in there so puppet doesn't think it is
   a duplicate definition.
 
   You can separate the title from the actual command
 
   exec { uniqe title maybe with $title in it:
  command =  wget...,
  ...
   }
 
  And then I have to make up a title that won't collide
  with another title somewhere else. Also, I lose a line
  of vertical space on the screen, and I have to go
  looking for what the exec is doing, instead of it being
  on the first line.   Shortcut operators don't slow me
  down at all.  Those are my tradeoffs, and why
  I chose this style.  YMMV.
 
  But, since you mentioned it: Is it so arcane a practice that
  I should avoid it for the sake of people reading my code?


 If your concern is for the people reading your code then yes, you
 should give your Execs a plain-language title.  You might even find
 that people reading your code includes you, six months from now.  Or
 tomorrow.  The readability advantage compounds with the number of
 Execs in your manifests and with the complexity of their commands.

 There are advantages other than readability, as well.  In particular,
 the resource title does not change when you tweak the command.  This
 is important if your manifests refer to the Exec resource by title --
 in another resource's before or notify parameter, for instance.


 John

 --
 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.




-- 
Lucas Pereira Brígida

-- 
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.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
I tried using try the logouput = ON_FAILURE in the exec.
But my client is a puppet CentOS. (The puppet version is outdated).
Not recognizing this parameter.

As you asked, I used the - debug.
The output was this: http://pastie.org/2098147

I discovered that any command that has not executed any parameter. Only simple
commands.
exec {Free: path = [/ usr / bin]}

The problem really is in the function exec.

Attached is the module.

2011/6/20 Ken Barber k...@puppetlabs.com

 Did you try the logouput = on_failure in the exec?

 Can you try that and run the content with the --debug flag so we can
 all see the output? (try putting the output in pastie.org if its a lot
 of information).

 ken.

 On Mon, Jun 20, 2011 at 1:28 PM, lucas.brig...@ymail.com
 grillobri...@gmail.com wrote:
  I could not do what you suggested at the weekend.
  I tried all the tips you gave me. But I could not fix.
  The file directory is specified, the problem is that it
  gives error unpacking, and when I run the tar command line manually, it
  works fine.
 
  Sorry for my English!
 
  --
  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.
 

 --
 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.




-- 
Lucas Pereira Brígida
www.codebroken.wordpress.com

-- 
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.



wordpress-module.tar.gz
Description: GNU Zip compressed data


Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
I tried using try the logouput = ON_FAILURE in the exec.
But my client is a puppet CentOS. (The puppet version is outdated).
Not recognizing this parameter.

As you asked, I used the - debug.
The output was this: http://pastie.org/2098147

I discovered that any command that has not executed any parameter. Only simple
commands.
exec {Free: path = [/ usr / bin]}

The problem really is in the function exec.

Attached is the module.

2011/6/20 Ken Barber k...@puppetlabs.com

 Did you try the logouput = on_failure in the exec?

 Can you try that and run the content with the --debug flag so we can
 all see the output? (try putting the output in pastie.org if its a lot
 of information).

 ken.

 On Mon, Jun 20, 2011 at 1:28 PM, lucas.brig...@ymail.com
 grillobri...@gmail.com wrote:
  I could not do what you suggested at the weekend.
  I tried all the tips you gave me. But I could not fix.
  The file directory is specified, the problem is that it
  gives error unpacking, and when I run the tar command line manually, it
  works fine.
 
  Sorry for my English!
 
  --
  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.
 

 --
 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.




-- 
Lucas Pereira Brígida

-- 
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.



wordpress-module.tar.gz
Description: GNU Zip compressed data


Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread Ken Barber
 I tried using try the logouput = ON_FAILURE in the exec.
 But my client is a puppet CentOS. (The puppet version is outdated).
 Not recognizing this parameter.

There is a newer version of Puppet in EPEL testing. For example, RHEL/CentOS 5:

http://download.fedora.redhat.com/pub/epel/testing/5Server/x86_64/

I'd suggest upgrading sooner rather then later.

 As you asked, I used the - debug.
 The output was this: http://pastie.org/2098147

So the error you have posted is not related to untar is it? Its a
problem with the cp now ... have you posted the correct thing? Are you
still having trouble with the tar -xzvf ?

err: /Stage[main]//Node[lucas.com.br]/Wordpress::Install[ ]/Exec[cp
-rp /usr/share/wordpress/ /var/www/zertico]/returns: change from
notrun to 0 failed: cp -rp /usr/share/wordpress/ /var/www/zertico
returned 1 instead of one of [0] at
/etc/puppet/modules/wordpress/manifests/install.pp:41

 I discovered that any command that has not executed any
 parameter. Only simple commands.
 exec {Free: path = [/ usr / bin]}

 The problem really is in the function exec.

I'm sorry - I don't understand what you mean here.

ken.

-- 
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.



Re: [Puppet Users] confused about file ensure/require

2011-06-20 Thread Craig White

On Jun 20, 2011, at 2:35 PM, Jacob Helwig wrote:

 On Mon, 20 Jun 2011 14:17:46 -0700, Craig White wrote:
 
 my base/default includes this ntp manifest
 
 # cat modules/ntp/manifests/ntp.pp
 # ntp.pp
 
 class ntp {
 case $operatingsystem {
   centos, redhat: { 
 $service_name = 'ntpd'
 $conf_file = 'ntp.conf.el'
   }
   debian, ubuntu: { 
 $service_name = 'ntp'
 $conf_file = 'ntp.conf.debian'
   }
 }
 
 package { 'ntp':
   ensure = installed,
 }
 
 service { 'ntp':
   name = $service_name,
   ensure = running,
   enable = true,
   subscribe = File['ntp.conf'],
 }
 
 file { 'ntp.conf':
   path = '/etc/ntp.conf',
   ensure = file,
   require = Package['ntp'],
   source = puppet:///ntp/files/${conf_file},
 }
 }
 
 # class {'ntp': }
 
 So my questions...
 
 1. I tested this by moving /etc/ntp.conf on my test client but it doesn't 
 seem to replace the file though it clearly says 'ensure = file'
   Is my understanding wrong?
 
 
 That should replace the file.  What output are you getting (if
 anything)?
 
 % cat ../test.pp
 file { 'blab':
   path= '/tmp/blab.txt',
   ensure  = 'file',
   content = 'asdf',
 }
 
 % puppet apply ../test.pp
 notice: /Stage[main]//File[blab]/ensure: defined content as 
 '{md5}912ec803b2ce49e4a541068d495ab570'
 notice: Finished catalog run in 0.06 seconds
 
 % rm /tmp/blab.txt
 
 % puppet apply ../test.pp
 notice: /Stage[main]//File[blab]/ensure: defined content as 
 '{md5}912ec803b2ce49e4a541068d495ab570'
 notice: Finished catalog run in 0.06 seconds
 
 % puppet apply ../test.pp
 notice: Finished catalog run in 0.04 seconds
 
 2. Files ntp.conf.el  ntp.conf.debian are located in 
 /etc/puppet/modules/ntp/files   - source = 
 'puppet://puppet:///ntp/files/${conf_file} is this correct?
 
 
 You should include 'modules' in the 'puppet://' URI, since the form
 without it has been deprecated for a while.  IIRC it should look
 something like:
 
 puppet:///modules/ntp/files/${conf_file}
-
I sort of think it should just work but it doesn't

# mv /etc/ntp.conf /root/
root@ubuntu:/var/www/puppet-dashboard# puppet agent --test --verbose --server 
ubuntu.ttinet
info: Retrieving plugin
info: Caching catalog for ubuntu.ttinet
info: Applying configuration version '1308606646'
notice: Finished catalog run in 0.14 seconds

still no /etc/ntp.conf

root@ubuntu:/var/www/puppet-dashboard# puppet apply 
/etc/puppet/modules/ntp/manifests/ntp.pp
notice: Finished catalog run in 0.01 seconds

above is what I got from the 'puppet apply' command and before from puppet 
agent command, neither replaced /etc/ntp.conf and neither indicated an error.

root@ubuntu:/var/www/puppet-dashboard# ls -l /etc/ntp.conf
ls: cannot access /etc/ntp.conf: No such file or directory

and this was after I changed the source as you indicated...

# tail -n 5 /etc/puppet/modules/ntp/manifests/ntp.pp
   source = puppet:///modules/ntp/files/${conf_file},
 }
}

# class {'ntp': }

Craig

-- 
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.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
I actually posted about the problem with tar.
I decided to modify the module to not depend on tar installed.

But I realized that any command that has parameters to run, the same problem
occurswhen using this command:

exec {$ tar-vzxf downdir} {wordpress.tar.gz
 path = [/ usr / local / bin, / opt / local / bin, /
usr / bin, / usr / sbin]
 }

But when I run for example:
exec {ps}

The error did not occur previously posted.
-- 
Lucas Pereira Brígida
www.codebroken.wordpress.com

-- 
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.



Re: [Puppet Users] Problem in wordpress moodule.

2011-06-20 Thread lucas.brig...@ymail.com
ken,

The error was occurring because the version of the puppet.
Thank you!

-- 
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.



Re: [Puppet Users] confused about file ensure/require

2011-06-20 Thread Jacob Helwig
On Mon, 20 Jun 2011 15:11:09 -0700, Craig White wrote:
 Date: Mon, 20 Jun 2011 15:11:09 -0700
 From: Craig White craig.wh...@ttiltd.com
 To: puppet-users@googlegroups.com
 Subject: Re: [Puppet Users] confused about file ensure/require
 X-Mailer: Apple Mail (2.1084)
 Message-Id: 290592db-a4cd-4982-9eb0-4c5d09d2e...@ttiltd.com
 
 
 On Jun 20, 2011, at 2:35 PM, Jacob Helwig wrote:
 
  On Mon, 20 Jun 2011 14:17:46 -0700, Craig White wrote:
  
  my base/default includes this ntp manifest
  
  # cat modules/ntp/manifests/ntp.pp
  # ntp.pp
  
  class ntp {
  case $operatingsystem {
centos, redhat: { 
  $service_name = 'ntpd'
  $conf_file = 'ntp.conf.el'
}
debian, ubuntu: { 
  $service_name = 'ntp'
  $conf_file = 'ntp.conf.debian'
}
  }
  
  package { 'ntp':
ensure = installed,
  }
  
  service { 'ntp':
name = $service_name,
ensure = running,
enable = true,
subscribe = File['ntp.conf'],
  }
  
  file { 'ntp.conf':
path = '/etc/ntp.conf',
ensure = file,
require = Package['ntp'],
source = puppet:///ntp/files/${conf_file},
  }
  }
  
  # class {'ntp': }
  
  So my questions...
  
  1. I tested this by moving /etc/ntp.conf on my test client but it doesn't 
  seem to replace the file though it clearly says 'ensure = file'
Is my understanding wrong?
  
  
  That should replace the file.  What output are you getting (if
  anything)?
  
  % cat ../test.pp
  file { 'blab':
path= '/tmp/blab.txt',
ensure  = 'file',
content = 'asdf',
  }
  
  % puppet apply ../test.pp
  notice: /Stage[main]//File[blab]/ensure: defined content as 
  '{md5}912ec803b2ce49e4a541068d495ab570'
  notice: Finished catalog run in 0.06 seconds
  
  % rm /tmp/blab.txt
  
  % puppet apply ../test.pp
  notice: /Stage[main]//File[blab]/ensure: defined content as 
  '{md5}912ec803b2ce49e4a541068d495ab570'
  notice: Finished catalog run in 0.06 seconds
  
  % puppet apply ../test.pp
  notice: Finished catalog run in 0.04 seconds
  
  2. Files ntp.conf.el  ntp.conf.debian are located in 
  /etc/puppet/modules/ntp/files   - source = 
  'puppet://puppet:///ntp/files/${conf_file} is this correct?
  
  
  You should include 'modules' in the 'puppet://' URI, since the form
  without it has been deprecated for a while.  IIRC it should look
  something like:
  
  puppet:///modules/ntp/files/${conf_file}
 -
 I sort of think it should just work but it doesn't
 
 # mv /etc/ntp.conf /root/
 root@ubuntu:/var/www/puppet-dashboard# puppet agent --test --verbose --server 
 ubuntu.ttinet
 info: Retrieving plugin
 info: Caching catalog for ubuntu.ttinet
 info: Applying configuration version '1308606646'
 notice: Finished catalog run in 0.14 seconds
 
 still no /etc/ntp.conf
 
 root@ubuntu:/var/www/puppet-dashboard# puppet apply 
 /etc/puppet/modules/ntp/manifests/ntp.pp
 notice: Finished catalog run in 0.01 seconds
 
 above is what I got from the 'puppet apply' command and before from puppet 
 agent command, neither replaced /etc/ntp.conf and neither indicated an error.
 
 root@ubuntu:/var/www/puppet-dashboard# ls -l /etc/ntp.conf
 ls: cannot access /etc/ntp.conf: No such file or directory
 
 and this was after I changed the source as you indicated...
 
 # tail -n 5 /etc/puppet/modules/ntp/manifests/ntp.pp
source = puppet:///modules/ntp/files/${conf_file},
  }
 }
 
 # class {'ntp': }
 
 Craig
 

Doesn't look like you're including the ntp class?

The line that would do it is commented out in
/etc/puppet/modules/ntp/manifests/ntp.pp, if you're going to apply
/etc/puppet/modules/ntp/manifests/ntp.pp directly.

-- 
Jacob Helwig


signature.asc
Description: Digital signature


Re: [Puppet Users] confused about file ensure/require

2011-06-20 Thread Craig White

On Jun 20, 2011, at 3:37 PM, Jacob Helwig wrote:

 On Mon, 20 Jun 2011 15:11:09 -0700, Craig White wrote:
 Date: Mon, 20 Jun 2011 15:11:09 -0700
 From: Craig White craig.wh...@ttiltd.com
 To: puppet-users@googlegroups.com
 Subject: Re: [Puppet Users] confused about file ensure/require
 X-Mailer: Apple Mail (2.1084)
 Message-Id: 290592db-a4cd-4982-9eb0-4c5d09d2e...@ttiltd.com
 
 
 On Jun 20, 2011, at 2:35 PM, Jacob Helwig wrote:
 
 On Mon, 20 Jun 2011 14:17:46 -0700, Craig White wrote:
 
 my base/default includes this ntp manifest
 
 # cat modules/ntp/manifests/ntp.pp
 # ntp.pp
 
 class ntp {
 case $operatingsystem {
  centos, redhat: { 
$service_name = 'ntpd'
$conf_file = 'ntp.conf.el'
  }
  debian, ubuntu: { 
$service_name = 'ntp'
$conf_file = 'ntp.conf.debian'
  }
 }
 
 package { 'ntp':
  ensure = installed,
 }
 
 service { 'ntp':
  name = $service_name,
  ensure = running,
  enable = true,
  subscribe = File['ntp.conf'],
 }
 
 file { 'ntp.conf':
  path = '/etc/ntp.conf',
  ensure = file,
  require = Package['ntp'],
  source = puppet:///ntp/files/${conf_file},
 }
 }
 
 # class {'ntp': }
 
 So my questions...
 
 1. I tested this by moving /etc/ntp.conf on my test client but it doesn't 
 seem to replace the file though it clearly says 'ensure = file'
  Is my understanding wrong?
 
 
 That should replace the file.  What output are you getting (if
 anything)?
 
 % cat ../test.pp
 file { 'blab':
  path= '/tmp/blab.txt',
  ensure  = 'file',
  content = 'asdf',
 }
 
 % puppet apply ../test.pp
 notice: /Stage[main]//File[blab]/ensure: defined content as 
 '{md5}912ec803b2ce49e4a541068d495ab570'
 notice: Finished catalog run in 0.06 seconds
 
 % rm /tmp/blab.txt
 
 % puppet apply ../test.pp
 notice: /Stage[main]//File[blab]/ensure: defined content as 
 '{md5}912ec803b2ce49e4a541068d495ab570'
 notice: Finished catalog run in 0.06 seconds
 
 % puppet apply ../test.pp
 notice: Finished catalog run in 0.04 seconds
 
 2. Files ntp.conf.el  ntp.conf.debian are located in 
 /etc/puppet/modules/ntp/files   - source = 
 'puppet://puppet:///ntp/files/${conf_file} is this correct?
 
 
 You should include 'modules' in the 'puppet://' URI, since the form
 without it has been deprecated for a while.  IIRC it should look
 something like:
 
 puppet:///modules/ntp/files/${conf_file}
 -
 I sort of think it should just work but it doesn't
 
 # mv /etc/ntp.conf /root/
 root@ubuntu:/var/www/puppet-dashboard# puppet agent --test --verbose 
 --server ubuntu.ttinet
 info: Retrieving plugin
 info: Caching catalog for ubuntu.ttinet
 info: Applying configuration version '1308606646'
 notice: Finished catalog run in 0.14 seconds
 
 still no /etc/ntp.conf
 
 root@ubuntu:/var/www/puppet-dashboard# puppet apply 
 /etc/puppet/modules/ntp/manifests/ntp.pp
 notice: Finished catalog run in 0.01 seconds
 
 above is what I got from the 'puppet apply' command and before from puppet 
 agent command, neither replaced /etc/ntp.conf and neither indicated an error.
 
 root@ubuntu:/var/www/puppet-dashboard# ls -l /etc/ntp.conf
 ls: cannot access /etc/ntp.conf: No such file or directory
 
 and this was after I changed the source as you indicated...
 
 # tail -n 5 /etc/puppet/modules/ntp/manifests/ntp.pp
   source = puppet:///modules/ntp/files/${conf_file},
 }
 }
 
 # class {'ntp': }
 
 Craig
 
 
 Doesn't look like you're including the ntp class?
 
 The line that would do it is commented out in
 /etc/puppet/modules/ntp/manifests/ntp.pp, if you're going to apply
 /etc/puppet/modules/ntp/manifests/ntp.pp directly.

I thought it should work at least for the 'puppet agent' commands...

# cat manifests/site.pp 
import templates
import nodes
import modules

root@ubuntu:/etc/puppet# cat manifests/templates.pp
class baseclass {
}

node default {
include baseclass
include ntp
include facts
}

and the nodes all have

include baseclass

in them

Craig

-- 
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.



Re: [Puppet Users] confused about file ensure/require

2011-06-20 Thread Craig White
I don't know if it is or isn't being included but the -d -e were certainly 
useful bits...

err: /Stage[main]/Ntp/File[ntp.conf]: Could not evaluate: Could not retrieve 
information from source(s) puppet:///modules/ntp/files/ntp.conf.debian at 
/etc/puppet/modules/ntp/manifests/ntp.pp:31
notice: /Stage[main]/Ntp/Service[ntp]: Dependency File[ntp.conf] has failures: 
true

but the file is clearly somewhere...

# ls -l /etc/puppet/modules/ntp/files/ntp.conf.debian 
-rw-r--r-- 1 root root 535 2011-06-13 12:55 
/etc/puppet/modules/ntp/files/ntp.conf.debian

and as noted below, the source is indicated to be

source = puppet:///modules/ntp/files/ntp.conf.debian

which is the same 2 questions I started with since I have the 'Puppet Pro' book 
in my hand and various references on the puppetlabs documentation web pages and 
I was pretty much of the opinion that this should be working.

Craig

On Jun 20, 2011, at 3:54 PM, Ken Barber wrote:

 It does seem like its not being included :-) ...
 
 What does:
 
 echo # foo  /etc/ntp.conf
 puppet apply -d -e 'include ntp'
 
 Do?
 
 ken.
 
 
 I thought it should work at least for the 'puppet agent' commands...
 
 # cat manifests/site.pp
 import templates
 import nodes
 import modules
 
 root@ubuntu:/etc/puppet# cat manifests/templates.pp
 class baseclass {
 }
 
 node default {
include baseclass
include ntp
include facts
 }
 
 and the nodes all have
 
 include baseclass
 
 in them
 
 Craig
 


-- 
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] Geppetto is ready

2011-06-20 Thread Henrik Lindberg
Geppetto 1.0 is released and ready for download. We want all the 
feedback we can get, so try it out and let us know what you think!


Full story at: http://cloudsmith.github.com/geppetto/

If you haven’t been following the project, Geppetto is an integrated 
toolset for working with Puppet modules and manifests. It’s built on the 
Eclipse platform. If you’re an Eclipse user, you can install it directly 
into your IDE. If you’re not, it’s also available as ready-to-run zip’s 
with a much smaller footprint than the full Eclipse.


Although we’re calling it “1.0″ (actually “1.0.0″), Geppetto is is 
probably more mature than many 1.0 releases, and we have invested quite 
a bit of time in it over the last six months. (Actually, it didn’t come 
out of nowhere; it builds on work we’ve done in other domains over the 
last several years.)


We released the first beta at FOSDEM 2011 in Brussels in early February, 
and got lots of really useful feedback there and at PuppetCamp Amsterdam 
in April.


So thanks to everyone who’s offered help and encouragement along the 
way, with a special shout-out to the people at Puppet Labs.


Regards
- henrik

--
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.



Re: [Puppet Users] confused about file ensure/require

2011-06-20 Thread Craig White

On Jun 20, 2011, at 3:54 PM, Ken Barber wrote:

 It does seem like its not being included :-) ...
 
 What does:
 
 echo # foo  /etc/ntp.conf
 puppet apply -d -e 'include ntp'
 
 Do?

OK - I simplified the chaining so now the ntp is indeed included with all 
puppet agent and puppetd actions.

but apparently I am caching the previous configuration and perhaps because I am 
set up to be in 'production' mode, this means that configuration changes aren't 
necessarily understood.

on my puppet client...

# puppet agent --test --verbose --server ubuntu.ttinet
info: Retrieving plugin
info: Loading facts in datacenter
info: Loading facts in datacenter
info: Caching catalog for ubuntu2.ttinet
info: Applying configuration version '1308612492'
err: /Stage[main]/Ntp/File[ntp.conf]: Could not evaluate: Could not retrieve 
information from source(s) puppet:///modules/ntp/files/ntp.conf.debian at 
/etc/puppet/modules/ntp/manifests/ntp.pp:31
notice: /Stage[main]/Ntp/Service[ntp]: Dependency File[ntp.conf] has failures: 
true
warning: /Stage[main]/Ntp/Service[ntp]: Skipping because of failed dependencies
notice: Finished catalog run in 0.11 seconds

but I changed the source to

source = source = puppet://$puppetserver/modules/ntp/files/${conf_file}

but even after restarting puppetd or just invoking the puppet agent command 
(above), it still seems to use the 'file' based URL

even after restarting puppetmaster on the server, still the same as above

How do I clear the cached catalog?

Craig

-- 
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] Announce: puppetlabs-mcollective 0.1.8

2011-06-20 Thread Jeff McCune
Hi everyone,

I'm going to try announcing new versions of Modules I'm working on as
I release them to the Forge.  puppet-users and mcollective-users seems
like the best place, but please let me know if you have other
preferences.

I've added a small change to the mcollective module we've recently
released [1].  This change ensures all of the resources managed by the
module are contained within the top level Class['mcollective'].  This
allows the end user of the module to easily establish relationships
before and after the module like so:

node default {
  notify { 'alpha': }
  -
  class  { 'java':
distribution = 'jdk',
version  = 'latest',
  }
  -
  class  { 'activemq': }
  -
  class { 'mcollective': }
  -
  notify { 'omega': }
}

Please file any issues you have on the Github project page at:
https://github.com/puppetlabs/puppetlabs-mcollective/issues

Please feel free to reach out to me directly if you have any feedback
or questions.

[1] http://forge.puppetlabs.com/puppetlabs/mcollective/0.1.8

Cheers,
-- 
Jeff McCune
Puppet Labs
@0xEFF

-- 
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.



Re: [Puppet Users] How to manage many nodes easily?

2011-06-20 Thread flex
thanks Ohad and Ken, i am using foreman now, but only for logging reports, i
think i should try to restructe our config and use external node with
forman.

2011/6/20 Ken Barber k...@puppetlabs.com

 Do you have a lot of boxes that perform the same function? You can use
 the regex node syntax:

 node /^db/ {
  include db
 }

 Or device some other way of extracting function out of the machine
 name. It might save you some time.

 Otherwise if your machines are fairly unique using ENC to configure
 that would be a good path if you are getting sick of updating your
 nodes file. Dashboard and The Foreman are two good tools to look at
 for this purpose.

 Ideally you want your node entries to contain only vars and classes
 for a switchover to ENC to work. Param classes aren't supported in
 either tool yet I believe.

 ken.

 On Mon, Jun 20, 2011 at 4:25 AM, flex frostyn...@gmail.com wrote:
  We have many modules and many nodes, every node may use different module,
 so
  it's very unpleasant to modify the nodes.pp
  Then i saw the external node, but seems it only support class and we have
  many defines called in node.pp
 
  So here is my question: Is there another way for us to manage so many
 nodes
  easily or should i change all the defines to classes and using external
  nodes?
 
  --
  System Administrator, Focus on System Management and Basic Development
 
  --
  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.
 

 --
 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.




-- 
System Administrator, Focus on System Management and Basic Development

-- 
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.