Re: [Puppet-dev] Re: [Puppet Users] Re: Is it possible to get a list of all nodes in your manifests and all classes assigned to those nodes programatically in Ruby?

2011-11-22 Thread david-dasz
Hi Trevor,

In the case of a default node, regexp nodes or an external node
classifier, there *is* no well-defined list of potential nodes any more.

Having said that, a solution might be to use the puppet compiler's
internals to parse the site.pp and friends manually and access the AST
resulting from this parse. I've no idea if and how that could work
technically though.

Best Regards, David

On Mon, 21 Nov 2011 19:43:06 -0500, Trevor Vaughan
tvaug...@onyxpoint.com
wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Thanks for the suggestions guys but I'm giving this one up as too
annoying
 to bother.
 
 The issue was to detect the nodes that hadn't checked in but were
defined
 in the manifest.
 
 Getting the information out of the YAML is pretty easy, yes.
 
 Thanks!
 
 Trevor
 
 On 11/21/2011 12:10 PM, Brian Gallew wrote:
 This is (almost) trivial.
 First, create a fact that turns /var/lib/puppet/state/classes.txt into
 an array.  Then extract that fact from the storedconfigs DB
 programmatically.  Admittedly, this won't get all defined nodes, as
that
 is somewhat meaningless since nodes can be default or regular
 exceptions.  Instead, this gets all nodes that have run Puppet at least
 once.
 
 On Nov 20, 2011, at 6:04 PM, James Turnbull wrote:
 
 Trevor Vaughan wrote:
 Sorry but...bump?

 On 11/18/2011 02:20 PM, Trevor Vaughan wrote:
 Sorry if this is a double post, my e-mail glitched on me.

 Anyway, I'm trying to write a Ruby script that can get all defined
 nodes and all classes assigned to those nodes. I would prefer to not
 have to compile a catalog for each node.

 I tried looking through the puppet/util/rdoc material but it really
 didn't handle the node entries as far as I could tell and also
didn't
 seem to have a way to get the info without printing it all out.


 Sorry missed this one - I do something vaguely similar for the Puppet
 Rundeck integration - have a look at the code at:

 https://github.com/jamtur01/puppet-rundeck

 Others may be able to chime in with better ideas.

 James

 -- 
 James Turnbull
 Puppet Labs
 1-503-734-8571
 To schedule a meeting with me: http://tungle.me/jamtur01

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

 
 
 - -- 
 Trevor Vaughan
  Vice President, Onyx Point, Inc.
  email: tvaug...@onyxpoint.com
  phone: 410-541-ONYX (6699)
  pgp: 0x6C701E94
 
 - -- This account not approved for unencrypted sensitive information --
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQEcBAEBAgAGBQJOyvARAAoJECNCGV1OLcypxvYH/03J2v+V+ReyewLkA5wynTq+
 J9NbiXjwqKK7RZOlB+LFrIbR8/OBP46zRLSI0iujfwua3vwQromA9wga59e9XvuL
 vFsKiKmwxArzcrafuTNnIk47jyV6vvYvxq7roIqcU0kQIj9rECEJSkktNI/gy8PK
 DMiIMqNSz6jGw+ZUAhWJMQtvzLZ73BiFl61WKFH0NEAM1uBIidp4hfPQ9Bn2OVPJ
 TLfGlN2/nuFVUFU6SgDICFsaXKuM6Cc4CnUH1o+UJH6SKXXZBtnuXZDncmwsA4ez
 BG+fP3rfS4q3EzZYrl05zFh4frsLyo5PQDYKTZyALPDY9QmZvkHQ62IloFLYcdY=
 =8sEZ
 -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.



RE: [Puppet Users] list of all nodes in your manifests

2011-11-22 Thread C R Ritson
I have a home-brewed script that seems to me to answer this part of the 
request. Not ruby, though...

   The issue was to detect the nodes that hadn't checked in but were
defined in the manifest.

I don't try to parse the manifest in any way. Instead, I compare a list of the 
signed certificates known to my master with a list of machines which appear to 
have checked in during the past 24 hours. It may not be complete, but it is a 
good start. I am beginning to wonder if I need a derivative of this -- just 
highlighting the changes in the list of puppets that are absent without leave.

