Re: [Puppet Users] time issue with puppet

2011-12-14 Thread Daniel Pittman
On Wed, Dec 14, 2011 at 16:00, Corey Osman wrote: > I have the following manifest that basically syncs the time for nodes really > out of sync and ntpd can't drift the time back fast enough. > > The problem is that when puppet executes the catalog,  and puppet changes the > time, puppet never f

[Puppet Users] time issue with puppet

2011-12-14 Thread Corey Osman
Hi, I have the following manifest that basically syncs the time for nodes really out of sync and ntpd can't drift the time back fast enough. The problem is that when puppet executes the catalog, and puppet changes the time, puppet never finishes because it can't calculate the "run time" since

[Puppet Users] Re: lookup $confdir within a function

2011-12-14 Thread nothings_absolute
Should have looked at this more closely before posting... :) Obvious Answer after looking at the code: confdir = Puppet.settings.value('confdir') On Dec 14, 4:12 pm, nothings_absolute wrote: > I will try to make this short... I need to determine what the absolute > path is to the module

[Puppet Users] lookup $confdir within a function

2011-12-14 Thread nothings_absolute
I will try to make this short... I need to determine what the absolute path is to the module base directory from within a function. So far I have found that I can use the following to get part of it: env = lookupvar('environment').to_sym env_path = Puppet.settings.instance_variable_get

Re: [Puppet Users] restarting "service" when configuration changes

2011-12-14 Thread Jo Rhett
Try notify => Service['autofs'] On Dec 14, 2011, at 5:35 AM, Sans wrote: > I know it has been discussed several time and "notify" is the "magic > word" to use here but it's not working here; my case is a bit > different. This is what I have: > > **

[Puppet Users] Re: new user: need Conditional statement example within a file resource type

2011-12-14 Thread jcbollinger
On Dec 13, 12:31 pm, Kenneth Lo wrote: > Searching old archive I find this topic: > > http://groups.google.com/group/puppet-users/browse_thread/thread/187e... > > I understand that  "case statements must be outside of resource > statements" per that discussion and I understand the usage for the

[Puppet Users] Re: [Puppet-dev] Puppet integration with SecretServer (Thycotic)

2011-12-14 Thread Daniel Pittman
On Mon, Dec 12, 2011 at 18:47, Steve Shipway wrote: G'day Steve. > I've done some more development on my Puppet module that handles password > integration with Secret Server from Thycotic, and now it handles > certificates as well. That is pretty darn awesome - lots of people out there want som

Re: [Puppet Users] restarting "service" when configuration changes

2011-12-14 Thread Bekir Dogan
You should see the refreshonly parameter in exec resource type from http://docs.puppetlabs.com/references/stable/type.html#exec There is also an example with subscribe (instead of notify) which i think you can solve your problem using that example. bekir On Wed, Dec 14, 2011 at 15:35, Sans wrot

[Puppet Users] Ruby error when running puppet agent on host

