This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb | |
index 37ace21..33771d5 100644 | |
--- a/lib/puppet/network/xmlrpc/client.rb | |
+++ b/lib/puppet/network/xmlrpc/client.rb | |
@@ -39,6 +39,10 @@ module Puppet::Network | |
Puppet.debug "Calling %s.%s" % [namespace, method] | |
begin | |
result = call("%s.%s" % [namespace, method.to_s],*args) | |
+ if http.started? | |
+ Puppet.err "HTTP instance still open after call to %s.%s" % [namespace, method] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'puppet' | |
report = YAML.load_file("/var/puppet/reports/culain.madstop.com/200706241922.yaml") | |
report.metrics.each do |name, metric| | |
metric.values.each do |value_name, value_label, value| | |
puts "%s: %s => %s" % [name, value_label, value] | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/puppet/modules/tomcat6. | |
manifests | |
init.pp | |
templates | |
log4j_properties.erb | |
# log4j_properties.erb contains | |
log4j.logger.org.apache.commons.httpclient = <%= loglevel_default %> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/puppet/modules/tomcat/manifests | |
class tomcat6 { | |
# define your resource type | |
define configuration($loglevel_default = 'DEBUG', $loglevel_httpclientapache = 'DEBUG', $loglevel_httpclientwire = 'DEBUG', $loglevel_sportex = 'DEBUG', $loglevel_lus = 'DEBUG', $loglevel_apache = 'DEBUG', $loglevel_springframework = 'DEBUG', $loglevel_quartz = 'DEBUG', $loglevel_apachecxf = 'DEBUG') { | |
file { "/etc/tomcat6/log4j.properties": content => template("tomcat6/log4j_properties.erb") } | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Users/luke/puppet/lib/puppet/util/settings.rb:62:in `optparse_addargs': undefined method `args=' for Puppet:Module (NoMethodError) | |
from /Users/luke/puppet/lib/puppet/application.rb:251:in `parse_options' | |
from /Users/luke/puppet/lib/puppet/application.rb:214:in `run' | |
from bin/puppetmasterd:66 | |
------------- | |
The fix is: | |
diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define cronallow($members) { | |
file { $name: content => template("..."), ensure => present, ... } | |
} | |
class base { | |
cronallow { "/etc/cron.allow": members => root } | |
} | |
class sub inherits base { | |
Cronallow["/etc/cron.allow"] { members +> [postgres, whatever] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class filesystems { | |
file { "/etc/exports.d": | |
ensure => directory, | |
purge => true, | |
notify => Exec[rebuild-exports] | |
} | |
exec { rebuild-exports: | |
command => "/bin/cat /etc/exports.d/* > /etc/exports", | |
refreshonly => true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby -w | |
require 'getoptlong' | |
class FileBucket | |
def sum | |
require 'digest/sha1' | |
raise "Must specify file" unless file = ARGV.shift |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class One | |
attr_reader :two | |
def two=(two) | |
@two = two | |
two.one = self | |
end | |
end | |
class Two |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/puppet/resource/catalog.rb b/lib/puppet/resource/catalog.rb | |
index 88aa951..cb0ce03 100644 | |
--- a/lib/puppet/resource/catalog.rb | |
+++ b/lib/puppet/resource/catalog.rb | |
@@ -416,6 +416,20 @@ class Puppet::Resource::Catalog < Puppet::SimpleGraph | |
super | |
end | |
+ def to_yaml_properties | |
+ result = instance_variables |
OlderNewer