I can post the script I have so far if it would help.

Chris Ritson (Computing Officer and School Safety Officer)

Room 707, Claremont Tower,EMAIL: c.r.rit...@ncl.ac.uk
School of Computing Science,  PHONE: +44 191 222 8175
Newcastle University, FAX  : +44 191 222 8232
Newcastle upon Tyne, UK NE1 7RU.  WEB  : http://www.cs.ncl.ac.uk/



-- 
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] PE 2.0 server and regular stock puppet client

2011-11-22 Thread T.J. Yang
Hi, All
 
I am having puppet client side error message when  building a 10 nodes PE 
2.0 demo site to experience the new dashboard features. 
The only puppet(+mcollective) client works is that one come with PE 2.0 
installation on Ubuntu 10.04.
 
For other OSs I am getting following error message.
 
Error message:
 
Nov 22 01:52:20 oi151 puppet-agent[1871]: [ID 702911 daemon.error] Could 
not retrieve catalog from remote server: Error 400 on SERVER: 
validate_re():  does not match ^true$|^false$ at 
/opt/puppet/share/puppet/modules/pe_mcollective/manifests/init.pp:40 on 
node oi151.test.net
Looks like I don't have mcollective agent installed along with puppet, by 
default PE 2.0 expect every clients have both puppet and mcollective agents 
installed.
 
So the questions are,
1. How do I disable Live Management in PE 2.0 ?
So that I can have agent without mcollective still reporting to PE 2.0 
server.
2. How do I prepare an expected puppet+mcollective agents on Ubuntu ?

 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/QRVFK6M22EYJ.
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] Different cron behaviour?

2011-11-22 Thread Bernd Adamowicz
Is there anything special about the cron resource? I have a configuration like 
this:

  cron { sync-stored-config:
command = /some/command.sh,
user = icinga,
hour = *,
minute = 15,45,
  }

But the 'minute' field produces this error:

8955 Nov 22 14:30:11 bob puppet-agent[7950]: Could not run Puppet configuration 
client: Parameter minute failed: 15,45 is not a valid minute at 
/etc/puppet/environments/loc_b_build/modules/icinga/manifests/cron.pp:31

According to 'man 5 crontab' this should work.

Bernd

-- 
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] Different cron behaviour?

2011-11-22 Thread Christopher Wood
On Tue, Nov 22, 2011 at 03:48:31PM +0100, Bernd Adamowicz wrote:
 Is there anything special about the cron resource? I have a configuration 
 like this:
 
   cron { sync-stored-config:
 command = /some/command.sh,
 user = icinga,
 hour = *,
 minute = 15,45,
   }

cron { sync-stored-config:
  command = /some/command.sh,
  user = icinga,
  hour = *,
  minute = [15,45],
}

If you poke into the type, it defines permitted field formats with regular 
expressions.
 
 But the 'minute' field produces this error:
 
 8955 Nov 22 14:30:11 bob puppet-agent[7950]: Could not run Puppet 
 configuration client: Parameter minute failed: 15,45 is not a valid minute at 
 /etc/puppet/environments/loc_b_build/modules/icinga/manifests/cron.pp:31
 
 According to 'man 5 crontab' this should work.
 
 Bernd
 
 -- 
 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] Puppet Windows: msi packages removal

2011-11-22 Thread Mohamed Lrhazi
I noticed that is if I uninstall an MSI that was installed by Puppet,
Puppet does not notice.

Looking at the source I see it might be checking for a state file to
know whether a package is installed or not:
C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml

So one has to rememebr to delete that too Is this design not a problem?

Thanks,
Mohamed.

-- 
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 with CAcert certificate

2011-11-22 Thread Zico
Hi, My puppet master can't bind ( ldap ) with my central server which has
CACert assigned certificate. Are there any problem with Puppet with CACert?
Or, how can I make that certificate trusted in my Puppet master?

Any kind of  help or hint appreciated.

-- 
Best,
Zico

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



AW: [Puppet Users] Different cron behaviour?

