[Puppet Users] Re: Inheritance syntax question

2008-10-09 Thread Peter Meier

Hi

>>>   Foo::bar["default"] {
>>> [...]
>>> The only way I can get this syntax to work is to move the 'bar'
>>> definition outside of the foo class and refer to it by a name without
>>> '::' in it in foo2.  Is there a way to override a definition with '::'
>>> in its name?
>> it's Foo::Bar["default"] {
> 
> Let me just mention that this use of capitalization is *so totally
> bizarre*.  And not really explained anywhere; what does it mean, why
> is it there at all?


capitalization is refering to an already defined object/resource (so to
an "instance" of foo::bar) in an inheritance chain. for me it totally
makes sense to divide between overwriting and actually defining resources.

greets pete

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Include class/* picks up backup files

2008-10-09 Thread Peter Meier

Hi

>>> All the examples show just "include class/*", so I was using that
>>> until I started getting errors.
>> I'm curious which examples these are.  Best practice is usually to let 
>> autoloading take care of loading class pp files.  I was just curious if 
>> there was an example on the Wiki that we hadn't updated or might want to 
>> revisit.
> 
> One of them is http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#id35
> -- the basic example of "import" in the language tutorial.  I think
> that's where I picked it up.

updated.

btw: it's a wiki ;)

greets pete

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: puppetmaster crash after upgrade to 0.24.5

2008-10-09 Thread Peter Meier

Hi

> I assume this means that the YAML object is corrupted somehow, but
> really not sure what else to look for to track that down yet.  Or, do I
> need to find a newer version of ruby?  The RPM on the server is
> ruby-1.8.1-7.el4_6.1.  Better to run on CentOS 5 with
> ruby-1.8.5-5.el5_2.3.i386.rpm?  Or manually build a newer ruby RPM ala
> http://sipx-wiki.calivia.com/index.php/Building_ruby-1.8.4_and_ruby-gems?


i'm using the http://rubyworks.rubyforge.org/ rpm's without any problem.
however only on centos 5.

greets pete

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Ruby Openssl failure on Solaris 9

2008-10-09 Thread Silflay Hraka
Ok, so.

# ruby -ropenssl -e 'puts :yep'
/opt/csw/lib/ruby/1.8/sparc-solaris2.8/openssl.so: ld.so.1: ruby: fatal:
libssl.so.0.9.8: open failed: No such file or directory -
/opt/csw/lib/ruby/1.8/sparc-solaris2.8/openssl.so (LoadError)
from /opt/csw/lib/ruby/1.8/openssl.rb:17

Looking in the directory for libssl.so

# ls -ltr | grep libssl.so
-r-xr-xr-x   1 root bin   296192 Jul 30  2003
libssl.so.0.9.6.20080403133932.4750
-r-xr-xr-x   1 root bin   296192 Jul 30  2003
libssl.so.0.9.6.20070322214123.2103
-r-xr-xr-x   1 root bin   335244 Jun  2  2005
libssl.so.0.9.7.20070322214123.2103
-r-xr-xr-x   1 root bin   385876 Nov  2  2005
libssl.so.0.9.8.20070322214123.2103
lrwxrwxrwx   1 root root  15 Mar 22  2007 libssl.so ->
libssl.so.0.9.8
-r-xr-xr-x   1 root bin   354596 Dec 26  2007
libssl.so.0.9.8.20080403133932.4750
-r-xr-xr-x   1 root bin   274956 Dec 26  2007
libssl.so.0.9.7.20080403133932.4750

I've got other Sol 5.9 servers where libssl.so.0.9.8 exists, and it's the
same size as the libssl.so.0.9.8.2008* file. Looks like something the
previous admin did--what I have no idea.  Copying it to libssl.so.0.9.8
seems to work--I'll just have to monitor the box to see if anything else is
affected.


Thanks, Luke.

On Thu, Oct 2, 2008 at 12:22 PM, Luke Kanies <[EMAIL PROTECTED]> wrote:

>
> On Oct 1, 2008, at 3:09 PM, Silflay Hraka wrote:
>
> > Anyone seen this error before when trying to start a blastwave-
> > installed puppet on a Solaris 9 server?
> >
> >  # puppetd --server ppserv.net.unc.edu --waitforcert 60 --test
> > /opt/csw/lib/ruby/site_ruby/1.8/puppet/sslcertificates.rb:8: You
> > must have the Ruby openssl library installed (Puppet::Error)
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/
> > client.rb:1:in `require'
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/xmlrpc/
> > client.rb:1
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/
> > client.rb:5:in `require'
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/network/
> > client.rb:5
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type/
> > pfilebucket.rb:2:in `require'
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type/
> > pfilebucket.rb:2
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type.rb:392:in
> > `require'
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet/type.rb:392
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet.rb:423:in
> > `require'
> > from /opt/csw/lib/ruby/site_ruby/1.8/puppet.rb:423
> > from /opt/csw/bin/puppetd:158:in `require'
> > from /opt/csw/bin/puppetd:158
> >
> > Ruby is installed;
> >
> > # pkg-get upgrade ruby
> > WARNING: gpg not found
> > No worries... you already have version 1.8.6,REV=2007.10.03_p110 of
> > ruby
> > If you doubt this message, run 'pkg-get -U', then run
> >  'pkg-get upgrade ruby'
>
>
> But not ruby's openssl library:
>
> ruby -ropenssl -e 'puts :yep'
>
> --
> I believe that if it were left to artists to choose their own labels,
> most would choose none. -- Ben Shahn
> -
> Luke Kanies | http://reductivelabs.com | http://madstop.com
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Puppet Augeas Plugin

2008-10-09 Thread Joel Nimety
resending, not sure the original made it to the mailing list.

Bryan -- I'm using the puppet augeas plugin at
http://git.et.redhat.com/?p=ace.git;a=blob;f=modules/augeas/plugins/puppet/type/augeas.rb;h=2346c37d724d7607ed4e09b0413700bec2b7cbed;hb=HEAD

I'm running into a behavior that I wouldn't expect.  I'd like to confirm
an entry in sysctl.conf by changing the value if necessary or appending
the key/value if it doesn't exist in the file.  This seems like a common
scenario.  However, the following example does not add
net.ipv4.tcp_max_syn_backlog if it doesn't already exist in sysctl.conf.

class sysctl {

 file { "sysctl_conf":
name => $operatingsystem ? {
  default => "/etc/sysctl.conf"
},
  }

 config { "net.ipv4.tcp_max_syn_backlog": ensure =>  4096 }

 exec { "sysctl -p":
alias => "sysctl",
refreshonly => true,
subscribe => File["sysctl_conf"],
 }

}

define sysctl::config ($ensure) {
   augeas { "sysctl_conf_$name":
   notify => Exec["sysctl"],
   context => "/files/etc/sysctl.conf",
   changes => "set $name $ensure",
   onlyif  => "get $name != $ensure"
   }
}


poking around in augeas.rb I noticed that "onlyif" is only processed if
the result is not nil.  Is this intended behavior?  I propose that if
the return value is nil it should be treated as an empty string so
comparisons can still happen, I've attached a patch if this suits you.


--
Joel Nimety
Perimeter eSecurity
Product Architect, Email Defense
203.541.3416
[EMAIL PROTECTED]
http://www.perimeterusa.com





--
 The sender of this email subscribes to Perimeter eSecurity's email
 anti-virus service. This email has been scanned for malicious code and is
 believed to be virus free. For more information on email security please
 visit: http://www.perimeterusa.com/email-defense-content.html
 This communication is confidential, intended only for the named recipient(s)
 above and may contain trade secrets or other information that is exempt from
 disclosure under applicable law. Any use, dissemination, distribution or
 copying of this communication by anyone other than the named recipient(s) is
 strictly prohibited. If you have received this communication in error, please
 delete the email and immediately notify our Command Center at 203-541-3444.

 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---

--- augeas.rb.old   2008-10-08 14:33:55.0 -0400
+++ augeas.rb   2008-10-08 14:37:16.0 -0400
@@ -180,7 +180,7 @@
 
 #check the value in augeas
 aug = open_augeas() 
-result = aug.get(path)
+result = aug.get(path) || ''
 unless result.nil?
case comparator
when "!=":
@@ -208,7 +208,7 @@
 
 #Get the values from augeas
 aug = open_augeas()
-result = aug.match(path)
+result = aug.match(path) || ''
   
 # Now do the work
 if (!result.nil?)


[Puppet Users] Puppet Augeas Plugin

2008-10-09 Thread Joel Nimety
Bryan -- I'm using the puppet augeas plugin at
http://git.et.redhat.com/?p=ace.git;a=blob;f=modules/augeas/plugins/puppet/type/augeas.rb;h=2346c37d724d7607ed4e09b0413700bec2b7cbed;hb=HEAD

I'm running into a behavior that I wouldn't expect.  I'd like to confirm
an entry in sysctl.conf by changing the value if necessary or appending
the key/value if it doesn't exist in the file.  This seems like a common
scenario.  However, the following example does not add
net.ipv4.tcp_max_syn_backlog if it doesn't already exist in sysctl.conf.

class sysctl {

 file { "sysctl_conf":
name => $operatingsystem ? {
  default => "/etc/sysctl.conf"
},
  }

 config { "net.ipv4.tcp_max_syn_backlog": ensure =>  4096 }

 exec { "sysctl -p":
alias => "sysctl",
refreshonly => true,
subscribe => File["sysctl_conf"],
 }

}

define sysctl::config ($ensure) {
   augeas { "sysctl_conf_$name":
   notify => Exec["sysctl"],
   context => "/files/etc/sysctl.conf",
   changes => "set $name $ensure",
   onlyif  => "get $name != $ensure"
   }
}


poking around in augeas.rb I noticed that "onlyif" is only processed if
the result is not nil.  Is this intended behavior?  I propose that if
the return value is nil it should be treated as an empty string so
comparisons can still happen, I've attached a patch if this suits you.


-- 
Joel Nimety
Perimeter eSecurity
Product Architect, Email Defense
203.541.3416
[EMAIL PROTECTED]
http://www.perimeterusa.com




--
 The sender of this email subscribes to Perimeter eSecurity's email
 anti-virus service. This email has been scanned for malicious code and is
 believed to be virus free. For more information on email security please
 visit: http://www.perimeterusa.com/email-defense-content.html
 This communication is confidential, intended only for the named recipient(s)
 above and may contain trade secrets or other information that is exempt from
 disclosure under applicable law. Any use, dissemination, distribution or
 copying of this communication by anyone other than the named recipient(s) is
 strictly prohibited. If you have received this communication in error, please
 delete the email and immediately notify our Command Center at 203-541-3444.

 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---

--- augeas.rb.old   2008-10-08 14:33:55.0 -0400
+++ augeas.rb   2008-10-08 14:37:16.0 -0400
@@ -180,7 +180,7 @@
 
 #check the value in augeas
 aug = open_augeas() 
-result = aug.get(path)
+result = aug.get(path) || ''
 unless result.nil?
case comparator
when "!=":
@@ -208,7 +208,7 @@
 
 #Get the values from augeas
 aug = open_augeas()
-result = aug.match(path)
+result = aug.match(path) || ''
   
 # Now do the work
 if (!result.nil?)


[Puppet Users] Re: Puppet Augeas Plugin

2008-10-09 Thread Bryan Kearney

Joel Nimety wrote:
> resending, not sure the original made it to the mailing list.
> 
> Bryan -- I'm using the puppet augeas plugin at
> http://git.et.redhat.com/?p=ace.git;a=blob;f=modules/augeas/plugins/puppet/type/augeas.rb;h=2346c37d724d7607ed4e09b0413700bec2b7cbed;hb=HEAD
> 
> I'm running into a behavior that I wouldn't expect.  I'd like to confirm
> an entry in sysctl.conf by changing the value if necessary or appending
> the key/value if it doesn't exist in the file.  This seems like a common
> scenario.  However, the following example does not add
> net.ipv4.tcp_max_syn_backlog if it doesn't already exist in sysctl.conf.
> 


Thank you. I have applied this patch. Please let me know if it works for 
you.

http://git.et.redhat.com/?p=ace.git;a=commit;h=8c4420ba7c732d039ce6a37fd347437b0a0492a0

-- bk



--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Puppet 0.24.6rc1

2008-10-09 Thread Luke Kanies

Hi all,

We've got a release candidate for you all:

http://reductivelabs.com/downloads/puppet/puppet-0.24.6rc1.tgz

James apparently has a full release email ready, but apparently he's  
mortal and had to sleep.

It's a big release, especially with all the great language work Brice  
just did.

Here's the changelog:

 Fixed #1639 - uninitialized constant  
Puppet::Type::User::ProviderUseradd

 Fixed #1637 - With an inexistant (global) templatedir, modules
 can't access their templates

 Fixed #1202 - Collection attribute matching doesn't parse arrays

 Fixed #1473 - Puppetd stops with error after puppetmasterd
 is unavailable

 Fixed #1354 - yum provider problems with RHEL 3

 Fixed #1633 - Added support for --detailed-exits to bin/puppet

 Fixed #381 - Allow Allow multiple overrides in one statement

 Fixing #947 - pluginsync no longer fails poorly when no plugins  
exist

 Fixed #981 - Removed 'Adding aliases' info message

 Fixing #1089 - Log messages are now tagged with the log level,
 making it easier to match messages in the 'tagmail' report.

 Fixing #1098 - Multiline strings now correctly increment the line  
count

 Fixing #1614 - Environments no longer have to be listed out

 Fixed #1628 - Changed node search to use certname rather than  
Facter
 hostname

 Fixed #1613 - The client environment will be substituted when  
looking
 up settings.

 Updated puppet binary documentation

 Feature #1624 - Added RBAC roles to solaris user provider

 Fixed #1586 - Specifying "fully qualified" package names in Gentoo

 Fixed #1620 - Add 'sles' to Puppet confines when 'suse' is used

 Fixed #1585 - Allow complex 'if' and variable expressions

 Fixed #1564 - Saving File#checksum to state.yaml broken

 Fixed #1603 - Added support for running Puppet inside a Rack  
application
 (mod_rails) with Passenger and Apache

 Fixed #1596 - Deploying file resources with ++ generates error

 Modified the group and zone resource types to no longer call
 'currentpropvalues' as a means of setting all values to absent.
 There should be no behaviour change from this change.

 Modified the behaviour of resource-level 'retrieve' -- it only
 calls 'retrieve' on each property if the resource exists.

 Fixed #1622 - Users and their groups should again add in one  
transaction

 Fixed #791 - You should now be able to create and find a user/ 
group in one transaction.

 Fixed #1610 - Raise "Filebucketed" messages to Notice priority

 FIxed #1530 - ssh_authorized_keys provider does not crash anymore  
on SSH type 1 keys

 Added a number of confines to package providers

 Fixed #1609 - Added confines for the Gentoo, FreeBSD and
 SMF (Solaris) service providers

 Fixed #1608 - Added ubuntu to defaultfor for apt provider

 Fixed #1607 - Added ubuntu to defaultfor for Debian service
 provider

 Fixed #1045 - Multiple metaparams all get added to resources.

 Fixed #1472 -- defined, exported resources in the current compile
 now get expanded correctly.

 Fixed #1595 - Internally, Property#retrieve is no longer called
 when no 'should' value is available for a resource.

 Fixed #1588 - Fixed puppetca --clean --all

 Fixed #1584 - Added support for appended variables

 Fixed #1554 - Added support for multiple template directories

 Fixed #1500 - puppetrun not working

 Fixed #1579 and #1580 - errors in the Puppet RPM spec file

 Fixed #1572 -- file purging now fails if remote sources do not  
exist.

 Fixed #1521 -- ldap user and password are now used with the  
default connection.

 Fixed issues with file descriptors leaking into subprocesses

 Fixed #1568 - createpackage.sh

 Fixed #1571 - Puppet::Util::binary returns incorrect results

 Fixed #1553 - Puppet and Facter cannot both install the plist  
module into two different locations

 Adjusted hpuxuseradd user provider to confine to HP-UX and fixed  
HP-UX user provider path regression

 Fixed debug messages in package type - thanks to Todd Zullinger  
for this fix

 Fixed #1566 - changed password property of the user type

 Fixed debug messages in package type

 Updated Red Hat spec file

 Fixes #1455 - Adds HP-UX support for user type

 Fixes #1551 puppetmaster.freshness xmlrpc call returns incorrect  
type

 Fixes #1554 - Fix exception for undefined hostname

 Fixed #1533 - changed permissions for man directory

 Added daemontools and runit providers for service type

 Added simple rake task for running unit tests

 Added spec Rake task

 Fixed #1526 - Fixed leak in template

 Fixed #1506 - Removed storeconfig duplicate indexes

 Fixed #1457 - case insensitive match for error

 Fixed #1488 - Moved individual functions out of functions.rb into
 lib/puppet/parser/functions directory.  Ne

[Puppet Users] Re: The puppet equivalent of mkdir -p

2008-10-09 Thread zoniguana

You also could do this by having your directory structure on your
fileserver, of src/path/my
Then file { "/home/jeff/src":
mode => 0755,
owner => jeff,
group => jeff,
ensure => directory,
recurse => true;
}

If that directory structure is to be common across multiple users, it
can save you some typing in the long run, if you set up a custom
definition so that you can substitute $name everywhere there is a
jeff...  just a thought...

On Oct 8, 1:47 pm, Teyo Tyree <[EMAIL PROTECTED]> wrote:
> Hey Jeff,
>
> Jeff wrote:
> > Hi all,
>
> > I'd like to add a several directories and I can't seem to do it with a
> > single "file" directive.
>
> You can do this with syntax, but puppet will still be explicitly
> managing each directory as a separate resource:
>
> $base = "/home/jeff"
>
> file {["$basedir", "$basedir/src", "$basedir/src/my",
> "$basedir/src/my/dir", "$basedir/src/my/dir/path" ]:  #Just pass the
> file resource an array of files.
>     mode => 0755,
>     owner => jeff,
>     group => jeff,
>     ensure => directory,
>     recurse => true
>
> }  
> > Say /home/jeff exists and I want to add /home/jeff/src/my/dir/path
>
> > I tried:
>
> > file { "/home/jeff/src/my/dir/path":
> >   path    => "/home/jeff/src/my/dir/path",
> >   mode    => 0755,
> >   owner   => jeff,
> >   group   => jeff,
> >   ensure  => directory,
> >   recurse => true,
> > }
>
> > But puppet complains the parent directory doesn't exist. How can I do
> > the equivalent of
>
> > mkdir -p /home/jeff/src/my/dir/path
>
> Puppet will implicitly order the creation of the directories, so it will
> behave like mkdir -p.  A little more typing, still explicitly managed.
>
> > TIA,
> > Jeff
>
> --
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet Augeas Plugin

2008-10-09 Thread Joel Nimety



Bryan Kearney wrote:
> Joel Nimety wrote:
> 
> 
> Thank you. I have applied this patch. Please let me know if it works for
> you.
> 
> http://git.et.redhat.com/?p=ace.git;a=commit;h=8c4420ba7c732d039ce6a37fd347437b0a0492a0
> 
> -- bk

hmmm. looks like a patch from Marc Fournier attempts to address the same
thing and I'm not sure both are necessary (and they conflict in some
cases).  I suppose it depends on what behavior is appropriate.

Marc's patch will not perform the onlyif get/match if the node doesn't
exist (when result.nil?).  My patch will still perform the get/match; my
thinking was that this would allow to test for the entry not being
present (onlyif => "Key =~ ''").

I'm not sure which approach results in a more intuitive behavior but
only one should be used. Thoughts?

> 
> 
> 
> > 
> 

-- 
Joel Nimety
Perimeter eSecurity
Product Architect, Email Defense
203.541.3416
[EMAIL PROTECTED]
http://www.perimeterusa.com



--
 The sender of this email subscribes to Perimeter eSecurity's email
 anti-virus service. This email has been scanned for malicious code and is
 believed to be virus free. For more information on email security please
 visit: http://www.perimeterusa.com/email-defense-content.html
 This communication is confidential, intended only for the named recipient(s)
 above and may contain trade secrets or other information that is exempt from
 disclosure under applicable law. Any use, dissemination, distribution or
 copying of this communication by anyone other than the named recipient(s) is
 strictly prohibited. If you have received this communication in error, please
 delete the email and immediately notify our Command Center at 203-541-3444.

 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet Augeas Plugin

2008-10-09 Thread Bryan Kearney

Joel Nimety wrote:
> 
> 
> Bryan Kearney wrote:
>> Joel Nimety wrote:
>>
>>
>> Thank you. I have applied this patch. Please let me know if it works for
>> you.
>>
>> http://git.et.redhat.com/?p=ace.git;a=commit;h=8c4420ba7c732d039ce6a37fd347437b0a0492a0
>>
>> -- bk
> 
> hmmm. looks like a patch from Marc Fournier attempts to address the same
> thing and I'm not sure both are necessary (and they conflict in some
> cases).  I suppose it depends on what behavior is appropriate.
> 
> Marc's patch will not perform the onlyif get/match if the node doesn't
> exist (when result.nil?).  My patch will still perform the get/match; my
> thinking was that this would allow to test for the entry not being
> present (onlyif => "Key =~ ''").
> 
> I'm not sure which approach results in a more intuitive behavior but
> only one should be used. Thoughts?


I put a test in there where, assuming no star wars characters exist in 
the file this should run

augeas{"test_missing_node_should_run":
 require => Augeas[test_regex_2_should_not_run],
 context => "/files/etc/sysconfig/firstboot",
 changes => "set Boss Nass",
 onlyif => "get Boss != Nass ",
}


And this should not

augeas{"test_missing_node2_should_not_run":
 require => Augeas[test_regex_2_should_not_run],
 context => "/files/etc/sysconfig/firstboot",
 changes => "set Jango Fett",
 onlyif => "get Jango == Fett ",
}


So.. we basically say run if nil != Nass and do not run if nil == Fett. 
This appears to be true. This seems logical to me. What it does not 
allow for is the setting of value X if node Y is absent. But this can be 
done with the following (again, first runs second will not)

augeas{"test_missing_node3_should_run":
 require => Augeas[test_regex_2_should_not_run],
 context => "/files/etc/sysconfig/firstboot",
 changes => "set Boba Fett",
 onlyif => "match Anakin size == 0",
}

augeas{"test_missing_node4_should_not_run":
 require => Augeas[test_regex_2_should_not_run],
 context => "/files/etc/sysconfig/firstboot",
 changes => "set Anakin Skywalker",
 onlyif => "match Boba size == 0",
}


-- bk






--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Re: Puppet Augeas Plugin

2008-10-09 Thread Bryan Kearney

Bryan Kearney wrote:
> Joel Nimety wrote:
>>
>>
>> Bryan Kearney wrote:
>>> Joel Nimety wrote:
>>>
>>>
>>> Thank you. I have applied this patch. Please let me know if it works for
>>> you.
>>>
>>> http://git.et.redhat.com/?p=ace.git;a=commit;h=8c4420ba7c732d039ce6a37fd347437b0a0492a0
>>>  
>>>
>>>
>>> -- bk
>>
>> hmmm. looks like a patch from Marc Fournier attempts to address the same
>> thing and I'm not sure both are necessary (and they conflict in some
>> cases).  I suppose it depends on what behavior is appropriate.
>>
>> Marc's patch will not perform the onlyif get/match if the node doesn't
>> exist (when result.nil?).  My patch will still perform the get/match; my
>> thinking was that this would allow to test for the entry not being
>> present (onlyif => "Key =~ ''").
>>
>> I'm not sure which approach results in a more intuitive behavior but
>> only one should be used. Thoughts?
> 
> 
> I put a test in there where, assuming no star wars characters exist in 
> the file this should run
> 
> augeas{"test_missing_node_should_run":
> require => Augeas[test_regex_2_should_not_run],
> context => "/files/etc/sysconfig/firstboot",
> changes => "set Boss Nass",
> onlyif => "get Boss != Nass ",
> }
> 
> 
> And this should not
> 
> augeas{"test_missing_node2_should_not_run":
> require => Augeas[test_regex_2_should_not_run],
> context => "/files/etc/sysconfig/firstboot",
> changes => "set Jango Fett",
> onlyif => "get Jango == Fett ",
> }
> 
> 
> So.. we basically say run if nil != Nass and do not run if nil == Fett. 
> This appears to be true. This seems logical to me. What it does not 
> allow for is the setting of value X if node Y is absent. But this can be 
> done with the following (again, first runs second will not)
> 
> augeas{"test_missing_node3_should_run":
> require => Augeas[test_regex_2_should_not_run],
> context => "/files/etc/sysconfig/firstboot",
> changes => "set Boba Fett",
> onlyif => "match Anakin size == 0",
> }
> 
> augeas{"test_missing_node4_should_not_run":
> require => Augeas[test_regex_2_should_not_run],
> context => "/files/etc/sysconfig/firstboot",
> changes => "set Anakin Skywalker",
> onlyif => "match Boba size == 0",
> }

I just noticed that the extra patch got in. I reverted it. The above 
still holds. Marc.. does the above solve your use cases?

-- bk

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Puppet 0.24.6RC1 Released!

2008-10-09 Thread James Turnbull

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi all

Puppet version 0.24.6RC1 code-named Camilla has been released and is
available for testing!

http://reductivelabs.com/downloads/puppet/puppet-0.24.6rc1.tgz

There are a number of major new features including significant new
language features.

Of particular note is:

* Support for complex if/else operations, for example if $variable ==
'value', including arithmetic operations and Boolean and/or/not
operators.  You can see full details at:

http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#if-else
and
http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#expressions

* Multiple relationships and overrides in a single statement, see:

http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#resources

* Variables expressions, for example $variable = 1 + 3, see:

http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#variable-expressions

* Appending to variables, see:

http://reductivelabs.com/trac/puppet/wiki/LanguageTutorial#appending-to-variables

* Option (--exit-codes) to present more detailed exit codes from the
puppet binary

* Support for running the Puppet server as a Passenger
(mod_rails/mod_rack) application in Apache, see:

http://reductivelabs.com/trac/puppet/wiki/UsingPassenger

* The user and package types now supports HP-UX

* The service type supports daemontools and runit

You can find the full CHANGELOG at:

http://github.com/jamtur01/puppet/tree/0.24.x/CHANGELOG

You can see all the tickets closed in release 0.24.6RC1 at:

http://projects.reductivelabs.com/versions/show/19

Please report any bugs to:

http://reductivelabs.com/redmine/

Thanks

James Turnbull

- --
Author of:
* Pulling Strings with Puppet
(http://www.amazon.com/gp/product/1590599780/)
* Pro Nagios 2.0
(http://www.amazon.com/gp/product/1590596099/)
* Hardening Linux
(http://www.amazon.com/gp/product/159059/)


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFI7neC9hTGvAxC30ARAgUKAJ0fFcfngn2rJN+DmBNtXX0CvpUWwQCdFosw
q9I8XSfljTSb2CHRooYALvE=
=7pix
-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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---



[Puppet Users] Proposed refactoring of ssh_authorized_keys

2008-10-09 Thread Ryan Steele

Hey folks,

Over the past day or so, I've been working a lot with the
ssh_authorized_keys module, but found what I believe to be several
design flaws.  I'd be interested to see if anybody else feels bound by
the same limitations and lack of support for what I believe to be
common use cases.  I've filed a refactoring ticket, which can be
viewed at http://projects.reductivelabs.com/issues/show/1644.  I'd be
interested to hear any feedback, or any other use cases which I
haven't encountered for which the community feels there should be
support.

Respectfully,
Ryan

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en
-~--~~~~--~~--~--~---