[Puppet Users] commands in Puppet providers being escaped differently to a shell

2011-09-08 Thread Luke Bigum
Hi list, I'm making a few modifications to the puppet-virt type from GitHub (https://github.com/carlasouza/puppet-virt.git) and I've run across an interesting problem with what looks like how a "command" in a Puppet provider is escaping or interpreting it's arguments. Explaining this is a bit long

[Puppet Users] Avoid user creation/deletion possible?

2011-09-08 Thread Bernd Adamowicz
Hi all, is there a way to avoid changing the state (present/absent) of a user? In my case I just want to do a kind of 'check' if the user is present. If so, I will do some file-resource stuff on him. If not, nothing should be done at all. Example: # create the user resource user { 'someuser':

[Puppet Users] AW: Avoid user creation/deletion possible?

2011-09-08 Thread Bernd Adamowicz
Sorry, the file resource should of course be: # copy file if user exists # do nothing if not file { "/home/someuser/.bashrc": require => User["someuser"], ... } > -Ursprüngliche Nachricht- > Von: puppet-users@googlegroups.com [mailto:puppet- > us...@googlegroups.com] Im Auftrag von Be

[Puppet Users] What is the deference of Puppi, MCollective and ControlTier?

2011-09-08 Thread Yunfeng Xu
Hi, I am using puppet as my configuration solution, it is a very good for system-level configuration management and compliance. But it is not good at batch jobs. For now, I have three options: puppi, MCollective and ControlTier. I don't know much about them. Can anyone give me some advices that wh

[Puppet Users] fqdn on puppet clients

2011-09-08 Thread Bjorge Solli
How is fqdn generated? On my system it is set to it011064.uib.no, but it really should be set to it011064.klientdrift.uib.no. Reverse dns and hostname is correct: root@it011064:~# facter --puppet | grep ^fqdn fqdn => it011064.uib.no root@it011064:~# hostname it011064 root@it011064:~# host $(hostn

Re: [Puppet Users] fqdn on puppet clients

2011-09-08 Thread Ken Barber
Hi Bjørge, The clue is in looking at the code for the 'fqdn' fact: host = Facter.value(:hostname) domain = Facter.value(:domain) if host and domain [host, domain].join(".") And drilling into the 'domain' fact: if name = Facter::Util::Resolution.exe

[Puppet Users] node definitions

2011-09-08 Thread Bjorge Solli
Hi, is it possible to let a node definition supersede another if there are two node definitions that match the sertname? node /.*\.klientdrift\.uib\.no$/ inherits client {} node puppettestmachine.klientdrift.uib.no inherits client {} node puppetdevmachine.klientdrift.uib.no inherits client {} I

[Puppet Users] Re: small problem with init script on RHEL6

2011-09-08 Thread jcbollinger
On Sep 7, 1:32 pm, Jim N wrote: > I was getting this when starting puppetmasterd (puppet- > server-0.25.5-1.el6.noarch RPM install): > > $ sudo /etc/init.d/puppetmaster start > Starting puppetmaster: Could not run: Could not create PID file: /var/ > lib/puppet/run/puppetmasterd.pid > > This chan

[Puppet Users] Re: node definitions

2011-09-08 Thread jcbollinger
On Sep 8, 6:48 am, Bjorge Solli wrote: > Hi, > > is it possible to let a node definition supersede another if there are > two node definitions that match the sertname? > > node /.*\.klientdrift\.uib\.no$/ inherits client {} > node puppettestmachine.klientdrift.uib.no inherits client {} > node pu

Re: [Puppet Users] Re: node definitions

2011-09-08 Thread Bjorge Solli
On 08/09/11 15:23, jcbollinger wrote: > All told, you appear already to have it right. Is it not working for > you? A bit more explanation of the problem would help us help you. To be honest I haven't tried it like that, I just assumed the language to be declarative and thus order not important.