2011-11-22 Thread Bernd Adamowicz
That made it.

Thanks!
Bernd

 -Ursprüngliche Nachricht-
 Von: puppet-users@googlegroups.com [mailto:puppet-
 us...@googlegroups.com] Im Auftrag von Christopher Wood
 Gesendet: Dienstag, 22. November 2011 16:01
 An: puppet-users@googlegroups.com
 Betreff: Re: [Puppet Users] Different cron behaviour?
 
 On Tue, Nov 22, 2011 at 03:48:31PM +0100, Bernd Adamowicz wrote:
  Is there anything special about the cron resource? I have a
 configuration like this:
 
cron { sync-stored-config:
  command = /some/command.sh,
  user = icinga,
  hour = *,
  minute = 15,45,
}
 
 cron { sync-stored-config:
   command = /some/command.sh,
   user = icinga,
   hour = *,
   minute = [15,45],
 }
 
 If you poke into the type, it defines permitted field formats with
 regular expressions.
 
  But the 'minute' field produces this error:
 
  8955 Nov 22 14:30:11 bob puppet-agent[7950]: Could not run Puppet
 configuration client: Parameter minute failed: 15,45 is not a valid
 minute at
 /etc/puppet/environments/loc_b_build/modules/icinga/manifests/cron.pp:3
 1
 
  According to 'man 5 crontab' this should work.
 
  Bernd
 
  --
  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.

-- 
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] PE 2.0 server and regular stock puppet client

2011-11-22 Thread Nigel Kersten
On Tue, Nov 22, 2011 at 5:08 AM, T.J. Yang tjyang2...@gmail.com wrote:

 Hi, All

 I am having puppet client side error message when  building a 10 nodes PE
 2.0 demo site to experience the new dashboard features.
 The only puppet(+mcollective) client works is that one come with PE 2.0
 installation on Ubuntu 10.04.

 For other OSs I am getting following error message.

 Error message:

 Nov 22 01:52:20 oi151 puppet-agent[1871]: [ID 702911 daemon.error] Could
 not retrieve catalog from remote server: Error 400 on SERVER:
 validate_re():  does not match ^true$|^false$ at
 /opt/puppet/share/puppet/modules/pe_mcollective/manifests/init.pp:40 on
 node oi151.test.net
 Looks like I don't have mcollective agent installed along with puppet, by
 default PE 2.0 expect every clients have both puppet and mcollective agents
 installed.

 So the questions are,
 1. How do I disable Live Management in PE 2.0 ?
 So that I can have agent without mcollective still reporting to PE 2.0
 server.


Remove the cron job that automatically adds all your agents to the default
group, which has the pe_mcollective class associated with it.

That class assumes PE agents, and deliberately fails early so you don't get
half-applied manifests to non-PE agents.

http://docs.puppetlabs.com/pe/2.0/console_classes_groups.html#the-default-group

There's a cron job in /etc/cron.d which is automatically adding your nodes
to this group.


 2. How do I prepare an expected puppet+mcollective agents on Ubuntu ?


You should use the PE agent install on Ubuntu 10.0.4

-- 
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] Collecting ressources for different hosts

2011-11-22 Thread Jens
Hello everyone,

I'm trying collect firewall rules from my nodes, so I can
automatically deploy them to my firewalls

The problem here is, that my nodes are behind different firewalls, so
I need to collect the rules independently for each host.

I tried an approach like this:

Define a command.

define firewall::openservice( )
{
  $servicename = $name
  @@file { /etc/pyroman/40_${hostname}_service_${name}.py:
content = template(firewall-openservice.erb),
tag = firewall-$firewall,
  }
}

$firewall is here set with a custom fact using the environment
variables, which holds the nodename of the firewall node.

I try to collect those rules on the firewall using this definition:

File | tag == firewall-$hostname |

(Yes, I'm using stored configs, collected resources work just fine on
other parts of my config).

But I don't see any rule files appearing on the firewall node.

The problem for me now is: What is the best approach to debug this
issue? Is it even possible to do what I want to do? The things I find
on the net about collected resources, or in the puppet documentation,
are kinda thin, and I don't seem to make any progress in this issue.
At the moment it just works to collect all rule files for all
firewalls, which leads to a lot of clutter in my config directory.

