Re: [Puppet Users] Re: Clarification on mount type behaviour

2017-03-30 Thread Stefan Schulte
Hi On 30.03.2017 14:57, jcbollinger wrote: mounted. But perhaps it doesn't have to be limited that way. Expanding its scope to cover the options with which the filesystem is actually mounted seems like a reasonable feature request. And if you don't want to wait, then very likely you can roll

Re: [Puppet Users] Re: writing custom fact -> return value not as expected

2017-01-10 Thread Stefan Schulte
Hey Rob, variable interpolation in strings in ruby is actually done with #{some_var}, so the following snippet #!/usr/bin/ruby "Hello World".match(/Hello (.*)/) puts $1 puts "$1" puts "#{$1} actually returns World $1 World As you can see "$1" does not interpol

Re: [Puppet Users] writing custom fact -> return value not as expected

2017-01-10 Thread Stefan Schulte
Hi Denny, IIRC facter will internally run commands with a C locale to get reliable command output on different locale settings [1] % LC_ALL=de_DE.utf8 /usr/bin/who -b |awk '{print $3}' 19:34 % LC_ALL=en_US.utf8 /usr/bin/who -b |awk '{print $3}' 2017-01-10 % LC_ALL=C /usr/bin/w

Re: [Puppet Users] Array of properties matching_all not working