2011-12-14 Thread Richard Olofsson
Hi. We have started to receive some strange errors when running puppet agent on some hosts in our datacenter. We have about 500 clients and there are about 30 that gives us this error: /usr/lib/ruby/site_ruby/1.8/puppet/application/agent.rb:53:in `handle_serve': uninitialized constant Puppet::Ne

[Puppet Users] Re: Puppet Dashboard or Forman on SLES?

2011-12-14 Thread Benjamin
Hi, thx this package could be installed on SLES. I tried to use this guide http://docs.puppetlabs.com/guides/installing_dashboard.html Setup a MySQL database server, create a user and database for use with the Dashboard by either: 1. Using a rake task to create just the database from s

Re: [Puppet Users] Re: new user: need Conditional statement example within a file resource type

2011-12-14 Thread Stefan Heijmans
It's to be future proof, you can read about @ http://docs.puppetlabs.com/guides/scope_and_puppet.html Stefan -- 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-use

Re: [Puppet Users] Re: new user: need Conditional statement example within a file resource type

2011-12-14 Thread Kenneth Lo
right, the reason I did not opt for this syntax is because my file resource is actually quite large, and I think the other method Stefan suggested has better readability. On Wed, Dec 14, 2011 at 7:34 AM, Felix Frank wrote: > This should also work: > > file { "somefile": source => ..., owner => .

Re: [Puppet Users] Re: new user: need Conditional statement example within a file resource type

2011-12-14 Thread Kenneth Lo
This works. thx! Another rookie question, what is the :: in front of the variable name signify in general? --KL On Tue, Dec 13, 2011 at 3:37 PM, Stefan Heijmans wrote: > How about something like; > > > $hasfile = true > if $::hasfile { >    $fileensure = 'present' > } > else { >    $fileensure

Re: [Puppet Users] Is it possible to chain events from an Exec?

2011-12-14 Thread Martin Alfke
Hi Edd, On 14.12.2011, at 13:27, Edd Grant wrote: > Hi Martin, > > I have swapped all the subscribes out for requires as per your > suggestion but copy_archive_$name still runs every time. Any ideas? The exec check_unpacked_archive_exists_$name is parsed and validated on every run. I see two

Re: [Puppet Users] Is it possible to chain events from an Exec?

2011-12-14 Thread Felix Frank
On 12/14/2011 11:16 AM, Martin Alfke wrote: > Here you subscribe to the exec resource. > Exec resource will get parsed but the command will not run > What you want is > require => Exec[...] No. Subscribe creates a notification for the subscribing resource if the subscribed resource needs a change

[Puppet Users] Re: User management

2011-12-14 Thread jcbollinger
On Dec 14, 1:09 am, Marek Dohojda wrote: > I am wondering what would be a good way of managing users.  I need to add > user to some host and ensure that they are absent on another box.  so for > instance, I want Bob to be present on server A but absent on server B.  as > far as I know, you ca

[Puppet Users] restarting "service" when configuration changes

2011-12-14 Thread Sans
I know it has been discussed several time and "notify" is the "magic word" to use here but it's not working here; my case is a bit different. This is what I have: *** define line_check($fname, $line, $bool = 'false') { exec { "/bin/e

Re: [Puppet Users] Using an array to manage a string of directories that need to be managed

2011-12-14 Thread Felix Frank
Hi, On 12/13/2011 11:25 PM, Forrie wrote: > I thought I could just create a simple array and then use a file {} > statement to ensure they are created. Seems simple enough. Some > don't feel that's the most efficient way. > > Since I'm going to be using autofs to ensure the mounts exist, I > s

Re: [Puppet Users] Re: new user: need Conditional statement example within a file resource type

2011-12-14 Thread Felix Frank
This should also work: file { "somefile": source => ..., owner => ... } if $::hasfile { File["somefile"] { ensure => present } } else { File["somefile"] { ensure => absent } } It's up to you to decide which is more obscure. Cheers, Felix -- You received this message because you are subscr

Re: [Puppet Users] uppet and ruby 1.9

2011-12-14 Thread Peter Meier
Are there still any known issues with puppet and ruby 1.9? Or 1.8.7 is still the preferred version to use with puppet? latest 2.7 is imho fully supported by 1.9 ~pete -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send

[Puppet Users] Re: Is it possible to chain events from an Exec?

2011-12-14 Thread Edd Grant
Hi Martin, I have swapped all the subscribes out for requires as per your suggestion but copy_archive_$name still runs every time. Any ideas? Code below: define archive::unpack($archiveName, $appName, $archiveDir, $targetDir,

Re: [Puppet Users] Re: Is it possible to chain events from an Exec?

2011-12-14 Thread Martin Alfke
Edd, On 14.12.2011, at 11:54, Edd Grant wrote: > Martin, > > r.e. your comment: "The command will only get executed in case that > $targeDir/$appName does not exists. The command will always return > 0 !!" can I ask what you were referring to here? was it the exec > "check_unpacked_archive_exist

[Puppet Users] Re: Is it possible to chain events from an Exec?

2011-12-14 Thread Edd Grant
Martin, r.e. your comment: "The command will only get executed in case that $targeDir/$appName does not exists. The command will always return 0 !!" can I ask what you were referring to here? was it the exec "check_unpacked_archive_exists_$name"? I tested the statement in the onlyif and that defin

[Puppet Users] Re: Is it possible to chain events from an Exec?

2011-12-14 Thread Edd Grant
Wow - thanks for the super quick reply Martin. Will try out your suggestions. Cheers, Edd On Dec 14, 10:16 am, Martin Alfke wrote: > Hi, > > my answer is inline.. > > On 14.12.2011, at 11:09, Edd Grant wrote: > > > > > > > > > > > Hi All, > > > I'm trying to write a module which unpacks an arch

Re: [Puppet Users] Is it possible to chain events from an Exec?

2011-12-14 Thread Martin Alfke
Hi, my answer is inline.. On 14.12.2011, at 11:09, Edd Grant wrote: > Hi All, > > I'm trying to write a module which unpacks an archive to a specified > location, the idea is as follows: > > Let's say I'm trying to deploy an archive of grails-1.3.7 > Check that a directory exists at $targetDi

[Puppet Users] Is it possible to chain events from an Exec?

2011-12-14 Thread Edd Grant
Hi All, I'm trying to write a module which unpacks an archive to a specified location, the idea is as follows: Let's say I'm trying to deploy an archive of grails-1.3.7 1. Check that a directory exists at $targetDir/grails-1.3.7 2. If it does, do nothing 3. If it doesn't then do the fol

Re: [Puppet Users] User management

2011-12-14 Thread Richard Clark
On 14 Dec 2011, at 07:10, Marek Dohojda wrote: > I am wondering what would be a good way of managing users. I need to add > user to some host and ensure that they are absent on another box. so for > instance, I want Bob to be present on server A but absent on server B. as > far as I know, y