Any help would be greatly appreciated.

Regards,
Jens

-- 
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] Issue with RPM dependency issue

2011-11-22 Thread TisMe
I am running into an issue with perl-DBD-MySQL dependency with mysql
in CentOS 5.7.

I am trying to remove the mysql client and replace it with with
percona version of the mysql client.

It will not let me remove the mysql client because of that
dependency.  I have already defined perl-DBD-MySQL in a different
class...  I would rather not create an Exec[].  I would rather do
that as a last resort.

Anyone have any suggestions with this?

Thanks

-- 
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: Multiple nodes.pp files

2011-11-22 Thread Alexander Fortin

On 11/21/11 9:28 PM, jcbollinger wrote:

What if you spell it like so:

mysersource { /etc/$::myvariable: ensure =  present }

?


This is the actual code now:

file { /etc/samba/smb.conf:
ensure = present,
content = file(/home/$::realuser/puppet/files/smb.conf),
require = Package[samba],
notify = Service[$sambaservices],
}

but I get the same output from apply:

Could not find any files from /home//puppet/files/smb.conf at 
/home/alex/puppet/manifests/samba.pp:7 on node blah



--
Alexander Fortin
http://about.me/alexanderfortin/

--
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: Multiple nodes.pp files

2011-11-22 Thread Aaron Grewell
Curly braces perhaps?
content = file(/home/${realuser}/puppet/files/smb.conf),

On Tue, Nov 22, 2011 at 10:15 AM, Alexander Fortin
alexander.for...@gmail.com wrote:
 On 11/21/11 9:28 PM, jcbollinger wrote:

 What if you spell it like so:

 mysersource { /etc/$::myvariable: ensure =  present }

 ?

 This is the actual code now:

 file { /etc/samba/smb.conf:
    ensure = present,
    content = file(/home/$::realuser/puppet/files/smb.conf),
    require = Package[samba],
    notify = Service[$sambaservices],
 }

 but I get the same output from apply:

 Could not find any files from /home//puppet/files/smb.conf at
 /home/alex/puppet/manifests/samba.pp:7 on node blah


 --
 Alexander Fortin
 http://about.me/alexanderfortin/

 --
 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] Re: Multiple nodes.pp files

2011-11-22 Thread Alexander Fortin

On 11/22/11 7:37 PM, Aaron Grewell wrote:

Curly braces perhaps?
content =  file(/home/${realuser}/puppet/files/smb.conf),


Tried both with ${realuser} and with ${::realuser}, no luck.

--
Alexander Fortin
http://about.me/alexanderfortin/

--
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] declare and include classes

2011-11-22 Thread Arnau Bria
Hi all,

after moving to parametrized classes, I've started to declare them
instead of including.

Now, I'm trying to understand the differences (internal) between
declare and include, and, reading
http://docs.puppetlabs.com/guides/parameterized_classes.html again, I
found some sentence which confuses me:

Since include wasn’t designed for use with parameterized classes

I know you can't include a resource, so a class eith parameters must be
 declared. But, If I don't use params, I can include the class...

so, what are the big differnces between declare and include?

TIA,
Arnau

-- 
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 Windows: msi packages removal

2011-11-22 Thread Jacob Helwig
On 2011-11-22 07:10 , Mohamed Lrhazi wrote:
 I noticed that is if I uninstall an MSI that was installed by Puppet,
 Puppet does not notice.
 
 Looking at the source I see it might be checking for a state file to
 know whether a package is installed or not:
 C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml
 
 So one has to rememebr to delete that too Is this design not a problem?
 
 Thanks,
 Mohamed.
 

It's certainly a limitation, and not ideal.  This is currently how the
appdmg provider behaves on OS X, so it's not entirely unexpected
behavior (for people that are used to how Puppet works on systems
without centralized package management systems).

An alternative would be to create a parameter along the lines of exec's
'creates' where you would need to specify a file that would only exist
iff the 'package' had been successfully installed.