2016-12-05 Thread Stefan Schulte
On 04.12.2016 09:27, Lupin Deterd wrote: > Hi, > > I'm working on a custom type & provider. One of the property is an > Array and I want to match every elements in it but somehow I can't > make it work. Relevant snippet are as follow: > > type/zfsacl.rb > > newproperty(:permission, :array => :

[Puppet Users] Access to hiera repository

2016-02-02 Thread 'Stefan Schulte' via Puppet Users
Hello everyone, I am currently working in a Linux team that decided to use Puppet as a configuration management tool and we developed a couple of own modules, use a lot from the forge and we keep hiera data in a separate git repository (tools: r10k+controlrepo, one separate hiera repo not managed

Re: [Puppet Users] Re: exec without a shell

2016-01-27 Thread 'Stefan Schulte' via Puppet Users
On 28.01.2016 01:46, 'Stefan Schulte' via Puppet Users wrote: > [...] > I guess the sane approach would be to add a feature request to allow > passing an array as a command parameter which in turn would run ruby's > exec with an array as well, bypassing the shell. &g

Re: [Puppet Users] Re: exec without a shell

2016-01-27 Thread 'Stefan Schulte' via Puppet Users
On 27.01.2016 15:28, jcbollinger wrote: > [...] > Puppet implements the "posix" provider by passing the command to > Ruby's Kernel.exec() > . > [...] Thanks for the inside view John. This would explain the current behaviour. IIRC this beh

Re: [Puppet Users] Re: Prefetch in custom types in Puppet v4?

2016-01-26 Thread 'Stefan Schulte' via Puppet Users
On 19.01.2016 02:53, Jakov Sosic wrote: > On 01/19/2016 02:52 AM, Jakov Sosic wrote: >> Hi guys, >> >> >> I've noticed the following problem with one of my providers in v4. >> >> This is the original prefetch method I used: >> >> def self.prefetch(resources) >> instances.each do |prov|

[Puppet Users] exec without a shell

2016-01-26 Thread 'Stefan Schulte' via Puppet Users
Hello, I've got a quick question about the exec type. The exec type does have a shell provider and a posix provider and the posix provider says # https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/exec/posix.rb Executes external binaries **directly, without passing throu

Re: [Puppet Users] Re: mount point directory permissions

2014-03-23 Thread Stefan Schulte
On 21.03.2014 19:53, José Luis Ledesma wrote: > I prefer the exec resource to create the mount point ( with onlyif ! > Test-d mountpoint) and the file resource to set the proper permissions. > > Regards, That's what I'd do, too. But you can use `creates` paramter to do the check, there is no need

Re: [Puppet Users] How do I prevent logging of secure data?

2014-02-24 Thread Stefan Schulte
On 24.02.2014 21:13, Larry Fast wrote: > By default puppet will report the changes to any files it updates. If > the file includes any secure data like passwords or private encryption > keys, that also shows up in the logs. Is there any way to block this > level of logging for individual files?

[Puppet Users] Let puppet configure your monitoring (here: nimsoft)

2014-02-23 Thread Stefan Schulte
Hi puppet users, just wanted to know if there are any puppet users who are using nimsoft as a monitoring tool? We are currently switching to nimsoft at $work and I noticed that for a proper monitoring configuration I need information that is already written down in our puppet manifests. E.g. to c

Re: [Puppet Users] matching all current "ipaddress_ethX" facts

2013-12-04 Thread Stefan Schulte
On 21.11.2013 13:32, cko wrote: > Hi, > > I'm currently trying to solve the following problem: > > I wrote a module that matches the "$ipaddress" fact for certain IP > subnets (like 20.20.2... or 30.30.2..). Depending on the subnet, the > variable $proxy-server changes. > > The problem is, that

Re: [Puppet Users] Accessing methods of parent provider

2013-07-14 Thread Stefan Schulte
On 14.07.2013 02:27, Schofield wrote: > I'm taking some time to refactor a custom provider. I'm trying to move > common code into a parent provider so that it can be shared among all > custom resource providers in the puppet module. While verifying I can > call methods in the parent provider I ge

Re: [Puppet Users] ssh_authorized_key - does not show up in "puppet resource"

2013-07-12 Thread Stefan Schulte
On 12.07.2013 21:45, Dan White wrote: > Great answer.. > > On the second point -- how to generate an answer -- in > /etc/ssh/sshd_config is a paramer named AuthorizedKeysFile which > defaults to > > ~/.ssh/authorized_keys > > That is a starting point ! > Yeah you're probably right that you cou

Re: [Puppet Users] ssh_authorized_key - does not show up in "puppet resource"

2013-07-12 Thread Stefan Schulte
On 12.07.2013 20:06, Dan White wrote: > I am getting into managing user accounts with Puppet - and having a blast ! > > I stumbled on this and wanted to ask: > > If I type : I get: > puppet resource user The expected puppet list of all the logins. > puppet re

Re: [Puppet Users] Purged packages cause servers to always list as "changed" in Dashboard

2013-07-12 Thread Stefan Schulte
On 12.07.2013 06:57, Kim Scarborough wrote: > So I have a module that set several packages to "purged". This generates > messages like this in the log on every run: > > puppet-agent[27671]: (/Stage[main]/Foo/Package[ghostscript]/ensure) created > > That doesn't bother me in and of itself, but the

Re: [Puppet Users] Force osfamily value

2013-06-10 Thread Stefan Schulte
On Fri, 7 Jun 2013 07:03:21 -0700 (PDT) Charly Mathieu wrote: > Actually, it doesn't get better. Nice try ^^ > What version of facter are you using now? Can you please post the output of % facter facterversion operatingsystem osfamily facterversion => 1.7.0 operatingsystem => Gento

Re: [Puppet Users] ssh_authorized_key filling /var/log/messages

2013-06-07 Thread Stefan Schulte
On Mon, 3 Jun 2013 09:15:56 -0700 (PDT) Marek Dohojda wrote: > > > On Saturday, June 1, 2013 1:59:36 PM UTC-6, Stefan Schulte wrote: > > > > On Fri, 31 May 2013 15:56:30 -0700 (PDT) > > Marek Dohojda > wrote: > > > > > Having weird is

Re: [Puppet Users] ssh_authorized_key filling /var/log/messages

2013-06-01 Thread Stefan Schulte
On Fri, 31 May 2013 15:56:30 -0700 (PDT) Marek Dohojda wrote: > Having weird issue that I can't seem to find any solution to: > > puppet 2.7.21 and 2.6.9 > > here is my stanza: ssh_authorized_key{ “$name”: > > ensure => present, > name => "$name", > ke

Re: [Puppet Users] ignoring a service that doesn't exist

2013-05-09 Thread Stefan Schulte
On Thu, 9 May 2013 13:58:45 -0700 (PDT) John Simpson wrote: > I've done the following, it ended up being a bit simpler for me when > I'm not sure what random services a new CentOS install has installed > and/or enabled... > > define no_service ( ) { > service { "${name}" : > ensure =

Re: [Puppet Users] Re: Puppermaster certificate expired

2013-05-09 Thread Stefan Schulte
On Thu, 9 May 2013 17:10:51 +0200 Lorenzo Salvadorini wrote: > 2013/5/9 Nicolai Mollerup > > > Anyway I think the easy way is to setup some autosigning of clients > > after creating a new CA. > > Think you will have to clean the ssl-dir on clients for this to > > work, though. > > > > Since we

Re: [Puppet Users] Having trouble with facter - "invalid argument"

2013-05-09 Thread Stefan Schulte
On Wed, 8 May 2013 06:49:32 -0700 (PDT) jcbollinger wrote: > Examining the code doesn't reveal any obvious error. Facter uses > this: > > def > self.read_sysfs_dmi_entries(path="/sys/firmware/dmi/entries/1-0/raw") > if File.exists?(path) File.read(path) > end > end > > That /sys/firmwar

Re: [Puppet Users] PuppetDB: SSL problems

2013-05-08 Thread Stefan Schulte
On Wed, 8 May 2013 07:01:56 -0700 (PDT) kl.puppetu...@gmail.com wrote: > > Error: Could not retrieve catalog from remote server: Error 400 on > SERVER: Failed to submit 'replace facts' command for gaia.local > to PuppetDB at puppetdb.local:8081: SSL_connect SYSCALL returned=5 > errno=0 state=SSLv

Re: [Puppet Users] Having trouble with facter - "invalid argument"

2013-05-07 Thread Stefan Schulte
On Tue, 7 May 2013 13:00:53 -0700 (PDT) Charlie Brune wrote: > [root@hogwarts ~]# facter --debug --timing virtual > kernel: 2.97ms > Could not retrieve virtual: Invalid argument - > /sys/firmware/dmi/entries/1-0/raw > virtual: 50.26ms > lsbdistid: 0.53ms > value for lsbdistid is still nil > oper

Re: [Puppet Users] Having trouble with facter - "invalid argument"

2013-05-07 Thread Stefan Schulte
On Tue, 7 May 2013 10:01:03 -0700 (PDT) Charlie Brune wrote: > I did discover that Puppet appears to be running just fine. I think > the problem may be isolated to facter and puppet appears to forgive > the problem. 8-) > > Here's the output you requested. (I don't see a trace.) > > [root@ho

Re: [Puppet Users] Trouble writing authorized_keys2

2013-05-07 Thread Stefan Schulte
On Tue, 7 May 2013 10:11:44 -0400 Bret Wortman wrote: > I've got a situation where a manifest fails when writing one > particular key for a user. What I have is a manifest that looks like > this: > > class my::accounts () { > > Ssh_authorized_key { > ensure => present, > typ

Re: [Puppet Users] Having trouble with facter - "invalid argument"

2013-05-06 Thread Stefan Schulte
On Mon, 6 May 2013 10:26:38 -0700 (PDT) Charlie Brune wrote: > I'm trying to install Puppet on a Fedora 17 box. > > The "puppet agent --test" command fails with this error message: > > Could not retrieve virtual: Invalid argument - > > /sys/firmware/dmi/entries/1-0/raw > > > > I get the same

Re: [Puppet Users] Retrieve scoped resource defaults from class method in custom type

2013-05-01 Thread Stefan Schulte
On Tue, 30 Apr 2013 15:37:11 -0700 Ryan Uber wrote: > [accidently sent this to puppet-dev, re-posting to puppet-users] > > Hello puppet-users, > > I am working on a module that provides a custom type. The type when > called will create new resources in the catalog using syntax like: > > Puppet

Re: [Puppet Users] Passenger failing sporadically

2013-04-22 Thread Stefan Schulte
On Mon, 22 Apr 2013 07:06:50 -0700 (PDT) Drew Blessing wrote: > We're having a very strange issue with Puppet running on Passenger. > Every day or 2, our clients start receiving Passenger back traces. > It's the generic "Ruby (Rack) application could not be started." My > initial thought was tha

Re: [Puppet Users] Windows Puppet waits for , then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"

2013-04-22 Thread Stefan Schulte
On Mon, 22 Apr 2013 10:08:45 +0200 Dirk Heinrichs wrote: > On Mon, Apr 22, 2013 at 12:45:35AM -0700, Paul Tötterman wrote: > > > Shouldn't environment variables be case-insensitive? What code is > > responsible for expanding those environment variables? > > This is Windows, so I'd say: "It dep

Re: [Puppet Users] Windows Puppet waits for , then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"

2013-04-20 Thread Stefan Schulte
On Tue, 16 Apr 2013 22:46:53 -0700 (PDT) Larry Fast wrote: > > Side issue: diagnostics could have been better. The error did not > indicate a source file. And Pluginsync does not indicate the source > module for any of the files it loads. Not even in debug mode. > FYI: I created a feature req

Re: [Puppet Users] Windows Puppet waits for , then warns "Facter::Util::Resolution.exec with a shell built-in is deprecated"

2013-04-20 Thread Stefan Schulte
On Fri, 19 Apr 2013 13:50:59 +0200 Dirk Heinrichs wrote: > I'm facing a similar problem, on one single Windows machine out of > more than 100. If I run any puppet command, I get above warning. We'll first try to get a clearer error message. Please go to your facter installation directory on your

Re: [Puppet Users] Re: Puppet and OVO/ITO/OML

2013-04-08 Thread Stefan Schulte
On Sun, 7 Apr 2013 02:16:07 -0700 (PDT) ro...@liveperson.com wrote: > Thanks for all the information Stefan! > I'd be happy to see the module you're using if it's possible. > > Roee. > Ok so I have a hpoml::client class to include at node level. It basically consists of a hpoml::user class wher

Re: [Puppet Users] Flush provider - Differentiating between new resource and modification?

2013-04-06 Thread Stefan Schulte
On Fri, 5 Apr 2013 00:57:32 -0700 (PDT) Gavin Williams wrote: > Morning all > > I'm working on converting some of my NetApp providers to > prefetch/flush style to try and optimize performance. > > I've hit an issue on my Netapp_user provider, around handling > resource creation versus resource

Re: [Puppet Users] Re: Puppet and OVO/ITO/OML

2013-04-06 Thread Stefan Schulte
On Thu, 4 Apr 2013 02:29:51 -0700 (PDT) ro...@liveperson.com wrote: > Hi Stefan, > I know it's an old post, but I'll be happy to hear more about how > you're doing the agent installations with puppet, and maybe even get > some code from you if it's possible. :) > Is there an option to contact you?

Re: [Puppet Users] facter fact within a custom provider

2013-03-22 Thread Stefan Schulte
On Fri, 22 Mar 2013 10:29:22 -0700 (PDT) Jist Anidiot wrote: > I have a custom package provider. However within the ruby code, I > need access a custom facter fact (which has the path to the > executable which handles the package installation). > > I tried doing lookupvar('bin_path' ) but it c

Re: [Puppet Users] Re: Custom ensure instead of ensurable in type provider

2013-03-15 Thread Stefan Schulte
On Wed, 13 Mar 2013 09:00:18 -0700 (PDT) jcbollinger wrote: > Your problem is that you are conflating distinct (for your purposes) > aspects of your resource's state. If you care at times whether the > variable is declared at all or not, and at other times what its value > is, then those should

Re: [Puppet Users] Sometimes getting 'undef' in template

2013-01-06 Thread Stefan Schulte
On Sun, Jan 06, 2013 at 08:54:23AM -0500, Brian Lalor wrote: > Morning, all. I've got a problem with a custom class and template that has > me stumped. I've created the following class: > > class graphite::carbon( > $cache_port = 2003, > $cache_enable_udp = false, >

Re: [Puppet Users] expiry attribut of users applied every time

2012-12-12 Thread Stefan Schulte
On Wed, Dec 12, 2012 at 04:19:17AM -0800, digrouz wrote: > Hello, > > Any updates when the fix will be implemented? > > Hi digrouz, I am currently assigned to the ticket http://projects.puppetlabs.com/issues/11675 and have done some work already. The problem is that I first have to improve the

Re: [Puppet Users] /etc/ssh/ssh_known_hosts not world readable when using sshkey resource

2012-12-02 Thread Stefan Schulte
On Sat, Dec 01, 2012 at 09:58:43AM -0800, Yanis Guenane wrote: > When I apply a sshkey resource I do obtain the /etc/ssh/ssh_known_hosts > file, but it is not world reable. > > According to the ssh man page, > > /etc/ssh/ssh_known_hosts > > Systemwide list of known host keys. This

Re: [Puppet Users] Re: Puppet & Oracle Database config management

2012-11-23 Thread Stefan Schulte
On Thu, Nov 22, 2012 at 04:18:02AM -0800, Gavin Williams wrote: > Ok, I've come back to this functionality, and need to move it along... > > My challenge now is how I can use the oratab resource to trigger other > actions... > > So if oratab creates a new entry in /etc/oratab, then I want to i

Re: [Puppet Users] Re: Puppet & Oracle Database config management

2012-11-02 Thread Stefan Schulte
On Fri, Nov 02, 2012 at 07:23:54AM -0700, Gavin Williams wrote: > Afternoon all... > > I've started looking at coding this into our framework now, and have hit a > possible stumbling block... > > Currently, I've got a fact that reads out the configured Oracle SIDs in > /etc/oratab and sticks

Re: [Puppet Users] Have Class Only Perform Actions When There Is Work To Do (i.e. Making Them Idempotent)

2012-10-26 Thread Stefan Schulte
On Fri, Oct 26, 2012 at 06:55:32AM -0700, Dave Mankoff wrote: > Howdy. I feel like I am missing something really simply with regards to the > way that Puppet works and I am wondering if someone can point me in the > write direction. > > I have written a class that downloads, uncompresses, compil

Re: [Puppet Users] OperatingSystem fact for Oracle Linux?

2012-10-26 Thread Stefan Schulte
On Fri, Oct 26, 2012 at 02:19:25AM -0700, Gavin Williams wrote: > Morning all > > Not sure on the best place to raise this, so thought I'd start here... > > I'm starting to work with Puppet and Oracle Linux 6.1. > Unfortunately I'm finding a lot of existing modules aren't working with OL > 6.1

Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-26 Thread Stefan Schulte
On Thu, Oct 25, 2012 at 05:11:34PM -0700, Ben McCann wrote: > Definitely seems like a bug. I added the Puppet Ubuntu repo and upgraded > to puppet 3.0.1 and it works now. I'm not going to bother filing it since > it seems like it's since been fixed. > > One question though: Do any of the gro

Re: [Puppet Users] Re: Trouble adding a user to a group

2012-10-25 Thread Stefan Schulte
On Thu, Oct 25, 2012 at 04:34:26PM -0700, Ben McCann wrote: > Yes, I am realizing it: > Users::Virtual::Localuser <| gid == users |> > > If I go onto the host and delete the user (sudo userdel myuser) then puppet > will create a new user and that user will be a member of all the groups I > desir

Re: [Puppet Users] Puppet & Oracle Database config management

2012-10-24 Thread Stefan Schulte
On Wed, Oct 24, 2012 at 03:03:28PM +0100, fatmcgav wrote: > Afternoon all. > > I've been reading around on Puppet and Oracle, and have come up with a few > links that suggest how to get Oracle installed and base configured, which > has got me started in the right direction on that. > > My next ch

Re: [Puppet Users] Re: Glassfish custom provider and 'file does not exist'

2012-10-24 Thread Stefan Schulte
On Wed, Oct 24, 2012 at 03:38:20AM -0700, Gavin Williams wrote: > Ok, I've gone about it a slightly different way now, and have stripped the > 'commands' argument from the domain function provider, and am trying to > validate the presence of asadmin at the main asadmin.rb level. > > I've create

Re: [Puppet Users] Re: Failed to set group to '0': Operation not permitted

2012-10-23 Thread Stefan Schulte
On Mon, Oct 22, 2012 at 03:05:40PM -0700, jcbollinger wrote: > I'm not sure why that inherently means you don't have root, but whatever. > > So, supposing the issue is with > File["/home/user/rabbitmq-server-generic-unix-2.8.7.tar.gz"], it's not > immediately clear to me whether Puppet's behavio

Re: [Puppet Users] custom type with array property?

2012-10-22 Thread Stefan Schulte
On Mon, Oct 22, 2012 at 10:53:44PM +0200, Jakov Sosic wrote: > On 10/21/2012 10:43 PM, Nan Liu wrote: > > > Puppet::Type.newtype(:customtype) do > > newproperty(:myarray, array_matching => :all) do > > end > > end > > Thank you! > > Although you have syntax error, it should be: > > newprop

Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Stefan Schulte
On Mon, Oct 15, 2012 at 08:18:36PM +0200, Jakov Sosic wrote: > On 10/15/2012 07:23 PM, Stefan Schulte wrote: > > > The fact that your exists? method does not really answer the question if > > a resource is present or absent is a bit strange. And inside the create > >

Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Stefan Schulte
On Mon, Oct 15, 2012 at 01:09:09PM +0200, Jakov Sosic wrote: > On 10/15/2012 09:13 AM, Stefan Schulte wrote: > > > Is it possible to run a command to get all the desired information about > > every systems at once? This way you can implement a prefetch pattern. > > Basic

Re: [Puppet Users] Systems Provisioning

2012-10-15 Thread Stefan Schulte
On Sun, Oct 14, 2012 at 04:20:09PM +0200, Jakov Sosic wrote: > On 10/14/2012 03:01 PM, Stefan Schulte wrote: > > If you use "ensurable", puppet will expect the provider to have an > > exists? method and if that returns true your create method will not be > > called

Re: [Puppet Users] Systems Provisioning

2012-10-14 Thread Stefan Schulte
On Sat, Oct 13, 2012 at 11:52:49PM +0200, Jakov Sosic wrote: > On 10/13/2012 11:17 PM, Stefan Schulte wrote: > > If puppet has to sync ensure it will not sync any other property. That > > means if your type defines "ensurable" or you have defined an ensure > > prope

Re: [Puppet Users] Systems Provisioning

2012-10-13 Thread Stefan Schulte
On Sat, Oct 13, 2012 at 10:50:05PM +0200, Jakov Sosic wrote: > On 10/13/2012 05:55 PM, Dan White wrote: > > Is this module posted somewhere public ? > > Looks interesting enough to try out. > > It's not posted yet but it will be soon. I'm currently rewriting some > providers from CLI cobbler to XM

Re: [Puppet Users] Re: Wrapper classes, ordering & anchors

2012-10-11 Thread Stefan Schulte
On Fri, Oct 12, 2012 at 03:49:48AM +0530, Mohit Chawla wrote: > Hi, it works with code like in your paste. But check this out : > http://pastie.org/5037832, the original situation I found myself in, > and you can see the "floating off" behaviour again. > Because you are saying that Class[abc] sho

Re: [Puppet Users] expiry attribut of users applied every time

2012-10-11 Thread Stefan Schulte
On Thu, Oct 11, 2012 at 10:47:41AM -0700, Jeff McCune wrote: > Nicholas, > > [...] > We can't make this idempotent as a result. This is definitely a bug, > would you mind filing it? If so, I'd be happy to do so on your behalf, but > bugs from users are always better than bugs I report. > > Ple

Re: [Puppet Users] always changing sshkeys

2012-10-11 Thread Stefan Schulte
On Tue, Oct 09, 2012 at 03:46:36PM +0100, Klaus Ethgen wrote: > I have a setup where I construct the host_aliases of sshkey. This work > fine. But now I encounter that several (not all) keys are changed every > run of puppet: >notice: /Stage[main]/Ssh/Sshkey[XX.XXX.XXrsa]/host_aliases: > h

Re: [Puppet Users] Re: is_virtual selector

2012-10-06 Thread Stefan Schulte
On Fri, Oct 05, 2012 at 06:42:25PM -0700, Matt wrote: > Thanks Krzysztof. It successfully runs now, but output is misleading on > subsequent runs: > > build ~]# puppet agent -tv > Info: Retrieving plugin > Info: Caching catalog for build > Info: Applying configuration version '1349482471' > /Sta

Re: [Puppet Users] Puppet cron job class stamps file with date-time. How?

2012-10-04 Thread Stefan Schulte
In case of the cron type it is easy for puppet to savely add a header because puppet knows the purpose of a cronfile and knows that # is treated as a comment. If you use the filetype puppet does not know what your file is for. If you ship a *.tar.gz file you certainly don't want puppet to put a he

Re: [Puppet Users] Glassfish custom provider and 'file does not exist'

2012-09-28 Thread Stefan Schulte
On Fri, Sep 28, 2012 at 10:39:11AM +0100, fatmcgav wrote: > Ok, so I thought I'd take another look, and try and get some debug logging > out of the provider to make sure it's constructing things correctly... > > I've applied the following patch to asadmin.rb, however I'm not seeing > anything on t

Re: [Puppet Users] Glassfish custom provider and 'file does not exist'

2012-09-27 Thread Stefan Schulte
On Thu, Sep 27, 2012 at 12:57:01PM +0100, fatmcgav wrote: > Hi there > > I thought that initially as well, so I modified the provider to use a full > path rather than assume it was on the path. > > The log files below are prints of the variables which are being passed > around... > > Cheers > Ga

Re: [Puppet Users] require file/package not managed by puppet

2012-09-27 Thread Stefan Schulte
On Thu, Sep 27, 2012 at 05:58:34AM -0700, jcbollinger wrote: > That's actually kinda cool, but I think either you've missed the OP's > point, or I'm missing yours. Declaring the package for only auditing > should indeed support any Puppet relationships with that resource without > forcing the p

Re: [Puppet Users] require file/package not managed by puppet

2012-09-26 Thread Stefan Schulte
On Fri, Sep 21, 2012 at 05:40:52PM -0700, Justin Ryan wrote: > I would like to place a file with puppet only if a certain package is > installed on the system -- but assuming this package is not puppet-managed. > Checking for the presence of a non-puppet-managed file is also ok. Is this > possib

Re: [Puppet Users] Re: ssh keys - registering multiple keys onto a same remote account

2012-09-26 Thread Stefan Schulte
On Thu, Sep 20, 2012 at 07:34:44PM -0700, Hiu wrote: > hi Paul, > > > I am pretty to code the puppet codes. I try the options that you suggested > about creating the define type. But, I am still stuck in the middle. > > Here is my code. > $pub_keys=['XX', 'Y', 'ZZ' ] > > define add

Re: [Puppet Users] Re: [Puppet-dev] Do you rely on 'param=>undef' being equal to '(nothing)'?

2012-09-18 Thread Stefan Schulte
On Tue, Sep 18, 2012 at 05:27:07PM -0700, Eric Sorenson wrote: > On Friday, September 14, 2012 3:36:20 PM UTC-7, Stefan Schulte wrote: > > > > > > I use this a lot to be able to have an optional parameter in a parent > > class that is passed to an included c

Re: [Puppet Users] Complex custom type?

2012-09-16 Thread Stefan Schulte
On Fri, Sep 14, 2012 at 06:37:28PM +0200, Jakov Sosic wrote: > Hi. > > I've successfully written and tested three puppet custom types for > managing cobbler so far (distro, repo and profile). So far it has been > interesting week, learning ruby from zero, learning custom types etc. > But I'm reall

Re: [Puppet Users] Automatic require in custom type?

2012-09-16 Thread Stefan Schulte
On Fri, Sep 14, 2012 at 03:49:56PM +0200, Jakov Sosic wrote: > Hi. > > I have 3 custom types, for example A, B, and C. > > A and B are build blocks for C. So if there is no A or B, C will fail to > be added. For example: > > > typeA { 'A': > ... > ... > } > > > typeB { 'B': > ... > ... >

[Puppet Users] Re: [Puppet-dev] Do you rely on 'param=>undef' being equal to '(nothing)'?

2012-09-14 Thread Stefan Schulte
On Fri, Sep 14, 2012 at 11:31:08AM -0700, Eric Sorenson wrote: > Hi, there's an issue that came up recently in the 3.0RCs -- Big thanks to > Erik Dalén for reporting it in #16221 -- that involves a behaviour change to > part of the DSL. In a nutshell, this code: > [..]> > class toplevel ( >

Re: [Puppet Users] Puppet smoking crack?

2012-09-06 Thread Stefan Schulte
On Wed, Sep 05, 2012 at 03:01:42PM -0700, Douglas Garstang wrote: > On Wed, Sep 5, 2012 at 2:23 PM, Christopher Wood > wrote: > > (inline) > > > > On Wed, Sep 05, 2012 at 02:04:59PM -0700, Douglas Garstang wrote: > >> Couple of questions. Firstly, what's the plugin error about? > >> > >> puppet ag

Re: [Puppet Users] Package install from a URL

2012-09-03 Thread Stefan Schulte
On Mon, Sep 03, 2012 at 05:26:30AM -0700, matonb wrote: > puppet-server 2.7.19 on CentOS 6.3 x64 > > I have the follow very bsaic class, which I would expect to install the > package if it's not already present on the system: > > class yum::repos::puppetlabs { > package { 'puppetlabs-releas

Re: [Puppet Users] Pass array to a define

2012-08-14 Thread Stefan Schulte
On Tue, Aug 14, 2012 at 02:23:37PM -0700, Douglas Garstang wrote: > Yeah, well I tried the puppet labs lvm module. After I fixed the > syntax errors, which included a missing '}' in the code (wtf!??!), it > seems that custom types don't work with environments... > > http://projects.puppetlabs.com/

Re: [Puppet Users] getting output from command in custom provider

2012-08-13 Thread Stefan Schulte
On Mon, Aug 13, 2012 at 11:55:23AM -0700, ZJE wrote: > Is the output of a command called by puppet stored somewhere on the master > or agent? > > For example, if have the statement > --- > commands :ls => "ls" > --- > > and then I try something like " ls, '/' " this does not seem right. The abo

Re: [Puppet Users] Pass array to a define

2012-08-11 Thread Stefan Schulte
On Sat, Aug 11, 2012 at 01:46:57PM -0700, James A. Peltier wrote: > - Original Message - > | On Fri, Aug 10, 2012 at 05:10:20PM -0700, Douglas Garstang wrote: > | > How can I pass an array to a define? It's not documented in the > | > puppet > | > language guide. > | > > | > I've got: > |

Re: [Puppet Users] Extending Puppet Woes

2012-08-11 Thread Stefan Schulte
On Fri, Aug 10, 2012 at 08:51:33PM -0700, Mike Carr wrote: > I am looking to extend one of the puppet modules -"mysql". I found that they > are extending Puppet with types and providers. First off I am having a > difficult time find any documentationo on this and I do not know Ruby that > well.

Re: [Puppet Users] Pass array to a define

2012-08-11 Thread Stefan Schulte
On Fri, Aug 10, 2012 at 05:10:20PM -0700, Douglas Garstang wrote: > How can I pass an array to a define? It's not documented in the puppet > language guide. > > I've got: > > define lvm::create_vg ( $pvdisks ) { > exec { > 'pvcreate': > command => "/sbin/pvcreate -yf $pvdi

Re: [Puppet Users] string matching in erb template

2012-08-04 Thread Stefan Schulte
On Sat, Aug 04, 2012 at 03:10:11AM -0700, danielt wrote: > Hi! > > I am trying to match a string in an ERB template but for what ever reason > it does not work. > > <% if has_variable?("apache2_phpmyadmin_url") && apache2_phpmyadmin_url != > "" then %> > ProxyPass /<%= apache2_phpmyadm

Re: [Puppet Users] Get extra error output when debugging custom types?

2012-07-31 Thread Stefan Schulte
On Tue, Jul 31, 2012 at 03:24:15PM -0700, ZJE wrote: > Is it possible to get extra output when running custom types? Right now, > I'm getting an error message and I'm not sure where in the code it's being > thrown from. > For example, I can see that I'm trying to iterate over a null object, but

Re: [Puppet Users] a complete solution for puppet

2012-07-25 Thread Stefan Schulte
On Wed, Jul 25, 2012 at 02:00:37PM -0700, Hai Tao wrote: > Hi, > [...] > > My question is why the designer of puppet did not consider this and > integrate everything into a complete solution at the beginning, rather > than having us have to reconfigure everything by hand. Who will use > puppet if

Re: [Puppet Users] erb question - can you "if val" in an "each do" statement?

2012-07-24 Thread Stefan Schulte
On Tue, Jul 24, 2012 at 10:47:40AM -0700, earthgecko wrote: [...] > Would still be interested to know if you can use if val in the each do > context. > [...] > On Tuesday, July 24, 2012 6:12:27 PM UTC+1, Stefan Schulte wrote: > > On Tue, Jul 24, 2012 at 08:08:30AM -0700

Re: [Puppet Users] erb question - can you "if val" in an "each do" statement?

2012-07-24 Thread Stefan Schulte
On Tue, Jul 24, 2012 at 08:08:30AM -0700, earthgecko wrote: > Quick erb question: > > Can you use a if val in an each do iteration? And if so... how :/ If > someone knows and is kind enough to shed some light. > > Trying to figure what will work and the following do NOT work. > > <% hosts.eac

Re: [Puppet Users] access facts in ENC

2012-07-24 Thread Stefan Schulte
On Mon, Jul 23, 2012 at 08:25:49PM -0400, Brian Gupta wrote: > Your ENC script can pretty much do whatever you want it to do. I'm not > exactly following what you want to do with the facts, but you could > upload them to your ENC like so: > https://github.com/theforeman/puppet-foreman/blob/master/t

Re: [Puppet Users] Puppet 2.7.18 puppetstoredconfigclean.rb

2012-07-13 Thread Stefan Schulte
On Fri, Jul 13, 2012 at 12:41:46PM -0400, Worker Bee wrote: > I downloaded the tar.gz for 2.7.18. > I noticed that ext/ puppetstoredconfigclean.rb is missing. > > Can anyone tell me where to get this script? Is it okay to use the script > from 2.7.10? > > Thanks! > The script was removed becau

Re: [Puppet Users] Re: puppet freezes on FUTEX_WAKE_PRIVATE

2012-07-13 Thread Stefan Schulte
On Fri, Jul 13, 2012 at 06:30:41AM -0700, Thomas Sturm wrote: > We have the same problem on Ubuntu 12.04 with kernel 3.2.0-24 and puppet > 2.7.11. This occurs just after "info: Retrieving plugin" and before loading > the facter facts. It occurs every 100th or 200th puppet run. Any hint much > ap

Re: [Puppet Users] Crontab overwritten by Puppet

2012-07-12 Thread Stefan Schulte
On Mon, Jul 09, 2012 at 06:48:41AM -0700, Kmbu wrote: > Hello folks.. > > I suddenly found the crontab on one of my puppet clients overwritten. It > had many entries, including one created by Puppet. Suddenly during one run > it was overwritten, keeping only the Puppet entry and removing everyth

Re: [Puppet Users] groups dependencies at user creation

2012-07-07 Thread Stefan Schulte
On Mon, Jul 02, 2012 at 12:20:40PM -0500, Tim Mooney wrote: > > How to ensure groups dependencies at user creation ?. > > If you were just talking about the user's default group, then it would > be one of the few cases where puppet establishes an ordering relation > for you automatically. In oth

Re: [Puppet Users] Re: How do I "cd" (change directory) with Puppet's exec?

2012-07-07 Thread Stefan Schulte
On Fri, Jul 06, 2012 at 08:44:51AM -0700, jcbollinger wrote: > > > On Friday, July 6, 2012 2:10:13 AM UTC-5, Hendrik Jäger wrote: > > > > [...] let a shell > > execute your command [...] > > > > Which you can do fairly easily by adding "provider => 'sh'" to your Exec's > parameters. > > Or if

Re: [Puppet Users] hash to_yaml in erb template not giving valid yaml

2012-07-05 Thread Stefan Schulte
On Thu, Jul 05, 2012 at 05:43:10PM +0200, Martin Willemsma wrote: > Hi, > > I want to use a file resource to write a facts.yaml file for > Mcollective. For some reason it won't provide a valid yaml format if I > dump my scope to hash and convert to_yaml. > > file { > "/etc/mco

Re: [Puppet Users] Base directory with File

2012-06-26 Thread Stefan Schulte
On Mon, Jun 25, 2012 at 10:27:40AM -0700, Mark Roggenkamp wrote: > Hi all, > > I'd like to specify a base_directory and a list of directories (as > variables that may be pulled via hiera later) that will be created under > that base directory. > > base_dir = "/home/base" > bars = ["a", "b", "c"

Re: [Puppet Users] Puppet commands require root access

2012-06-26 Thread Stefan Schulte
On Mon, Jun 25, 2012 at 05:46:39PM -0400, Worker Bee wrote: > Hi Everyone; > > Why does running "puppet resource" require root/sudo access? Is it > supposed to be this way or do I have a permissions issue? > I installed using the gzip files... > > Thanks! > puppet resource doesnt necessarily r

Re: [Puppet Users] Help with bind option for mount

2012-06-22 Thread Stefan Schulte
On Fri, Jun 22, 2012 at 05:57:21AM -0700, cnjohnson wrote: > This is my first foray into using puppet for creating and maintaining bind > mounts (see man 8 mount). I am unsure of how to describe the state I want > puppet to achieve. This is for creating files systems in a chroot jail. I > am pri

[Puppet Users] Gentoo package provider

2012-06-21 Thread Stefan Schulte
Hi, I recently looked at the gentoo package provider and I think it has a few problems and I'm interested in how gentoo people tackle these problems: 1) The package provider puts a dependency on eix. While chances are good that eix is installed it is not part of the base system (AFAIK). Pu

Re: [Puppet Users] Puppet and Ruby 1.9

2012-06-18 Thread Stefan Schulte
On Mon, Jun 18, 2012 at 10:02:10PM +0300, Ohad Levy wrote: > On Mon, Jun 18, 2012 at 9:32 PM, Forrie wrote: > > > What is the status of compatibility with Puppet 2.7.16+ and Ruby > > 1.9? I searched through this group and found some older posts. I am > > not certain what the core issues are (a

Re: [Puppet Users] Re: Puppet not applying my config

2012-05-26 Thread Stefan Schulte
On Fri, May 25, 2012 at 05:59:01AM -0700, jcbollinger wrote: > > > On May 24, 7:42 pm, Peter Bukowinski wrote: > > On May 24, 2012, at 8:05 PM, macmichael01 wrote: > > > > Here is the configuration that I am trying to apply: > > > > > /etc/puppet/manifests/site.pp > > > node default { > > >  

Re: [Puppet Users] Custom type, autoinclude

2012-05-21 Thread Stefan Schulte
On Sun, May 20, 2012 at 01:17:57PM +0200, Markus Falb wrote: > Hi, > I was thinking about a conceptual thing and I will try to explain with a > concrete example. > > In the puppetlabs-lvm module > there is code like this in the logical_volume provider > > if mount( '-f', '--guess-fstype', path) =

Re: [Puppet Users] odd behaviour on file ensure => absent

2012-05-19 Thread Stefan Schulte
On Tue, May 15, 2012 at 01:05:03PM -0400, Christopher Wood wrote: > Here's my test (done on Debian Stable with puppet 2.7.13 from the puppetlabs > apt repository): > > > $ cat /tmp/t1.pp > file { '/tmp/xx/yy/zz/1': > ensure => absent, > } > $ ls /tmp/xx > ls: cannot access /tmp/xx: No such fi

Re: [Puppet Users] Migrate installation to different directory

2012-04-19 Thread Stefan Schulte
On Thu, Apr 19, 2012 at 03:56:37PM -0400, JA wrote: > Hi Everyone; > > I want puppet to be installed in /app/puppet instead of the default /etc. > I cannot figure out how to get the puppetmasterd to look for the > config file (puppet.conf) in /app/puppet instead of /etc/puppet. > > If anyone can

Re: [Puppet Users] ssh_authorized_keys fails if a line is empty

2012-04-19 Thread Stefan Schulte
On Thu, Apr 19, 2012 at 07:20:10AM -0700, Maurice Meeden wrote: > Hi group, > > we want to manage our authorized_keys with puppet and are trying > ssh_authorized_keys. Everything works as expected, but if ~/.ssh/ > authorized_keys contains en empty line, puppet raises an error and > generate a com

Re: [Puppet Users] Ordering issues: Stages?

2012-03-07 Thread Stefan Schulte
On Wed, Mar 07, 2012 at 08:15:54AM -0800, Nan Liu wrote: > On Wed, Mar 7, 2012 at 4:20 AM, Stefan Schulte > wrote: > > Hi, > > > > I have the following basic node definition > > > >    node 'mynode' { > >      class { 'o

  1   2   3   >