[Puppet Users] Re: Avoid user creation/deletion possible?

2011-09-08 Thread jcbollinger
On Sep 8, 3:58 am, Bernd Adamowicz wrote: > Hi all, > > is there a way to avoid changing the state (present/absent) of a user? In my > case I just want to do a kind of 'check' if the user is present. If so, I > will do some file-resource stuff on him. If not, nothing should be done at > all.

Re: [Puppet Users] fqdn on puppet clients

2011-09-08 Thread Bjorge Solli
Hi Ken! Thanks for the reply! The first two could be solved as one using 'hostname --fqdn', meybe even the third one. I decided we should solve this the proper way and update dhcp to specify option domain-name klientdrift.uib.no uib.no But since our clients will wander around the globe we want

[Puppet Users] Re: commands in Puppet providers being escaped differently to a shell

2011-09-08 Thread jcbollinger
On Sep 8, 3:27 am, Luke Bigum wrote: > Hi list, > > I'm making a few modifications to the puppet-virt type from GitHub > (https://github.com/carlasouza/puppet-virt.git) and I've run across an > interesting problem with what looks like how a "command" in a Puppet > provider is escaping or interpr

[Puppet Users] Re: Distribution of custom facts

2011-09-08 Thread jcbollinger
On Sep 7, 11:25 pm, Aaron Grewell wrote: > In 2.6.9 that hasn't been my experience.   On first run I provide any custom > facts I may need as environment variables. After that they seem to work as > expected. If you find that to be needed then I encourage you to file a bug report. John -- Y

[Puppet Users] Re: Qualified variable inside a metaparameter