When we were investigating things initially I believe that the reason we
had to rule out things like checking the registry was that there were
too many ways for an installer to misbehave that would break any of the
detection that we would need to do.

I don't know whether or not a 'creates' parameter would end up being
more problematic or not, but I certainly welcome discussion from people
who are actually doing real systems management using Puppet on Windows.

-- 
Jacob Helwig
http://about.me/jhelwig



signature.asc
Description: OpenPGP digital signature


Re: [Puppet Users] declare and include classes

2011-11-22 Thread Nan Liu
On Tue, Nov 22, 2011 at 11:31 AM, Arnau Bria arnaub...@pic.es wrote:
 Hi all,

 after moving to parametrized classes, I've started to declare them
 instead of including.

 Now, I'm trying to understand the differences (internal) between
 declare and include, and, reading
 http://docs.puppetlabs.com/guides/parameterized_classes.html again, I
 found some sentence which confuses me:

 Since include wasn’t designed for use with parameterized classes

 I know you can't include a resource, so a class eith parameters must be
  declared. But, If I don't use params, I can include the class...

 so, what are the big differnces between declare and include?

You can use include function if:
class is not parameterized.
class is parameterized, but provide default values: (i.e. class sample
($param = 'val1') {...})
class is already declared (you can include class multiple times
throughout your manifests).

include does not support:
stages
relationship (require function provides include+require.)

class declaration supports:
classes that are both parametrized and non-parametrized.
stages
relationship

class declaration does not support:
redeclaration of classes

I think that's all. HTH,

Nan

-- 
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] query about github-puppet-modules [e.g. evolvingweb/puppet-glusterfs]

2011-11-22 Thread venu
I am a new user to puppet  github. Have a generic question regarding
using puppet-modules downloaded from github.

I am trying modules regarding managing glusterfs client  server from
evolvingweb/puppet-glusterfs.
May I know if there are any specific steps to be performed to include
your module in a test-puppet-environment. The README file gives an
example class to be used, tried defining the class in init.pp but it
doesnt work.

Below is what I have done so far -

1) Clone the repo into my local modules. /etc/puppet/modules/glusterfs
2) Import the modules in /etc/puppet/manifests/nodes.pp
  $head nodes.pp
import glusterfs
3)  Include the clients-hostname in the file /etc/puppet/modules/
glusterfs/manifests/init.pp.  Modified using the example provided in
the README file.

But still the client doesnot process the module. Can someone help me
on this.

-- 
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 Windows: msi packages removal

2011-11-22 Thread Mohamed Lrhazi
I think the documentation about package providers should include
something about this...
Right now a provider has these features:

holdableinstall_options installable purgeable   uninstallable   
upgradeable versionable

Maybe something like: detectable

Meaning the provider can effectively detect whether the package is
installed or not, as opposed to can remember if it did install it or
not.

Thanks a lot,
Mohamed.


On Tue, Nov 22, 2011 at 2:25 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 On 2011-11-22 07:10 , Mohamed Lrhazi wrote:
 I noticed that is if I uninstall an MSI that was installed by Puppet,
 Puppet does not notice.

 Looking at the source I see it might be checking for a state file to
 know whether a package is installed or not:
 C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml

 So one has to rememebr to delete that too Is this design not a problem?

 Thanks,
 Mohamed.


 It's certainly a limitation, and not ideal.  This is currently how the
 appdmg provider behaves on OS X, so it's not entirely unexpected
 behavior (for people that are used to how Puppet works on systems
 without centralized package management systems).

 An alternative would be to create a parameter along the lines of exec's
 'creates' where you would need to specify a file that would only exist
 iff the 'package' had been successfully installed.

 When we were investigating things initially I believe that the reason we
 had to rule out things like checking the registry was that there were
 too many ways for an installer to misbehave that would break any of the
 detection that we would need to do.

 I don't know whether or not a 'creates' parameter would end up being
 more problematic or not, but I certainly welcome discussion from people
 who are actually doing real systems management using Puppet on Windows.

 --
 Jacob Helwig
 http://about.me/jhelwig



-- 
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 Windows: msi packages removal

2011-11-22 Thread Mohamed Lrhazi
and then, indeed, maybe the provider could take a helper hint about
how to go about detecting the presence of a package, kind of like
Service takes hints about how to detect a service is running or not...

Then maybe: detect_with_file = C:\\Program Files\\Splunk\\bin\\splunk.exe

Thanks,
Mohamed.

On Tue, Nov 22, 2011 at 7:32 PM, Mohamed Lrhazi lrh...@gmail.com wrote:
 I think the documentation about package providers should include
 something about this...
 Right now a provider has these features:

 holdable        install_options installable     purgeable       uninstallable 
   upgradeable     versionable

 Maybe something like: detectable

 Meaning the provider can effectively detect whether the package is
 installed or not, as opposed to can remember if it did install it or
 not.

 Thanks a lot,
 Mohamed.


 On Tue, Nov 22, 2011 at 2:25 PM, Jacob Helwig ja...@puppetlabs.com wrote:
 On 2011-11-22 07:10 , Mohamed Lrhazi wrote:
 I noticed that is if I uninstall an MSI that was installed by Puppet,
 Puppet does not notice.

 Looking at the source I see it might be checking for a state file to
 know whether a package is installed or not:
 C:\ProgramData\PuppetLabs\puppet\var\db\package\msi\SplunkForwarder.yml

 So one has to rememebr to delete that too Is this design not a problem?

 Thanks,
 Mohamed.


 It's certainly a limitation, and not ideal.  This is currently how the
 appdmg provider behaves on OS X, so it's not entirely unexpected
 behavior (for people that are used to how Puppet works on systems
 without centralized package management systems).

 An alternative would be to create a parameter along the lines of exec's
 'creates' where you would need to specify a file that would only exist
 iff the 'package' had been successfully installed.

 When we were investigating things initially I believe that the reason we
 had to rule out things like checking the registry was that there were
 too many ways for an installer to misbehave that would break any of the
 detection that we would need to do.

 I don't know whether or not a 'creates' parameter would end up being
 more problematic or not, but I certainly welcome discussion from people
 who are actually doing real systems management using Puppet on Windows.

 --
 Jacob Helwig
 http://about.me/jhelwig




-- 
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] PE 2.0 server and regular stock puppet client

2011-11-22 Thread T.J. Yang
On Tuesday, November 22, 2011 10:41:54 AM UTC-6, Nigel Kersten wrote: 



 On Tue, Nov 22, 2011 at 5:08 AM, T.J. Yang tjyan...@gmail.com wrote:

 Hi, All
  
 I am having puppet client side error message when  building a 10 nodes PE 
 2.0 demo site to experience the new dashboard features. 
 The only puppet(+mcollective) client works is that one come with PE 2.0 
 installation on Ubuntu 10.04.
  
 For other OSs I am getting following error message.
  
 Error message:
  
 Nov 22 01:52:20 oi151 puppet-agent[1871]: [ID 702911 daemon.error] Could 
 not retrieve catalog from remote server: Error 400 on SERVER: 
 validate_re():  does not match ^true$|^false$ at 
 /opt/puppet/share/puppet/modules/pe_mcollective/manifests/init.pp:40 on 
 node oi151.test.net
 Looks like I don't have mcollective agent installed along with puppet, by 
 default PE 2.0 expect every clients have both puppet and mcollective agents 
 installed.
  
 So the questions are,
 1. How do I disable Live Management in PE 2.0 ?
 So that I can have agent without mcollective still reporting to PE 
 2.0 server.


 Remove the cron job that automatically adds all your agents to the default 
 group, which has the pe_mcollective class associated with it.

 That class assumes PE agents, and deliberately fails early so you don't 
 get half-applied manifests to non-PE agents.


 http://docs.puppetlabs.com/pe/2.0/console_classes_groups.html#the-default-group

 There's a cron job in /etc/cron.d which is automatically adding your nodes 
 to this group.
  

 2. How do I prepare an expected puppet+mcollective agents on Ubuntu ?


 You should use the PE agent install on Ubuntu 10.0.4

 
My bad, I failed to understand the puppet-enterprise-installer is for 
client and/or server installation.
Thanks for the pointer, Nigel .
 
 
tj
 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/mEJqG4X7kCgJ.
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] PE 2.0 and open source puppet