2011-09-08 Thread jcbollinger
On Sep 7, 9:53 am, ikkaro wrote: > Hi, > > I'm adapting our modules to version 2.7.3. > Currently I 've this example in a iptables module > > class iptables_script > { > file { >                 $iptables_init: >                         owner => "root", >                         group => "root",

Re: [Puppet Users] fqdn on puppet clients

2011-09-08 Thread Ken Barber
> The first two could be solved as one using 'hostname --fqdn', meybe even > the third one. Perhaps the methodology chosen was more compatible with multiple UNIX operating systems. For example hostname --fqdn doesn't seem to work on Mac OS X. A lot of facter code may appear quirky on the surface f

[Puppet Users] Re: small problem with init script on RHEL6

2011-09-08 Thread jcbollinger
Note also that the Filesystem Hierarchy Standard directs that PID files should go under /var/run, and it explicitly permits programs to own subdirectories, as Puppet does. Thus Puppet's standard configuration is FHS-compliant, but your variation is not. John -- You received this message becau

[Puppet Users] Re: commands in Puppet providers being escaped differently to a shell

2011-09-08 Thread Luke Bigum
A! That makes sense, I should be thinking like C/C++ execv, one array element per argument, no matter what it's string content. Dropping the quotes in the parameter sting and using the original Ruby command exec works fine. I should have tried that before - I was confusing myself by trying too

AW: [Puppet Users] Re: Avoid user creation/deletion possible?

2011-09-08 Thread Bernd Adamowicz
> -Ursprüngliche Nachricht- > Von: puppet-users@googlegroups.com [mailto:puppet- > us...@googlegroups.com] Im Auftrag von jcbollinger > Gesendet: Donnerstag, 8. September 2011 15:45 > An: Puppet Users > Betreff: [Puppet Users] Re: Avoid user creation/deletion possible? > > > > On Sep 8

[Puppet Users] Re: fqdn on puppet clients

2011-09-08 Thread michaelkrieg
Hi, what says "hostname -f"? What about your /etc/hosts and /etc/ hostname ? Regards, Michael On 8 Sep., 13:36, Bjorge Solli wrote: > How is fqdn generated? > > On my system it is set to it011064.uib.no, but it really should be set > to it011064.klientdrift.uib.no. Reverse dns and hostname is c

[Puppet Users] deleting users / purge their homedir

2011-09-08 Thread michaelkrieg
Hi, currently we're confused and quite unhappy with the Puppet user management. It is possible to create users, make sure they're present and so on. But: if you'd like to delete an user completely this seems not be possible. Setting the directive "ensure" to "absent" deletes the user from /etc/pas

Re: [Puppet Users] deleting users / purge their homedir

2011-09-08 Thread Christopher Wood
On Thu, Sep 08, 2011 at 04:48:09AM -0700, michaelkrieg wrote: > Hi, > > currently we're confused and quite unhappy with the Puppet user > management. It is possible to create users, make sure they're present > and so on. But: if you'd like to delete an user completely this seems > not be possible.

[Puppet Users] Destroy nodes in dashboard

2011-09-08 Thread Justin Lambert
Destroying nodes in puppet dashboard seems to kill dashboard after about 5 minutes requiring a restart. I took at look at the DB schema and was just going to remove nodes via SQL directly instead of using the dashboard and wanted to see if anyone sees anything wrong with this. I know the queries

[Puppet Users] A new-to-puppet question

2011-09-08 Thread Maven User
Hi all - Let me start by saying I'm really jazzed by what i'm uncovering on the *nix front with Chef - seems like a LOT of what I'm looking for is already done. Is there a writeup somewhere that shows/documents manipulating an esx server/creating/cloning/etc vms? I see there are a lot of cloud p

Re: [Puppet Users] deleting users / purge their homedir

2011-09-08 Thread Ken Barber
The user resource won't clean up home directories directories for you. In fact there was a feature request to rename the attribute for this very reason: http://projects.puppetlabs.com/issues/7002 It was originally pegged in the original managehome feature request many years back but never made it

Re: [Puppet Users] Destroy nodes in dashboard

2011-09-08 Thread Craig White
version? On Sep 8, 2011, at 8:22 AM, Justin Lambert wrote: > Destroying nodes in puppet dashboard seems to kill dashboard after about 5 > minutes requiring a restart. I took at look at the DB schema and was just > going to remove nodes via SQL directly instead of using the dashboard and > wan

Re: [Puppet Users] deleting users / purge their homedir

2011-09-08 Thread Christopher Wood
On Thu, Sep 08, 2011 at 04:31:38PM +0100, Ken Barber wrote: > The user resource won't clean up home directories directories for you. > In fact there was a feature request to rename the attribute for this > very reason: > > http://projects.puppetlabs.com/issues/7002 > > It was originally pegged in

[Puppet Users] use cached catalog

2011-09-08 Thread Craig White
Silly me disabled caching on catalogs throughout my testing and now that I'm in production mode, I have had some issues with my puppetmaster/foreman ENC server VM sometimes getting into swap and the dreadful performance has caused some failures because the catalog could not be compiled. While I

Re: [Puppet-dev] Re: [Puppet Users] Release Cycle for September

2011-09-08 Thread Michael Stahnke
On Wed, Sep 7, 2011 at 9:04 PM, Matt Robinson wrote: > On Wed, Sep 7, 2011 at 6:15 PM, Michael Stahnke > wrote: >> 3.  Dashboard has had no commits since 1.2.0, so no RC this month. > > Dashboard does have commits since 1.2.0 > > $ git log --oneline --no-merges 1.2.0.. > 6b10a5e maint: Move dupl

Re: [Puppet Users] Destroy nodes in dashboard

2011-09-08 Thread Justin Lambert
1.1.0 On Thu, Sep 8, 2011 at 9:31 AM, Craig White wrote: > version? > > On Sep 8, 2011, at 8:22 AM, Justin Lambert wrote: > > > Destroying nodes in puppet dashboard seems to kill dashboard after about > 5 minutes requiring a restart. I took at look at the DB schema and was just > going to remov

[Puppet Users] Issues with environments not being respected

2011-09-08 Thread Cody Robertson
I've ran into a strange issue today while using my development environment I was receiving some errors about modules that shouldn't have been used. After looking it looks like my agent (or master) isn't respecting the environment I specify and is actually using the main (master) environment. Thi

Re: [Puppet Users] Destroy nodes in dashboard

2011-09-08 Thread Craig White
I was able to destroy nodes on 1.2.1 rc4 without having to restart dashboard/passenger - don't know about 1.1.0 though Craig On Sep 8, 2011, at 9:25 AM, Justin Lambert wrote: > 1.1.0 > > On Thu, Sep 8, 2011 at 9:31 AM, Craig White wrote: > version? > > On Sep 8, 2011, at 8:22 AM, Justin Lamb

[Puppet Users] Re: Using Puppet to reset admin passwords on Windows

2011-09-08 Thread M. Hand
Is there a way to have a Windows hashed password setup from the command line (ie we have a pw hash, how do we, on command line, update a users pw with that hash)? On Sep 7, 5:42 pm, Jacob Helwig wrote: > Puppet only recently gained the ability to manage local users (though > not yet passwords) o

Re: [Puppet Users] Re: Using Puppet to reset admin passwords on Windows

2011-09-08 Thread Nigel Kersten
On Thu, Sep 8, 2011 at 9:51 AM, M. Hand wrote: > Is there a way to have a Windows hashed password setup from the > command line (ie we have a pw hash, how do we, on command line, update > a users pw with that hash)? > That's the problem we haven't solved yet. Suggestions much appreciated! > >

Re: [Puppet Users] Destroy nodes in dashboard

2011-09-08 Thread Laurence Southon
On 08/09/11 16:22, Justin Lambert wrote: > Destroying nodes in puppet dashboard seems to kill dashboard after about > 5 minutes requiring a restart. If it's of help I can confirm the same with Dashboard v1.1.0 Workaround here is to reduce the number of stored reports to 10 days immediately before

Re: [Puppet Users] puppet manifests

2011-09-08 Thread Cristian Măgherușan-Stanciu
Hi, Can you please nopaste the contents of all your .pp files? I have a gut feeling that you're mixing up the include and import statements. Cristi On Fri, Sep 2, 2011 at 2:28 AM, octomeow wrote: > Hi > > I have a simple site.pp  in my manifests folder on puppetmaster > it has one line, import

[Puppet Users] "Could not evaluate: Not a directory" errors with pluginsync

2011-09-08 Thread mrooney
Hello all, We're using Puppet/Puppetmaster 2.6.4 (2.6.4-2ubuntu2 on Ubuntu 11.04 to be precise), and after enabling pluginsync on the agents to make our custom facts available, all puppet runs start with the output: info: Retrieving plugin err: /File[/var/lib/puppet/lib/puppet/parser/functions/ba

[Puppet Users] Re: Issues with environments not being respected

2011-09-08 Thread Cody Robertson
I've downgraded a few nodes showing these issues to agent 2.6.9 and they're working properly. I suspect it's something introduced in 2.7.x branch. If I have time later I'll see if I can pinpoint where exactly. -- You received this message because you are subscribed to the Google Groups "Puppet

Re: [Puppet Users] Re: Using Puppet to reset admin passwords on Windows

2011-09-08 Thread Craig White
On Sep 8, 2011, at 9:55 AM, Nigel Kersten wrote: > > > On Thu, Sep 8, 2011 at 9:51 AM, M. Hand wrote: > Is there a way to have a Windows hashed password setup from the > command line (ie we have a pw hash, how do we, on command line, update > a users pw with that hash)? > > That's the problem

[Puppet Users] Re: Issues with environments not being respected

2011-09-08 Thread Cody Robertson
Sorry for the spam. I've opened an issue for this http://projects.puppetlabs.com/issues/9388 -- 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/-/3AL0gLCrEMYJ.

Re: [Puppet Users] Re: Using Puppet to reset admin passwords on Windows

2011-09-08 Thread Nigel Kersten
On Thu, Sep 8, 2011 at 10:49 AM, Craig White wrote: > > On Sep 8, 2011, at 9:55 AM, Nigel Kersten wrote: > > > > > > > On Thu, Sep 8, 2011 at 9:51 AM, M. Hand wrote: > > Is there a way to have a Windows hashed password setup from the > > command line (ie we have a pw hash, how do we, on command

[Puppet Users] ruby functions in puppet DSL

2011-09-08 Thread Guy Matz
Sorry if this has been hashed out before, but I can't find an answer anywhere . . . I would like to use the ruby function "upcase" on a variable that gets set in my site.pp . . . do I really need to write a custom function for this? Does anyone have any code I can drop into my puppet code that do

Re: [Puppet Users] Dashboard table resource_statuses growing uncontrollably

2011-09-08 Thread Craig White
This seems to work... --- prune_reports.rake 2011-09-08 12:42:54.433928840 -0700 +++ prune_reports.rake-new 2011-09-08 12:44:01.928583735 -0700 @@ -52,5 +52,11 @@ puts "Deleting reports before #{cutoff}..." deleted_count = Report.delete_all(['time < ?', cutoff]) puts "Deleted

Re: [Puppet Users] ruby functions in puppet DSL

2011-09-08 Thread Nan Liu
On Thu, Sep 8, 2011 at 12:43 PM, Guy Matz wrote: > Sorry if this has been hashed out before, but I can't find an answer > anywhere . . . > > I would like to use the ruby function "upcase" on a variable that gets set > in my site.pp . . . do I really need to write a custom function for this? > Do

Re: [Puppet Users] small problem with init script on RHEL6

2011-09-08 Thread Todd Zullinger
Jim N wrote: > I was getting this when starting puppetmasterd (puppet- > server-0.25.5-1.el6.noarch RPM install): > > $ sudo /etc/init.d/puppetmaster start > Starting puppetmaster: Could not run: Could not create PID file: /var/ > lib/puppet/run/puppetmasterd.pid > > > This change in the init scrip

[Puppet Users] using defined resource type collections

2011-09-08 Thread Richard Jacobsen
Hello everyone, I have a bunch of users as virtual defined resources, like this: @user::virtual::localuser { 'testuser': uid => 12000, gid => 'users', shell => '/bin/bash', home => "/home/testuser", sshkey => 'blah', mytag => ["linuxadmin","usergroup1"], I'm using collec

[Puppet Users] Problems with the "source" statement

2011-09-08 Thread BillS
I am new to puppet and have been trying to work my way through the tutorial materials on the PuppetLab site as well as the "Pro Puppet" book (and anything else I can find via google). I did not get very far before I got tripped up with what would seem to be a very basic "source" statement. I am sur

Re: [Puppet Users] Problems with the "source" statement

2011-09-08 Thread Aaron Grewell
Lose the /files/ part. That's automatic. On Thu, Sep 8, 2011 at 4:00 PM, BillS wrote: > I am new to puppet and have been trying to work my way through the > tutorial materials on the PuppetLab site as well as the "Pro Puppet" > book (and anything else I can find via google). I did not get very

[Puppet Users] Re: Problems with the "source" statement

2011-09-08 Thread BillS
On Sep 8, 4:02 pm, Aaron Grewell wrote: > Lose the /files/ part.  That's automatic. > Sigh. 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 th

[Puppet Users] Adding structural data in puppet dashboard.

2011-09-08 Thread Dominik Zyla
Hello everyone, I'm trying to add something like that: http://pastebin.com/eEeHQ2rL to my node parameters using Puppet-Dashboard and no matter how I'm doing that, there is no effect I'm waiting for. Any hint, somebady? -- Dominik Zyla -- You received this message because you are subscribed

Re: [Puppet Users] Re: Problems with the "source" statement

2011-09-08 Thread Aaron Grewell
Been there. :) On Thu, Sep 8, 2011 at 4:07 PM, BillS wrote: > > > On Sep 8, 4:02 pm, Aaron Grewell wrote: > > Lose the /files/ part. That's automatic. > > > > Sigh. Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post

[Puppet Users] Issue with puppet cert -l -all

2011-09-08 Thread Stephane Rossan
Hello, When I run puppet cert –l –all on my puppetca, I got an error message: "err: Could not call list: header too long" I googled the issue and found links about 0 byte file under /var/lib/puppet/ssl/ca/requests directory. I checked and it is empty, I have no files at all. Does anybody have a

Re: [Puppet Users] Issue with puppet cert -l -all

2011-09-08 Thread Nan Liu
On Thu, Sep 8, 2011 at 4:43 PM, Stephane Rossan wrote: > When I run puppet cert –l –all on my puppetca, I got an error message: > "err: Could not call list: header too long" > I googled the issue and found links about 0 byte file under > /var/lib/puppet/ssl/ca/requests directory. > I checked and

[Puppet Users] Re: Slightly OT: Puppet + OpenQRM

2011-09-08 Thread treydock
On Sep 7, 1:10 am, Ohad Levy wrote: > On Tue, Sep 6, 2011 at 6:44 PM, treydock wrote: > > I've recently been looking to move my KVM management (currently via > > Puppet and virt-manager) to something web-based and robust (ie > > "Cloud"), and came across OpenQRM.  Looking at the features list i

[Puppet Users] ANNOUNCE: Facter 1.6.1rc2

2011-09-08 Thread Matthaus Litteken
Facter 1.6.1rc2 is a maintenance release containing fixes, updates and refactoring. Significant effort has been put into getting to Facter to run on Windows for this release, as noted below. This release is available for download at: http://puppetlabs.com/downloads/facter/facter-1.6.1rc2.tar.gz

[Puppet Users] What is the deference of Puppi, MCollective and ControlTier?

2011-09-08 Thread Yunfeng Xu
Hi, I am using puppet as my configuration solution, it is a very good for system-level configuration management and compliance. But it is not good at batch jobs. For now, I have three options: puppi, MCollective and ControlTier. I don't know much about them. Can anyone give me some advices that wh

[Puppet Users] What is the deference of Puppi, MCollective and ControlTier?

2011-09-08 Thread Yunfeng Xu
Hi, I am using puppet as my configuration solution, it is a very good for system-level configuration management and compliance. But it is not good at batch jobs. For now, I have three options: puppi, MCollective and ControlTier. I don't know much about them. Can anyone give me some advices that wh

Re: [Puppet Users] What is the deference of Puppi, MCollective and ControlTier?

2011-09-08 Thread Brian Gupta
I have also heard some good things about Rundeck as well. http://rundeck.org/ -Brian On Thu, Sep 8, 2011 at 11:44 PM, Yunfeng Xu wrote: > Hi, > > I am using puppet as my configuration solution, it is a very good for > system-level configuration management and compliance. But it is not good at >

Re: [Puppet Users] Re: The require function

2011-09-08 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 >> You've seen this with your own resources where the parent is a directory and >> the child is a file? >> Please bug report, as it's been a very long time since that autorequire was >> put in (0.24.x ? 0.25.x?), and I haven't seen a reported bug since

Re: [Puppet Users] Re: fqdn on puppet clients

2011-09-08 Thread Bjorge Solli
Indeed it was wrong in /etc/hosts, but this whould be ok when DHCP is set up differently. Thanks Bjørge On 08/09/11 13:40, michaelkrieg wrote: > Hi, > > what says "hostname -f"? What about your /etc/hosts and /etc/ > hostname ? > > Regards, > Michael > > On 8 Sep., 13:36, Bjorge Solli wrote: >>