2011-11-22 Thread T.J. Yang
Is there a feature comparsion between the two ?
for example, I like the Live Management in PE 2.0 dashboard. 
Will this feature avaiable in open source dashboard one ?
 
 
tj
 

-- 
You received this message because you are subscribed to the Google Groups 
Puppet Users group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/q5K-3RsJYjIJ.
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] PE 2.0 server and regular stock puppet client

2011-11-22 Thread Nigel Kersten
On Tue, Nov 22, 2011 at 5:49 PM, T.J. Yang tjyang2...@gmail.com wrote:

 On Tuesday, November 22, 2011 10:41:54 AM UTC-6, Nigel Kersten wrote:


  2. How do I prepare an expected puppet+mcollective agents on Ubuntu ?


 You should use the PE agent install on Ubuntu 10.0.4


 My bad, I failed to understand the puppet-enterprise-installer is for
 client and/or server installation.
 Thanks for the pointer, Nigel .


No worries. Glad you got it running.

-- 
Nigel Kersten
Product Manager, Puppet Labs

-- 
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] PE 2.0 and open source puppet

2011-11-22 Thread Nigel Kersten
On Tue, Nov 22, 2011 at 5:53 PM, T.J. Yang tjyang2...@gmail.com wrote:

 Is there a feature comparsion between the two ?


http://puppetlabs.com/puppet/compare/


 for example, I like the Live Management in PE 2.0 dashboard.
 Will this feature avaiable in open source dashboard one ?


No, this is only in PE, not in the Dashboard.

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



AW: [Puppet Users] Collecting ressources for different hosts

2011-11-22 Thread Bernd Adamowicz
I've never used the file resource along with stored configurations. But the 
first thing I would do is to dig into the database the configurations are 
stored. Something like this:

[root@myhost ~]# mysql -u puppet -p
Enter password: 
mysql use puppet
mysql select title,host_id from resources where title like 'check_swap%' and 
exported = 1;
+---+-+
| title | host_id |
+---+-+
| check_swap_h1 |   2 | 
| check_swap_h2 |   1 | 
+---+-+
2 rows in set (0.03 sec)

mysql

In this example I was searching for some Nagios resources. You will have to 
replace the 'check_swap' with the name of your resources. If you see your 
resources here, you can be sure your clients are reporting as expected and you 
continue analyzing the agent run on the Puppet master (syslog).

Bernd

 -Ursprüngliche Nachricht-
 Von: puppet-users@googlegroups.com [mailto:puppet-
 us...@googlegroups.com] Im Auftrag von Jens
 Gesendet: Dienstag, 22. November 2011 13:31
 An: Puppet Users
 Betreff: [Puppet Users] Collecting ressources for different hosts
 
 Hello everyone,
 
 I'm trying collect firewall rules from my nodes, so I can
 automatically deploy them to my firewalls
 
 The problem here is, that my nodes are behind different firewalls, so
 I need to collect the rules independently for each host.
 
 I tried an approach like this:
 
 Define a command.
 
 define firewall::openservice( )
 {
   $servicename = $name
   @@file { /etc/pyroman/40_${hostname}_service_${name}.py:
 content = template(firewall-openservice.erb),
 tag = firewall-$firewall,
   }
 }
 
 $firewall is here set with a custom fact using the environment
 variables, which holds the nodename of the firewall node.
 
 I try to collect those rules on the firewall using this definition:
 
 File | tag == firewall-$hostname |
 
 (Yes, I'm using stored configs, collected resources work just fine on
 other parts of my config).
 
 But I don't see any rule files appearing on the firewall node.
 
 The problem for me now is: What is the best approach to debug this
 issue? Is it even possible to do what I want to do? The things I find
 on the net about collected resources, or in the puppet documentation,
 are kinda thin, and I don't seem to make any progress in this issue.
 At the moment it just works to collect all rule files for all
 firewalls, which leads to a lot of clutter in my config directory.
 
 Any help would be greatly appreciated.
 
 Regards,
 Jens
 
 --
 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.