summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG211
-rwxr-xr-xext/puppetlast2
-rw-r--r--ext/vim/syntax/puppet.vim8
-rwxr-xr-xinstall.rb6
-rw-r--r--lib/puppet.rb2
-rw-r--r--lib/puppet/agent.rb4
-rw-r--r--lib/puppet/application/puppet.rb11
-rw-r--r--lib/puppet/configurer.rb32
-rw-r--r--lib/puppet/configurer/fact_handler.rb2
-rw-r--r--lib/puppet/configurer/plugin_handler.rb2
-rw-r--r--lib/puppet/defaults.rb10
-rw-r--r--lib/puppet/file_serving/mount/file.rb2
-rw-r--r--lib/puppet/indirector/facts/facter.rb2
-rw-r--r--lib/puppet/indirector/ldap.rb2
-rw-r--r--lib/puppet/network/http/handler.rb2
-rw-r--r--lib/puppet/network/http_pool.rb2
-rw-r--r--lib/puppet/network/xmlrpc/client.rb2
-rw-r--r--lib/puppet/provider/augeas/augeas.rb22
-rwxr-xr-xlib/puppet/provider/cron/crontab.rb13
-rwxr-xr-xlib/puppet/provider/package/blastwave.rb4
-rwxr-xr-xlib/puppet/provider/service/redhat.rb2
-rwxr-xr-xlib/puppet/provider/sshkey/parsed.rb10
-rw-r--r--lib/puppet/provider/user/user_role_add.rb2
-rw-r--r--lib/puppet/ssl/host.rb2
-rw-r--r--lib/puppet/type/augeas.rb1
-rwxr-xr-xlib/puppet/type/tidy.rb2
-rw-r--r--lib/puppet/util/autoload.rb8
-rw-r--r--lib/puppet/util/feature.rb2
-rw-r--r--lib/puppet/util/monkey_patches.rb1
-rw-r--r--man/man5/puppet.conf.5 (renamed from man/man8/puppet.conf.8)1474
-rw-r--r--man/man8/filebucket.872
-rw-r--r--man/man8/pi.836
-rw-r--r--man/man8/puppet.858
-rw-r--r--man/man8/puppetdoc.879
-rw-r--r--man/man8/ralsh.887
-rwxr-xr-xspec/integration/bin/puppetmasterd.rb29
-rwxr-xr-xspec/integration/defaults.rb8
-rwxr-xr-xspec/integration/indirector/certificate/rest.rb1
-rwxr-xr-xspec/integration/indirector/certificate_request/rest.rb1
-rwxr-xr-xspec/integration/indirector/certificate_revocation_list/rest.rb1
-rw-r--r--spec/integration/indirector/report/rest.rb1
-rwxr-xr-xspec/integration/indirector/rest.rb1
-rwxr-xr-xspec/unit/application/puppet.rb13
-rwxr-xr-xspec/unit/configurer.rb67
-rwxr-xr-xspec/unit/network/http_pool.rb26
-rw-r--r--spec/unit/provider/augeas/augeas.rb10
-rwxr-xr-xspec/unit/provider/cron/crontab.rb21
-rwxr-xr-xspec/unit/provider/sshkey/parsed.rb27
-rwxr-xr-xspec/unit/type/tidy.rb6
-rwxr-xr-xspec/unit/util/autoload.rb3
-rwxr-xr-xtest/executables/puppetmodule.rb55
-rw-r--r--test/lib/puppettest/support/utils.rb3
-rwxr-xr-xtest/other/transactions.rb2
-rwxr-xr-xtest/ral/providers/host/parsed.rb12
-rwxr-xr-xtest/ral/providers/sshkey/parsed.rb10
-rwxr-xr-xtest/ral/type/host.rb8
-rwxr-xr-xtest/ral/type/sshkey.rb4
-rwxr-xr-xtest/util/settings.rb10
58 files changed, 1056 insertions, 1440 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 3b1f9d0cb..717b8e943 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,30 @@
+0.25.4
+======
+0025e13 Partial reversion of patch for #3088 to fix #3104 (Exception misreported)
+bfc9e45 Updated CHANGELOG for 0.25.4rc3
+
+0.25.4rc3
+=========
+a91c476 Fix for #3088 (catching Exception also traps SystemExit)
+1a263e2 Fix for #3089 (timestamp may now be a time object, not a string)
+75634b7 Fix for #3093 (also need to be able to call pkgget_with_cat on class)
+94e269c Uncommeniting the fix for #3001
+9636b93 Updated CHANGELOG for 0.24.5rc2
+d4319a5 Minimal fix for #3001 (failing to fetch metadata on dangling symlink)
+cdcbdc7 Fixing #2914 - pre/post hooks now work for transactions
+67216aa Fix for #3075 (sshkey host_aliases ignored)
+e4462c0 Updated version and CHANGELOG for 0.25.4
+
+0.25.4rc2
+=========
+d4319a5 Minimal fix for #3001 (failing to fetch metadata on dangling symlink)
+cdcbdc7 Fixing #2914 - pre/post hooks now work for transactions
+67216aa Fix for #3075 (sshkey host_aliases ignored)
+e4462c0 Updated version and CHANGELOG for 0.25.4
+441879f Revert "Fix #2845 Cron entries using "special" parameter lose their title when changed"
+f7e1435 Updated rake task to fix gem build issue
+49013f0 Updated version and CHANGELOG for 0.25.3
+
0.25.3
======
f8c1b08 Reversion of pipe IO patch for testing on #3025
@@ -7,10 +34,6 @@ c99f394 Fix #2845 Cron entries using "special" parameter lose their title when
dd22b71 Replaced ugly gem creation task with slightly less ugly task
d0efcc6 Added tasks directory to Rakefile and gem task file lists
8a6d66e Added puppetpackages task description
-
-0.25.2
-======
-
eada68a Updated CHANGELOG for 0.25.2
6111ba8 Fix for temporary file security whole
e7d98cc Fix for #2999 (absent package handling on solaris)
@@ -19,9 +42,6 @@ cbc2ef0 Partial rollback of refinements to fix for #2994
fd631b9 Do not close stdout or stderr in execute.
f878fe8 Update Red Hat spec file for 0.25.2
4394c48 Updated CHANGELOG for 0.25.2rc3
-
-0.25.2rc3
-=========
13cbf04 ReFix 2675 ending slash in directory should get stripped off
5c6f07b Use a pipe instead of a temp file for command output.
7e64393 Additional fix for #2994 (followed symlinks do not have checksums)
@@ -174,45 +194,6 @@ b8470b8 Fix #2757 & CSR 92 (symlinks in recursively managed dirs)
eca338c Fix for #2772 (webrick test failures)
b1c57e9 Al Hoang's patch for #2781, removing obsolete when/: syntax
50e9c98 Follow-on for #2724 - Adding an external node classifier
-2f0b1e5 Updated CHANGELOG
-20e5222 Fixing #2689 - file owner warnings are reduced
-09fb3f7 Fixing #2752 - "require" loads "include"
-6846c32 Fixing some recently broken Scope tests
-0043392 Fixed typo in lib/puppet/indirector/ldap.rb
-6b254eb Fix #2753 - Do not "global allow" plugins/modules mount if some rules have been parsed
-ff3a7bc Re-fixed #2750 - Stop disabling the CRL or checking for a disabled CRL
-594c774 Revised partial fix for #2661 and related issues
-73d04c6 Bug #2534 Raise error if property appears twice
-7517572 Bug #1908 cron environment should allow empty vals
-febe707 Bug #1742 Invalid params to --color outputs 'nil'
-d383ab8 Use notice() in the versioncmp() docs
-9dff716 conf/redhat/*.init: Use -p option to killproc
-f47a70f Ticket #2665: Regexp exception on ++ in package names
-b6e4ef3 Fixed #2750 - Set :cacrl to nil instead of 'false' in puppetd
-2b57e06 Fix #2691 - Collection AR request should not include params if querying with tags
-e8bce7a Workaround #2668 - Compress facts so that the request size limit triggers less often
-e2ce790 Fixed #2737 - The zone provider needs to get acquainted with OpenSolaris
-aea1e5f Update Red Hat spec file for 0.25.1
-fbdded7 Ticket #2685 (Type error in ssh_authorized_keys)
-4d9f76a Fix for #2745 fakedata tests not working
-b4bcfe9 Fix for #2736, target doesn't work for ssh_authorized_keys
-ae528f6 Ticket #2734 PSON/JSON not serializing classes of a catalog
-f59f805 Bug #1900 Parsing of quoted $ in stdin
-6ba122f Fixing #2735 - node classes are immed. added to classlist
-bca3b70 Bundling of pure ruby json lib as "pson"
-ce46be5 Proposed alternative solution for #2664 (REGEX / DIV lexing)
-b0518c3 Fix for #2681 (duplicate resource)
-8a73082 Fix #2707 config_version fails more helpfully
-54ded1b Fixes #1719, this avoids calling the external binary *which* everytime we are looking for a binary
-4c3c279 Updated required Facter version in README
-fcce46a Fixed #2702 - Set :outputdir to "doc" if not specified
-3940dfb Fixed #2674 - createpackage.sh: problem finding install.rb
-3b548f4 Fix #2699 - Use --masterport for PUPPET_PORT variable
-a75bf50 This updates the portage provider in three ways:
-ad86e9e Fixes #2688. Macauthorization provider now handles booleans internally correctly.
-d891f7a Ticket #2676 (a typo)
-bfba2cd Fix #2672 - Make sure nodenames keep their underscores when used as classname
-db67e5f Added rcov exclusion to Rakefile
0.25.1
======
@@ -258,6 +239,9 @@ ad86e9e Fixes #2688. Macauthorization provider now handles booleans internally
d891f7a Ticket #2676 (a typo)
bfba2cd Fix #2672 - Make sure nodenames keep their underscores when used as classname
db67e5f Added rcov exclusion to Rakefile
+
+0.25.1rc1
+=========
6912a7e Incremented version to 0.25.1
fd322da Fixes #1538 - Fixes the yumrepo backtrace in noop mode.
6551e86 Fix #2664 - Mathematic expressions mis-lexed as Regex
@@ -503,138 +487,6 @@ a6816ff Set ENV['PATH'] to an empty string if non-existent
603b9cf Change the diff default output to "unified"
9bc9b5c Added missing colon to suntab
0f2d70d Fixed #2087 and refactored the code that gets the smf service state
-3f070c1 Using the logging utilities to clean up module warnings
-feb7f89 Fixing #1064 - Deprecating module 'plugins' directories
-ccf4e69 Removing deprecated :pluginpath setting
-4036de9 Fixing #2094 - filebucket failures are clearer now
-ed876e0 Refactoring part of the file/filebucket integration
-bd81c25 Adding tests for file/backup behaviour
-c45ebfa Fixed pi binary so --meta option works and updated documentation
-d2080a5 Fixing #2323 - Modules use environments correctly
-b9e632f Fixed #2102 - Rails feature update fixed for Debian and Ubuntu
-1c4ef61 Fixed #2052 - Added -e option to puppet --help output
-d332333 Fix #2333 - Make sure lexer skip whitespace on non-token
-5fbf63c Updated split function and add split function unit tests (courtesy of Thomas Bellman)
-a585bdd * provider/augeas: strip whitespace and ignore blank lines
-a94d2de Fixed pi tests
-5f7455e Fixed #2222 - Cleanup pi binary options and --help output
-134ae3e Fixing #2329 - puppetqd tests now pass
-de55e19 Cleaning up scope tests a bit
-e4ae870 Fixing #2336 - qualified variables only throw warnings
-607b01e Fix #2246 - take2: make sure we run the rails tag query only when needed
-06b919d Fix collector specs which were not working
-2945f8d Make sure overriding a tag also produces a tag
-e142ca6 Removed a unit test which tested munging which is no longer done in the type
-d8ee6cf Clearn up a parsing error reported by the tests
-446557f vim: several improvements + cleanup
-9152678 Fixed #2229 - Red Hat init script error
-b5a8c4d Fix #1907 (or sort) - 'require' puppet function
-74730df #2332: Remove trailing slashes from path commands in the plugin
-1a89455 Changing the preferred serialization format to json
-0de70b7 Switching Queueing to using JSON instead of YAML
-7b33b6d Adding JSON support to Catalogs
-c0bd0aa Providing JSON support to the Resource class
-c16fd1b Adding a JSON utility module for providing Ruby compat
-f059c51 Adding JSON support to Puppet::Relationship
-7f322b3 Adding a JSON format
-7666597 Allowing formats to specify the individual method names to use
-d40068f Allowing formats to specify the methods they require
-024ccf5 Adding a "json" feature
-c8b382d Fix some tests who were missing some actions
-f9516d4 Make sure virtual and rails query use tags when tag are searched
-b5855ec Make sure resources are tagged with the user tag on the server
-d69fffb Fix #2246 - Array tagged resources can't be collected or exported
-6ce0d1e Partial fix for #2329
-4f2c066 Removed extra whitespace from end of lines
-97e6975 Changed indentation to be more consistent with style guide (4 spaces per level)
-41ce18c Changed tabs to spaces without interfering with indentation or alignment
-f3b4092 Fix #2308 - Mongrel should use X-Forwarded-For
-7b0413e Fixes Bug #2324 - Puppetd fails to start without rails
-48d5e8c Enhance versioncmp documentation
-ef56ba5 * provider/augeas: minor spec test cleanup
-d322329 * provider/augeas: allow escaped whitespace and brackets in paths
-9735c50 * provider/augeas: match comparison uses '==' and '!=' again
-dbfa61b * provider/augeas (process_match): no match results in empty array
-386923e * provider/augeas: remove useless checks for nil
-171669a * provider/augeas: simplify evaluation in process_get/match
-51cc752 * provider/augeas (open_augeas): use Augeas flag names, not ints
-4951cdf * provider/augeas: ensure Augeas connection is always closed
-0d5a24d * provider/augeas: minor code cleanup
-cea7bb5 * provider/augeas (parse_commands): use split to split string into lines
-95bd826 * provider/augeas: remove trailing whitespace (no functional change)
-7c5125b Brought in lutters parse_commands patch and integrated it into the type. This includes reworking the get and match commands as well. This change introduces a few small changes. These are:
-6ce8154 Removed --no-chain-reply-to in rake mail_patches task
-4ef7bba Removing --no-thread from the mail_patches rake target
-508934b Fixing a bunch of warnings
-fb0ed7a Fixing tests broken by a recent fix to Cacher
-650029e Always providing a value for 'exported' on Rails resources
-f1dba91 Fixing #2230 - exported resources work again
-5522eb8 Disabling the catalog cache, so puppetqd is compatible with storeconfigs
-abbb282 Fixing the rails feature to be compatible with 2.1+
-907b39b Using Message acknowledgement in queueing
-42247f0 Fixing #2315 - ca --generate works again
-d7be033 Fix #2220 - Make sure stat is refreshed while managing Files
-e4d5966 Added puppet branding to format patch command
-00d5139 vim: Remove another mention of 'site' from syntax
-9067abd vim: Highlight parameters with 'plusignment' operator
-736b0e4 vim: Highlight strings in single quotes
-ce01c95 vim: Clean up syntax spacing
-3af2dbf JRuby OpenSSL implementation is more strict than real ruby one and requires certificate serial number to be strictly positive.
-62534a1 Logging when a cached catalog is used.
-ff5c44f Changing Puppet::Cacher::Expirer#expired? method name
-e3d4c8e Fixing #2240 - external node failures now log output
-bc1445b Fixing #2237 - client_yaml dir is always created by puppetd
-e0c19f9 Fixing #2228 - --logdest works again in puppetd and puppetmasterd
-ab34cf6 Fixing puppetmasterd tests when missing rack
-9d5d0a0 Fixing the Agent so puppetrun actually works server-side
-b0ef08b Fixing #2248 - --no-client correctly leaves off client
-b83b159 Fixing #2243 - puppetrun works again
-3d2189f Fixed #2304 - Added naggen script to directly generate nagios configuration files from a StoreConfigs Rails database
-700ad5b Sync conf/redhat/puppet.spec with Fedora/EPEL
-3ec3f91 Fixed #2280 - Detailed exit codes fix
-f98d49f Fixing #2253 - pluginsync failures propagate correctly
-d860a2f Fixing a transaction test that had some broken plumbing
-a728757 Refactoring resource generation slightly
-6e824d8 Adding a Spec lib directory and moving tmpfile to it
-1d69dbf Extracting a method from eval_resource in Transaction
-7650fb2 Not trying to load files that get removed in pluginsyncing
-3995e70 Fix #2300 - Update ssh_authorized_key documentation
-cb4a4d3 Changed version to allow Rake to work. Minor edit to Rakefile
-99f666f enable maillist on centos, redhat, fedora
-e13befa Fixing #2288 - fixing the tests broken by my attr_ttl code
-a406d58 Fix for #2234: test fails with old Rack version
-c189b46 Fixing #2273 - file purging works more intuitively
-138f19f Caching whether named autoloaded files are missing
-415553e Adding caching of file metadata to the autoloader
-d489a2b Adding modulepath caching to the Autoloader
-5f1c228 Adding caching to the Environment class
-047ab78 Adding TTL support to attribute caching
-6a413d2 Fixed #2666 - Broken docstring formatting
-469604f Deprecating factsync - pluginsync should be used instead
-d39c485 Added spec and unit tests to the Rakefile files list and fixed CI rake tasks
-e1a7f84 Added install.rb to Rakefile package task
-e180a91 Fixed #2271 - Fix to puppetd documentation
-4bf2980 Protecting Stomp client against internal failures
-f4cb8f3 Adding some usability bits to puppetqd
-a18298a Refactoring the stomp client and tests a bit
-2771918 Relying on threads rather than sleeping for puppetqd
-07ff4be Fixing #2250 - Missing templates throw a helpful error
-7ce42da Fixing #2273 - CA location is set correctly in puppetca
-e1779c7 RackXMLRPC: buffer request contents in memory, as a real string.
-fb957cc Modules now can find their own paths
-c608409 Moving file-searching code out of Puppet::Module
-83ba0e5 Fixing #2234 - fixing all of the tests broken by my bindaddress fix
-4f3a67f Fixing #2221 - pluginsignore should work again
-2d580c2 Fix snippets tests failing because of activated storeconfigs
-8c718c9 Fix failing test: file.close! and file.path ordering fix
-17f2c7d Confine stomp tests to Stomp enabled systems
-6a80b76 Fix some master failing tests
-172422f Fix bug #2124 - ssh_authorized_key always changes target if target is not defined
-f945b66 Fixing #2265 - rack is loaded with features rather than manually
-5aef915 Added .git to pluginsignore default list of ignores
-6db5e8d Cleanup of the Puppet Rakefile and removal of the requirement for the Reductive Build Library
-5cc4910 Fix #1409 once again, including test
-a6af5bf Added split function
0.25.0beta2
===========
@@ -770,6 +622,9 @@ f945b66 Fixing #2265 - rack is loaded with features rather than manually
6db5e8d Cleanup of the Puppet Rakefile and removal of the requirement for the Reductive Build Library
5cc4910 Fix #1409 once again, including test
a6af5bf Added split function
+
+0.25.0beta1
+===========
2dd55fc Fixing #2200 - puppetqd expects Daemon to be a class
c016062 Removing unneeded test stubs
1a2e1bc Fixing #2195 - the Server class handles bindaddress
diff --git a/ext/puppetlast b/ext/puppetlast
index e9496760a..ac6396560 100755
--- a/ext/puppetlast
+++ b/ext/puppetlast
@@ -12,5 +12,5 @@ Puppet[:name] = "puppetmasterd"
Puppet::Node::Facts.terminus_class = :yaml
Puppet::Node::Facts.search("*").sort { |a,b| a.name <=> b.name }.each do |node|
- puts "#{node.name} #{node.expired? ? 'cached expired, ' : ''}checked in #{((Time.now - Time.parse(node.values[:_timestamp])) / 60).floor} minutes ago"
+ puts "#{node.name} checked in #{((Time.now - Time.parse(node.values[:_timestamp].to_s)) / 60).floor} minutes ago. Version #{node.values['puppetversion']}#{node.expired? ? ' Cached expired.' : ''}"
end
diff --git a/ext/vim/syntax/puppet.vim b/ext/vim/syntax/puppet.vim
index eb62b64b8..80cd91c6c 100644
--- a/ext/vim/syntax/puppet.vim
+++ b/ext/vim/syntax/puppet.vim
@@ -19,7 +19,7 @@ endif
" match class/definition/node declarations
syn region puppetDefine start="^\s*\(class\|define\|node\)\s" end="{" contains=puppetDefType,puppetDefName,puppetDefArguments,puppetNodeRe
syn keyword puppetDefType class define node inherits contained
-syn region puppetDefArguments start="(" end=")" contains=puppetArgument
+syn region puppetDefArguments start="(" end=")" contained contains=puppetArgument
syn match puppetArgument "\w\+" contained
syn match puppetArgument "\$\w\+" contained
syn match puppetArgument "'[^']+'" contained
@@ -51,8 +51,10 @@ syn match puppetParamDigits "[0-9]\+"
" match 'template' in 'content => template("...")'
syn match puppetParam "\w\+\s*[=+]>\s*\w\+\s*(" contains=puppetFunction,puppetParamName
-syn keyword puppetFunction debug info notice warning err alert emerg crit
-syn keyword puppetFunction sprintf template fail tagged include generate search file tag versioncmp fqdn_rand realize split defined regsubst sha1 inline_template contained
+" statements
+syn region puppetFunction start="^\s*\(alert\|crit\|debug\|emerg\|err\|fail\|include\|info\|notice\|realize\|require\|search\|tag\|warning\)\s*(" end=")" contained contains=puppetString
+" rvalues
+syn region puppetFunction start="^\s*\(defined\|file\|fqdn_rand\|generate\|inline_template\|regsubst\|sha1\|shellquote\|split\|sprintf\|tagged\|template\|versioncmp\)\s*(" end=")" contained contains=puppetString
syn match puppetVariable "$\w\+"
syn match puppetVariable "${\w\+}"
diff --git a/install.rb b/install.rb
index 49ca8b18c..30f1d32aa 100755
--- a/install.rb
+++ b/install.rb
@@ -83,7 +83,7 @@ sbins = glob(%w{sbin/*})
bins = glob(%w{bin/*})
rdoc = glob(%w{bin/* sbin/* lib/**/*.rb README README-library CHANGELOG TODO Install}).reject { |e| e=~ /\.(bat|cmd)$/ }
ri = glob(%w(bin/*.rb sbin/* lib/**/*.rb)).reject { |e| e=~ /\.(bat|cmd)$/ }
-man = glob(%w{man/man8/*})
+man = glob(%w{man/man[0-9]/*})
libs = glob(%w{lib/**/*.rb lib/**/*.py})
tests = glob(%w{test/**/*.rb})
@@ -355,9 +355,9 @@ def build_man(bins)
# Locate rst2man
rst2man = %x{which rst2man.py}
rst2man.chomp!
- # Create puppet.conf.8 man page
+ # Create puppet.conf.5 man page
%x{bin/puppetdoc --reference configuration > ./puppet.conf.rst}
- %x{#{rst2man} ./puppet.conf.rst ./man/man8/puppet.conf.8}
+ %x{#{rst2man} ./puppet.conf.rst ./man/man5/puppet.conf.5}
File.unlink("./puppet.conf.rst")
# Create binary man pages
diff --git a/lib/puppet.rb b/lib/puppet.rb
index cd34cdf5e..a78853a10 100644
--- a/lib/puppet.rb
+++ b/lib/puppet.rb
@@ -24,7 +24,7 @@ require 'puppet/util/suidmanager'
# it's also a place to find top-level commands like 'debug'
module Puppet
- PUPPETVERSION = '0.25.3'
+ PUPPETVERSION = '0.25.4'
def Puppet.version
return PUPPETVERSION
diff --git a/lib/puppet/agent.rb b/lib/puppet/agent.rb
index 09607372f..f712bbdd5 100644
--- a/lib/puppet/agent.rb
+++ b/lib/puppet/agent.rb
@@ -52,6 +52,8 @@ class Puppet::Agent
with_client do |client|
begin
sync.synchronize { lock { result = client.run(*args) } }
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not run %s: %s" % [client_class, detail]
@@ -124,6 +126,8 @@ class Puppet::Agent
def with_client
begin
@client = client_class.new
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not create instance of %s: %s" % [client_class, detail]
diff --git a/lib/puppet/application/puppet.rb b/lib/puppet/application/puppet.rb
index e4baf5d05..2f7946b3d 100644
--- a/lib/puppet/application/puppet.rb
+++ b/lib/puppet/application/puppet.rb
@@ -1,5 +1,6 @@
require 'puppet'
require 'puppet/application'
+require 'puppet/configurer'
require 'puppet/network/handler'
require 'puppet/network/client'
@@ -124,9 +125,15 @@ Puppet::Application.new(:puppet) do
catalog.retrieval_duration = Time.now - starttime
+ configurer = Puppet::Configurer.new
+ configurer.execute_prerun_command
+
# And apply it
transaction = catalog.apply
+ configurer.execute_postrun_command
+
+ status = 0
if not Puppet[:noop] and options[:detailed_exitcodes] then
transaction.generate_report
exit(transaction.report.exit_status)
@@ -134,9 +141,7 @@ Puppet::Application.new(:puppet) do
exit(0)
end
rescue => detail
- if Puppet[:trace]
- puts detail.backtrace
- end
+ puts detail.backtrace if Puppet[:trace]
if detail.is_a?(XMLRPC::FaultException)
$stderr.puts detail.message
else
diff --git a/lib/puppet/configurer.rb b/lib/puppet/configurer.rb
index 350e9c34f..8179d2c4d 100644
--- a/lib/puppet/configurer.rb
+++ b/lib/puppet/configurer.rb
@@ -5,6 +5,8 @@ require 'puppet/network/http_pool'
require 'puppet/util'
class Puppet::Configurer
+ class CommandHookError < RuntimeError; end
+
require 'puppet/configurer/fact_handler'
require 'puppet/configurer/plugin_handler'
@@ -33,6 +35,19 @@ class Puppet::Configurer
Puppet[:puppetdlockfile]
end
+ def clear
+ @catalog.clear(true) if @catalog
+ @catalog = nil
+ end
+
+ def execute_postrun_command
+ execute_from_setting(:postrun_command)
+ end
+
+ def execute_prerun_command
+ execute_from_setting(:prerun_command)
+ end
+
# Initialize and load storage
def dostorage
begin
@@ -73,6 +88,8 @@ class Puppet::Configurer
download_plugins()
download_fact_plugins()
+
+ execute_prerun_command
end
# Get the remote catalog, yo. Returns nil if no catalog can be found.
@@ -91,6 +108,8 @@ class Puppet::Configurer
duration = thinmark do
result = catalog_class.find(name, fact_options.merge(:ignore_cache => true))
end
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Could not retrieve catalog from remote server: %s" % detail
@@ -134,6 +153,8 @@ class Puppet::Configurer
def run(options = {})
begin
prepare()
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
Puppet.err "Failed to prepare catalog: %s" % detail
@@ -165,6 +186,7 @@ class Puppet::Configurer
# Now close all of our existing http connections, since there's no
# reason to leave them lying open.
Puppet::Network::HttpPool.clear_http_instances
+ execute_postrun_command
Puppet::Util::Log.close(report)
@@ -198,4 +220,14 @@ class Puppet::Configurer
return timeout
end
+
+ def execute_from_setting(setting)
+ return if (command = Puppet[setting]) == ""
+
+ begin
+ Puppet::Util.execute([command])
+ rescue => detail
+ raise CommandHookError, "Could not run command from #{setting}: #{detail}"
+ end
+ end
end
diff --git a/lib/puppet/configurer/fact_handler.rb b/lib/puppet/configurer/fact_handler.rb
index 40e79b6c6..72bd76e1f 100644
--- a/lib/puppet/configurer/fact_handler.rb
+++ b/lib/puppet/configurer/fact_handler.rb
@@ -17,6 +17,8 @@ module Puppet::Configurer::FactHandler
begin
reload_facter()
Puppet::Node::Facts.find(Puppet[:certname])
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
puts detail.backtrace if Puppet[:trace]
raise Puppet::Error, "Could not retrieve local facts: %s" % detail
diff --git a/lib/puppet/configurer/plugin_handler.rb b/lib/puppet/configurer/plugin_handler.rb
index e934f5877..9e1c113f9 100644
--- a/lib/puppet/configurer/plugin_handler.rb
+++ b/lib/puppet/configurer/plugin_handler.rb
@@ -19,6 +19,8 @@ module Puppet::Configurer::PluginHandler
begin
Puppet.info "Loading downloaded plugin %s" % file
load file
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
Puppet.err "Could not load downloaded file %s: %s" % [file, detail]
end
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index ca4b9b8d0..b2e849264 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -159,9 +159,6 @@ module Puppet
may need to use a FQDN for the server hostname when using a proxy."],
:http_proxy_port => [3128,
"The HTTP proxy port to use for outgoing connections"],
- :http_enable_post_connection_check => [true,
- "Boolean; whether or not puppetd should validate the server
- SSL certificate against the request hostname."],
:filetimeout => [ 15,
"The minimum time to wait (in seconds) between checking for updates in
configuration files. This timeout determines how quickly Puppet checks whether
@@ -199,7 +196,12 @@ module Puppet
reports, allowing you to correlate changes on your hosts to the source version on the server."],
:zlib => [true,
"Boolean; whether to use the zlib library",
- ]
+ ],
+ :prerun_command => ["", "A command to run before every agent run. If this command returns a non-zero
+ return code, the entire Puppet run will fail."],
+ :postrun_command => ["", "A command to run after every agent run. If this command returns a non-zero
+ return code, the entire Puppet run will be considered to have failed, even though it might have
+ performed work during the normal run."]
)
hostname = Facter["hostname"].value
diff --git a/lib/puppet/file_serving/mount/file.rb b/lib/puppet/file_serving/mount/file.rb
index 4309ef79a..e1eaf6052 100644
--- a/lib/puppet/file_serving/mount/file.rb
+++ b/lib/puppet/file_serving/mount/file.rb
@@ -25,7 +25,7 @@ class Puppet::FileServing::Mount::File < Puppet::FileServing::Mount
file = ::File.join(full_path, relative_path)
- if ! FileTest.exist?(file)
+ if !(FileTest.exist?(file) or FileTest.symlink?(file))
Puppet.info("File does not exist or is not accessible: #{file}")
return nil
end
diff --git a/lib/puppet/indirector/facts/facter.rb b/lib/puppet/indirector/facts/facter.rb
index 6c6cbc6be..b5787ddf6 100644
--- a/lib/puppet/indirector/facts/facter.rb
+++ b/lib/puppet/indirector/facts/facter.rb
@@ -29,6 +29,8 @@ class Puppet::Node::Facts::Facter < Puppet::Indirector::Code
Timeout::timeout(self.timeout) do
load file
end
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
Puppet.warning "Could not load fact file %s: %s" % [fqfile, detail]
end
diff --git a/lib/puppet/indirector/ldap.rb b/lib/puppet/indirector/ldap.rb
index 51bab0e6e..ab3c7ef54 100644
--- a/lib/puppet/indirector/ldap.rb
+++ b/lib/puppet/indirector/ldap.rb
@@ -40,6 +40,8 @@ class Puppet::Indirector::Ldap < Puppet::Indirector::Terminus
found = true
yield entry
end
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
if count == 0
# Try reconnecting to ldap if we get an exception and we haven't yet retried.
diff --git a/lib/puppet/network/http/handler.rb b/lib/puppet/network/http/handler.rb
index 65bb0f82c..444fbf7e7 100644
--- a/lib/puppet/network/http/handler.rb
+++ b/lib/puppet/network/http/handler.rb
@@ -66,6 +66,8 @@ module Puppet::Network::HTTP::Handler
check_authorization(indirection_request)
send("do_%s" % indirection_request.method, indirection_request, request, response)
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => e
return do_exception(response, e)
end
diff --git a/lib/puppet/network/http_pool.rb b/lib/puppet/network/http_pool.rb
index 6de204a80..4789d4704 100644
--- a/lib/puppet/network/http_pool.rb
+++ b/lib/puppet/network/http_pool.rb
@@ -94,8 +94,6 @@ module Puppet::Network::HttpPool
# Use configured timeout (#1176)
http.read_timeout = Puppet[:configtimeout]
http.open_timeout = Puppet[:configtimeout]
- # JJM Configurable fix for #896.
- http.enable_post_connection_check = Puppet[:http_enable_post_connection_check]
cert_setup(http)
diff --git a/lib/puppet/network/xmlrpc/client.rb b/lib/puppet/network/xmlrpc/client.rb
index ee2c008eb..9faa71c8b 100644
--- a/lib/puppet/network/xmlrpc/client.rb
+++ b/lib/puppet/network/xmlrpc/client.rb
@@ -144,6 +144,8 @@ module Puppet::Network
Puppet.debug "Calling %s.%s" % [namespace, method]
begin
call("%s.%s" % [namespace, method.to_s],*args)
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
retry if self.class.error_handler(detail).execute(self, detail, namespace, method) == :retry
end
diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb
index 78be1d79e..7a7d55de1 100644
--- a/lib/puppet/provider/augeas/augeas.rb
+++ b/lib/puppet/provider/augeas/augeas.rb
@@ -39,6 +39,7 @@ Puppet::Type.type(:augeas).provide(:augeas) do
"match" => [ :path, :glob ],
"size" => [:comparator, :int],
"include" => [:string],
+ "not_include" => [:string],
"==" => [:glob],
"!=" => [:glob]
}
@@ -203,6 +204,8 @@ Puppet::Type.type(:augeas).provide(:augeas) do
#Get the values from augeas
result = @aug.match(path) || []
+ fail("Error trying to match path '#{path}'") if (result == -1)
+
# Now do the work
case verb
when "size"
@@ -213,6 +216,9 @@ Puppet::Type.type(:augeas).provide(:augeas) do
when "include"
arg = clause_array.shift
return_value = result.include?(arg)
+ when "not_include"
+ arg = clause_array.shift
+ return_value = !result.include?(arg)
when "=="
begin
arg = clause_array.shift
@@ -261,6 +267,8 @@ Puppet::Type.type(:augeas).provide(:augeas) do
when "get"; return_value = process_get(cmd_array)
when "match"; return_value = process_match(cmd_array)
end
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => e
fail("Error sending command '#{command}' with params #{cmd_array[1..-1].inspect}/#{e.message}")
end
@@ -322,13 +330,16 @@ Puppet::Type.type(:augeas).provide(:augeas) do
case command
when "set"
debug("sending command '#{command}' with params #{cmd_array.inspect}")
- aug.set(cmd_array[0], cmd_array[1])
+ rv = aug.set(cmd_array[0], cmd_array[1])
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
when "rm", "remove"
debug("sending command '#{command}' with params #{cmd_array.inspect}")
- aug.rm(cmd_array[0])
+ rv = aug.rm(cmd_array[0])
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv)
when "clear"
debug("sending command '#{command}' with params #{cmd_array.inspect}")
- @aug.clear(cmd_array[0])
+ rv = aug.clear(cmd_array[0])
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
when "insert", "ins"
label = cmd_array[0]
where = cmd_array[1]
@@ -339,9 +350,12 @@ Puppet::Type.type(:augeas).provide(:augeas) do
else fail("Invalid value '#{where}' for where param")
end
debug("sending command '#{command}' with params #{[label, where, path].inspect}")
- aug.insert(path, label, before)
+ rv = aug.insert(path, label, before)
+ fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}") if (rv == -1)
else fail("Command '#{command}' is not supported")
end
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => e
fail("Error sending command '#{command}' with params #{cmd_array.inspect}/#{e.message}")
end
diff --git a/lib/puppet/provider/cron/crontab.rb b/lib/puppet/provider/cron/crontab.rb
index 28ef05974..6dee2e515 100755
--- a/lib/puppet/provider/cron/crontab.rb
+++ b/lib/puppet/provider/cron/crontab.rb
@@ -27,13 +27,18 @@ Puppet::Type.type(:cron).provide(:crontab,
text_line :environment, :match => %r{^\w+=}
- crontab = record_line :crontab, :fields => %w{special minute hour monthday month weekday command},
- :match => %r{^\s*(?:@(\w+)|(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+))\s+(.+)$},
- :optional => %w{special minute hour weekday month monthday}, :absent => "*"
+ record_line :freebsd_special, :fields => %w{special command},
+ :match => %r{^@(\w+)\s+(.+)$}, :pre_gen => proc { |record|
+ record[:special] = "@" + record[:special]
+ }
+
+ crontab = record_line :crontab, :fields => %w{minute hour monthday month weekday command},
+ :match => %r{^\s*(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(\S+)\s+(.+)$},
+ :optional => %w{minute hour weekday month monthday}, :absent => "*"
class << crontab
def numeric_fields
- fields - [:command, :special]
+ fields - [:command]
end
# Do some post-processing of the parsed record. Basically just
# split the numeric fields on ','.
diff --git a/lib/puppet/provider/package/blastwave.rb b/lib/puppet/provider/package/blastwave.rb
index cf2c87bfe..9b2bbf6a5 100755
--- a/lib/puppet/provider/package/blastwave.rb
+++ b/lib/puppet/provider/package/blastwave.rb
@@ -11,7 +11,7 @@ Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun
commands :pkgget => pkgget
def pkgget_with_cat(*args)
- withenv(:PAGER => "/usr/bin/cat") { pkgget(*args) }
+ Puppet::Util::Execution::withenv(:PAGER => "/usr/bin/cat") { pkgget(*args) }
end
def self.extended(mod)
@@ -41,7 +41,7 @@ Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun
command << hash[:justme]
end
- output = pkgget_with_cat command
+ output = Puppet::Util::Execution::withenv(:PAGER => "/usr/bin/cat") { pkgget command }
list = output.split("\n").collect do |line|
next if line =~ /^#/
diff --git a/lib/puppet/provider/service/redhat.rb b/lib/puppet/provider/service/redhat.rb
index 211b66956..45a9074e6 100755
--- a/lib/puppet/provider/service/redhat.rb
+++ b/lib/puppet/provider/service/redhat.rb
@@ -1,6 +1,6 @@
# Manage Red Hat services. Start/stop uses /sbin/service and enable/disable uses chkconfig
-Puppet::Type.type(:service).provide :redhat, :parent => :init do
+Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init do
desc "Red Hat's (and probably many others) form of ``init``-style service management:
Uses ``chkconfig`` for service enabling and disabling.
diff --git a/lib/puppet/provider/sshkey/parsed.rb b/lib/puppet/provider/sshkey/parsed.rb
index 4673b5731..e84e3e5c5 100755
--- a/lib/puppet/provider/sshkey/parsed.rb
+++ b/lib/puppet/provider/sshkey/parsed.rb
@@ -21,14 +21,14 @@ Puppet::Type.type(:sshkey).provide(:parsed,
:post_parse => proc { |hash|
names = hash[:name].split(",", -1)
hash[:name] = names.shift
- hash[:alias] = names
+ hash[:host_aliases] = names
},
:pre_gen => proc { |hash|
- if hash[:alias]
- names = [hash[:name], hash[:alias]].flatten
+ if hash[:host_aliases]
+ names = [hash[:name], hash[:host_aliases]].flatten
- hash[:name] = [hash[:name], hash[:alias]].flatten.join(",")
- hash.delete(:alias)
+ hash[:name] = [hash[:name], hash[:host_aliases]].flatten.join(",")
+ hash.delete(:host_aliases)
end
}
end
diff --git a/lib/puppet/provider/user/user_role_add.rb b/lib/puppet/provider/user/user_role_add.rb
index 278893724..aa01f8e52 100644
--- a/lib/puppet/provider/user/user_role_add.rb
+++ b/lib/puppet/provider/user/user_role_add.rb
@@ -1,6 +1,6 @@
require 'puppet/util/user_attr'
-Puppet::Type.type(:user).provide :user_role_add, :parent => :useradd do
+Puppet::Type.type(:user).provide :user_role_add, :parent => :useradd, :source => :useradd do
desc "User management inherits ``useradd`` and adds logic to manage roles on Solaris using roleadd."
diff --git a/lib/puppet/ssl/host.rb b/lib/puppet/ssl/host.rb
index 5de2c5a18..8d44ffe9c 100644
--- a/lib/puppet/ssl/host.rb
+++ b/lib/puppet/ssl/host.rb
@@ -220,6 +220,8 @@ class Puppet::SSL::Host
return if certificate
generate
return if certificate
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
Puppet.err "Could not request certificate: %s" % detail.to_s
if time < 1
diff --git a/lib/puppet/type/augeas.rb b/lib/puppet/type/augeas.rb
index b8d08bb81..c2b164ede 100644
--- a/lib/puppet/type/augeas.rb
+++ b/lib/puppet/type/augeas.rb
@@ -76,6 +76,7 @@ Puppet::Type.newtype(:augeas) do
get [AUGEAS_PATH] [COMPARATOR] [STRING]
match [MATCH_PATH] size [COMPARATOR] [INT]
match [MATCH_PATH] include [STRING]
+ match [MATCH_PATH] not_include [STRING]
match [MATCH_PATH] == [AN_ARRAY]
match [MATCH_PATH] != [AN_ARRAY]
diff --git a/lib/puppet/type/tidy.rb b/lib/puppet/type/tidy.rb
index b5ccb3fb1..3d7190c27 100755
--- a/lib/puppet/type/tidy.rb
+++ b/lib/puppet/type/tidy.rb
@@ -139,7 +139,7 @@ Puppet::Type.newtype(:tidy) do
end
def tidy?(path, stat)
- if stat.size > value
+ if stat.size >= value
return true
else
return false
diff --git a/lib/puppet/util/autoload.rb b/lib/puppet/util/autoload.rb
index ec2f48c7b..ceaabe46a 100644
--- a/lib/puppet/util/autoload.rb
+++ b/lib/puppet/util/autoload.rb
@@ -86,6 +86,8 @@ class Puppet::Util::Autoload
name = symbolize(name)
loaded name, file
return true
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
# I have no idea what's going on here, but different versions
# of ruby are raising different errors on missing files.
@@ -123,6 +125,8 @@ class Puppet::Util::Autoload
begin
Kernel.require file
loaded(name, file)
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception => detail
if Puppet[:trace]
puts detail.backtrace
@@ -152,7 +156,7 @@ class Puppet::Util::Autoload
end
end
- def search_directories
- [module_directories, Puppet[:libdir], $:].flatten
+ def search_directories(dummy_argument=:work_arround_for_ruby_GC_bug)
+ [module_directories, Puppet[:libdir].split(File::PATH_SEPARATOR), $:].flatten
end
end
diff --git a/lib/puppet/util/feature.rb b/lib/puppet/util/feature.rb
index add1b2691..6218eabf4 100644
--- a/lib/puppet/util/feature.rb
+++ b/lib/puppet/util/feature.rb
@@ -83,6 +83,8 @@ class Puppet::Util::Feature
begin
require lib
+ rescue SystemExit,NoMemoryError
+ raise
rescue Exception
Puppet.debug "Failed to load library '%s' for feature '%s'" % [lib, name]
return false
diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb
index 6e438bc73..7ce1ccc1c 100644
--- a/lib/puppet/util/monkey_patches.rb
+++ b/lib/puppet/util/monkey_patches.rb
@@ -1,3 +1,4 @@
+Process.maxgroups = 1024
module RDoc
def self.caller(skip=nil)
in_gem_wrapper = false
diff --git a/man/man8/puppet.conf.8 b/man/man5/puppet.conf.5
index 2f07eb030..b762e40a3 100644
--- a/man/man8/puppet.conf.8
+++ b/man/man5/puppet.conf.5
@@ -1,49 +1,56 @@
-.TH Configuration Reference "" "" ""
+.TH CONFIGURATION REFERENCE "" "" ""
.SH NAME
Configuration Reference \-
.\" Man page generated from reStructeredText.
-\fPThis page is autogenerated; any changes will get overwritten\fP \fI(last generated on Wed Dec 30 19:31:12 \-0500 2009)\fP
-
-
-.\" topic: Contents
-.\"
-.\" Specifying Configuration Parameters
-.\"
-.\" Signals
-.\"
-.\" Configuration Parameter Reference
-
-.SH Specifying Configuration Parameters
-
+.
+.sp
+\fBThis page is autogenerated; any changes will get overwritten\fP \fI(last generated on Mon Feb 08 23:57:07 +1100 2010)\fP
+.SS Contents
+.INDENT 0.0
+.IP \(bu 2
+.
+\fI\%Specifying Configuration Parameters\fP
+.IP \(bu 2
+.
+\fI\%Signals\fP
+.IP \(bu 2
+.
+\fI\%Configuration Parameter Reference\fP
+.UNINDENT
+.SH SPECIFYING CONFIGURATION PARAMETERS
.SS On The Command\-Line
+.sp
Every Puppet executable (with the exception of \fBpuppetdoc\fP) accepts all of
the parameters below, but not all of the arguments make sense for every executable.
-
+.sp
I have tried to be as thorough as possible in the descriptions of the
arguments, so it should be obvious whether an argument is appropriate or not.
-
+.sp
These parameters can be supplied to the executables either as command\-line
options or in the configuration file. For instance, the command\-line
invocation below would set the configuration directory to \fB/private/puppet\fP:
-
-
+.sp
.nf
+.ft C
$ puppetd \-\-confdir=/private/puppet
+.ft P
.fi
+.sp
Note that boolean options are turned on and off with a slightly different
syntax on the command line:
-
-
+.sp
.nf
+.ft C
$ puppetd \-\-storeconfigs
$ puppetd \-\-no\-storeconfigs
+.ft P
.fi
+.sp
The invocations above will enable and disable, respectively, the storage of
the client configuration.
-
-
.SS Configuration Files
+.sp
As mentioned above, the configuration parameters can also be stored in a
configuration file, located in the configuration directory. As root, the
default configuration directory is \fB/etc/puppet\fP, and as a regular user, the
@@ -52,419 +59,356 @@ executables look for \fBpuppet.conf\fP in their configuration directory
(although they previously looked for separate files). For example,
\fBpuppet.conf\fP is located at \fB/etc/puppet/puppet.conf\fP as root and
\fB~user/.puppet/puppet.conf\fP as a regular user by default.
-
+.sp
All executables will set any parameters set within the \fBmain\fP section,
while each executable will also look for a section named for the executable
and load those parameters. For example, \fBpuppetd\fP will look for a
section named \fBpuppetd\fP, and \fBpuppetmasterd\fP looks for a section
named \fBpuppetmasterd\fP. This allows you to use a single configuration file
to customize the settings for all of your executables.
-
-
.SS File Format
+.sp
The file follows INI\-style formatting. Here is an example of a very simple
\fBpuppet.conf\fP file:
-
-
+.sp
.nf
+.ft C
[main]
confdir = /private/puppet
storeconfigs = true
+.ft P
.fi
+.sp
Note that boolean parameters must be explicitly specified as \fItrue\fP or
\fIfalse\fP as seen above.
-
+.sp
If you need to change file parameters (e.g., reset the mode or owner), do
so within curly braces on the same line:
-
-
+.sp
.nf
+.ft C
[main]
myfile = /tmp/whatever {owner = root, mode = 644}
+.ft P
.fi
-If you\'re starting out with a fresh configuration, you may wish to let
+.sp
+If you\(aqre starting out with a fresh configuration, you may wish to let
the executable generate a template configuration file for you by invoking
the executable in question with the \fI\-\-genconfig\fP command. The executable
will print a template configuration to standard output, which can be
redirected to a file like so:
-
-
+.sp
.nf
+.ft C
$ puppetd \-\-genconfig > /etc/puppet/puppet.conf
+.ft P
.fi
+.sp
Note that this invocation will replace the contents of any pre\-existing
\fIpuppet.conf\fP file, so make a backup of your present config if it contains
valuable information.
-
+.sp
Like the \fI\-\-genconfig\fP argument, the executables also accept a \fI\-\-genmanifest\fP
argument, which will generate a manifest that can be used to manage all of
-Puppet\'s directories and files and prints it to standard output. This can
+Puppet\(aqs directories and files and prints it to standard output. This can
likewise be redirected to a file:
-
-
+.sp
.nf
+.ft C
$ puppetd \-\-genmanifest > /etc/puppet/manifests/site.pp
+.ft P
.fi
+.sp
Puppet can also create user and group accounts for itself (one \fIpuppet\fP group
and one \fIpuppet\fP user) if it is invoked as \fIroot\fP with the \fI\-\-mkusers\fP argument:
-
-
+.sp
.nf
+.ft C
$ puppetd \-\-mkusers
+.ft P
.fi
-
-.SH Signals
+.SH SIGNALS
+.sp
The \fBpuppetd\fP and \fBpuppetmasterd\fP executables catch some signals for special
handling. Both daemons catch (\fBSIGHUP\fP), which forces the server to restart
tself. Predictably, interrupt and terminate (\fBSIGINT\fP and \fBSIGTERM\fP) will shut
down the server, whether it be an instance of \fBpuppetd\fP or \fBpuppetmasterd\fP.
-
+.sp
Sending the \fBSIGUSR1\fP signal to an instance of \fBpuppetd\fP will cause it to
immediately begin a new configuration transaction with the server. This
signal has no effect on \fBpuppetmasterd\fP.
-
-
-.SH Configuration Parameter Reference
+.SH CONFIGURATION PARAMETER REFERENCE
+.sp
Below is a list of all documented parameters. Not all of them are valid with all
Puppet executables, but the executables will ignore any inappropriate values.
-
-
.SS async_storeconfigs
-Whether to use a queueing system to provide asynchronous database integration. Requires that \fBpuppetqd\fP be running and that \'PSON\' support for ruby be installed.
-
+.sp
+Whether to use a queueing system to provide asynchronous database integration. Requires that \fBpuppetqd\fP be running and that \(aqPSON\(aq support for ruby be installed.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS authconfig
+.sp
The configuration file that defines the rights to the different namespaces and methods. This can be used as a coarse\-grained authorization system for both \fBpuppetd\fP and \fBpuppetmasterd\fP.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/namespaceauth.conf
-
+.
+\fBDefault\fP: $confdir/namespaceauth.conf
.UNINDENT
-
.SS autoflush
+.sp
Whether log files should always flush to disk.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS autosign
+.sp
Whether to enable autosign. Valid values are true (which autosigns any key request, and is a very bad idea), false (which never autosigns any key request), and the path to a file, which uses that configuration file to determine which keys to sign.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/autosign.conf
-
+.
+\fBDefault\fP: $confdir/autosign.conf
.UNINDENT
-
.SS bindaddress
+.sp
The address a listening server should bind to. Mongrel servers default to 127.0.0.1 and WEBrick defaults to 0.0.0.0.
-
-
.SS bucketdir
+.sp
Where FileBucket files are stored.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/bucket
-
+.
+\fBDefault\fP: $vardir/bucket
.UNINDENT
-
.SS ca
+.sp
Wether the master should function as a certificate authority.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: true
-
+.
+\fBDefault\fP: true
.UNINDENT
-
.SS ca_days
+.sp
How long a certificate should be valid. This parameter is deprecated, use ca_ttl instead
-
-
.SS ca_md
+.sp
The type of hash used in certificates.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: md5
-
+.
+\fBDefault\fP: md5
.UNINDENT
-
.SS ca_port
+.sp
The port to use for the certificate authority.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $masterport
-
+.
+\fBDefault\fP: $masterport
.UNINDENT
-
.SS ca_server
-The server to use for certificate authority requests. It\'s a separate server because it cannot and does not need to horizontally scale.
-
+.sp
+The server to use for certificate authority requests. It\(aqs a separate server because it cannot and does not need to horizontally scale.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $server
-
+.
+\fBDefault\fP: $server
.UNINDENT
-
.SS ca_ttl
-The default TTL for new certificates; valid values must be an integer, optionally followed by one of the units \'y\' (years of 365 days), \'d\' (days), \'h\' (hours), or \'s\' (seconds). The unit defaults to seconds. If this parameter is set, ca_days is ignored. Examples are \'3600\' (one hour) and \'1825d\', which is the same as \'5y\' (5 years)
-
+.sp
+The default TTL for new certificates; valid values must be an integer, optionally followed by one of the units \(aqy\(aq (years of 365 days), \(aqd\(aq (days), \(aqh\(aq (hours), or \(aqs\(aq (seconds). The unit defaults to seconds. If this parameter is set, ca_days is ignored. Examples are \(aq3600\(aq (one hour) and \(aq1825d\(aq, which is the same as \(aq5y\(aq (5 years)
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 5y
-
+.
+\fBDefault\fP: 5y
.UNINDENT
-
.SS cacert
+.sp
The CA certificate.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/ca_crt.pem
-
+.
+\fBDefault\fP: $cadir/ca_crt.pem
.UNINDENT
-
.SS cacrl
+.sp
The certificate revocation list (CRL) for the CA. Will be used if present but otherwise ignored.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/ca_crl.pem
-
+.
+\fBDefault\fP: $cadir/ca_crl.pem
.UNINDENT
-
.SS cadir
+.sp
The root directory for the certificate authority.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/ca
-
+.
+\fBDefault\fP: $ssldir/ca
.UNINDENT
-
.SS cakey
+.sp
The CA private key.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/ca_key.pem
-
+.
+\fBDefault\fP: $cadir/ca_key.pem
.UNINDENT
-
.SS capass
+.sp
Where the CA stores the password for the private key
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $caprivatedir/ca.pass
-
+.
+\fBDefault\fP: $caprivatedir/ca.pass
.UNINDENT
-
.SS caprivatedir
+.sp
Where the CA stores private certificate information.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/private
-
+.
+\fBDefault\fP: $cadir/private
.UNINDENT
-
.SS capub
+.sp
The CA public key.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/ca_pub.pem
-
+.
+\fBDefault\fP: $cadir/ca_pub.pem
.UNINDENT
-
.SS casesensitive
+.sp
Whether matching in case statements and selectors should be case\-sensitive. Case insensitivity is handled by downcasing all values before comparison.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS catalog_format
-(Deprecated for \'preferred_serialization_format\') What format to use to dump the catalog. Only supports \'marshal\' and \'yaml\'. Only matters on the client, since it asks the server for a specific format.
-
-
+.sp
+(Deprecated for \(aqpreferred_serialization_format\(aq) What format to use to dump the catalog. Only supports \(aqmarshal\(aq and \(aqyaml\(aq. Only matters on the client, since it asks the server for a specific format.
.SS cert_inventory
+.sp
A Complete listing of all certificates
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/inventory.txt
-
+.
+\fBDefault\fP: $cadir/inventory.txt
.UNINDENT
-
.SS certdir
+.sp
The certificate directory.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/certs
-
+.
+\fBDefault\fP: $ssldir/certs
.UNINDENT
-
.SS certdnsnames
-The DNS names on the Server certificate as a colon\-separated list. If it\'s anything other than an empty string, it will be used as an alias in the created certificate. By default, only the server gets an alias set up, and only for \'puppet\'.
-
-
+.sp
+The DNS names on the Server certificate as a colon\-separated list. If it\(aqs anything other than an empty string, it will be used as an alias in the created certificate. By default, only the server gets an alias set up, and only for \(aqpuppet\(aq.
.SS certname
+.sp
The name to use when handling certificates. Defaults to the fully qualified domain name.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: pelin.lovedthanlost.net
-
+.
+\fBDefault\fP: absinthe.lovedthanlost.net
.UNINDENT
-
.SS classfile
+.sp
The file in which puppetd stores a list of the classes associated with the retrieved configuration. Can be loaded in the separate \fBpuppet\fP executable using the \fB\-\-loadclasses\fP option.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $statedir/classes.txt
-
+.
+\fBDefault\fP: $statedir/classes.txt
.UNINDENT
-
.SS clientbucketdir
+.sp
Where FileBucket files are stored locally.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/clientbucket
-
+.
+\fBDefault\fP: $vardir/clientbucket
.UNINDENT
-
.SS clientyamldir
+.sp
The directory in which client\-side YAML data is stored.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/client_yaml
-
+.
+\fBDefault\fP: $vardir/client_yaml
.UNINDENT
-
.SS code
-Code to parse directly. This is essentially only used by \fBpuppet\fP, and should only be set if you\'re writing your own Puppet executable
-
-
+.sp
+Code to parse directly. This is essentially only used by \fBpuppet\fP, and should only be set if you\(aqre writing your own Puppet executable
.SS color
+.sp
Whether to use colors when logging to the console. Valid values are \fBansi\fP (equivalent to \fBtrue\fP), \fBhtml\fP (mostly used during testing with TextMate), and \fBfalse\fP, which produces no color.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: ansi
-
+.
+\fBDefault\fP: ansi
.UNINDENT
-
.SS confdir
-The main Puppet configuration directory. The default for this parameter is calculated based on the user. If the process is runnig as root or the user that \fBpuppetmasterd\fP is supposed to run as, it defaults to a system directory, but if it\'s running as any other user, it defaults to being in \fB~\fP.
-
+.sp
+The main Puppet configuration directory. The default for this parameter is calculated based on the user. If the process is runnig as root or the user that \fBpuppetmasterd\fP is supposed to run as, it defaults to a system directory, but if it\(aqs running as any other user, it defaults to being in \fB~\fP.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: /etc/puppet
-
+.
+\fBDefault\fP: /etc/puppet
.UNINDENT
-
.SS config
+.sp
The configuration file for puppetdoc.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/puppet.conf
-
+.
+\fBDefault\fP: $confdir/puppet.conf
.UNINDENT
-
.SS config_version
+.sp
How to determine the configuration version. By default, it will be the time that the configuration is parsed, but you can provide a shell script to override how the version is determined. The output of this script will be added to every log message in the reports, allowing you to correlate changes on your hosts to the source version on the server.
-
-
.SS configprint
-Print the value of a specific configuration parameter. If a parameter is provided for this, then the value is printed and puppet exits. Comma\-separate multiple values. For a list of all values, specify \'all\'. This feature is only available in Puppet versions higher than 0.18.4.
-
-
+.sp
+Print the value of a specific configuration parameter. If a parameter is provided for this, then the value is printed and puppet exits. Comma\-separate multiple values. For a list of all values, specify \(aqall\(aq. This feature is only available in Puppet versions higher than 0.18.4.
.SS configtimeout
+.sp
How long the client should wait for the configuration to be retrieved before considering it a failure. This can help reduce flapping if too many clients contact the server at one time.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 120
-
+.
+\fBDefault\fP: 120
.UNINDENT
-
.SS csrdir
+.sp
Where the CA stores certificate requests
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/requests
-
+.
+\fBDefault\fP: $cadir/requests
.UNINDENT
-
.SS daemonize
+.sp
Send the process into the background. This is the default.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: true
-
+.
+\fBDefault\fP: true
.UNINDENT
-
.SS dbadapter
+.sp
The type of database to use.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: sqlite3
-
+.
+\fBDefault\fP: sqlite3
.UNINDENT
.SS dbconnections
@@ -472,1313 +416,1049 @@ The number of database connections. Only used when networked databases are used.
.SS dblocation
+.sp
The database cache for client configurations. Used for querying within the language.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $statedir/clientconfigs.sqlite3
-
+.
+\fBDefault\fP: $statedir/clientconfigs.sqlite3
.UNINDENT
-
.SS dbmigrate
+.sp
Whether to automatically migrate the database.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS dbname
+.sp
The name of the database to use.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet
-
+.
+\fBDefault\fP: puppet
.UNINDENT
-
.SS dbpassword
+.sp
The database password for Client caching. Only used when networked databases are used.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet
-
+.
+\fBDefault\fP: puppet
.UNINDENT
-
.SS dbserver
+.sp
The database server for Client caching. Only used when networked databases are used.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: localhost
-
+.
+\fBDefault\fP: localhost
.UNINDENT
-
.SS dbsocket
+.sp
The database socket location. Only used when networked databases are used. Will be ignored if the value is an empty string.
-
-
.SS dbuser
+.sp
The database user for Client caching. Only used when networked databases are used.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet
-
+.
+\fBDefault\fP: puppet
.UNINDENT
-
.SS diff
+.sp
Which diff command to use when printing differences between files.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: diff
-
+.
+\fBDefault\fP: diff
.UNINDENT
-
.SS diff_args
+.sp
Which arguments to pass to the diff command when printing differences between files.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: \-u
-
+.
+\fBDefault\fP: \-u
.UNINDENT
-
.SS downcasefacts
+.sp
Whether facts should be made all lowercase when sent to the server.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS dynamicfacts
+.sp
Facts that are dynamic; these facts will be ignored when deciding whether changed facts should result in a recompile. Multiple facts should be comma\-separated.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: memorysize,memoryfree,swapsize,swapfree
-
+.
+\fBDefault\fP: memorysize,memoryfree,swapsize,swapfree
.UNINDENT
-
.SS environment
+.sp
The environment Puppet is running in. For clients (e.g., \fBpuppetd\fP) this determines the environment itself, which is used to find modules and much more. For servers (i.e., \fBpuppetmasterd\fP) this provides the default environment for nodes we know nothing about.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: production
-
+.
+\fBDefault\fP: production
.UNINDENT
-
.SS evaltrace
+.sp
Whether each resource should log when it is being evaluated. This allows you to interactively see exactly what is being done.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS external_nodes
+.sp
An external command that can produce node information. The output must be a YAML dump of a hash, and that hash must have one or both of \fBclasses\fP and \fBparameters\fP, where \fBclasses\fP is an array and \fBparameters\fP is a hash. For unknown nodes, the commands should exit with a non\-zero exit code. This command makes it straightforward to store your node mapping information in other data sources like databases.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: none
-
+.
+\fBDefault\fP: none
.UNINDENT
-
.SS factdest
+.sp
Where Puppet should store facts that it pulls down from the central server.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/facts/
-
+.
+\fBDefault\fP: $vardir/facts/
.UNINDENT
-
.SS factpath
+.sp
Where Puppet should look for facts. Multiple directories should be colon\-separated, like normal PATH variables.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/facts/
-
+.
+\fBDefault\fP: $vardir/facts/
.UNINDENT
-
.SS factsignore
+.sp
What files to ignore when pulling down facts.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: .svn CVS
-
+.
+\fBDefault\fP: .svn CVS
.UNINDENT
-
.SS factsource
+.sp
From where to retrieve facts. The standard Puppet \fBfile\fP type is used for retrieval, so anything that is a valid file source can be used here.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet://$server/facts/
-
+.
+\fBDefault\fP: puppet://$server/facts/
.UNINDENT
-
.SS factsync
+.sp
Whether facts should be synced with the central server.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS fileserverconfig
+.sp
Where the fileserver configuration is stored.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/fileserver.conf
-
+.
+\fBDefault\fP: $confdir/fileserver.conf
.UNINDENT
-
.SS filetimeout
+.sp
The minimum time to wait (in seconds) between checking for updates in configuration files. This timeout determines how quickly Puppet checks whether a file (such as manifests or templates) has changed on disk.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 15
-
+.
+\fBDefault\fP: 15
.UNINDENT
-
.SS genconfig
+.sp
Whether to just print a configuration to stdout and exit. Only makes sense when used interactively. Takes into account arguments specified on the CLI.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS genmanifest
+.sp
Whether to just print a manifest to stdout and exit. Only makes sense when used interactively. Takes into account arguments specified on the CLI.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS graph
+.sp
Whether to create dot graph files for the different configuration graphs. These dot files can be interpreted by tools like OmniGraffle or dot (which is part of ImageMagick).
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS graphdir
+.sp
Where to store dot\-outputted graphs.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $statedir/graphs
-
+.
+\fBDefault\fP: $statedir/graphs
.UNINDENT
-
.SS group
+.sp
The group puppetmasterd should run as.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet
-
+.
+\fBDefault\fP: puppet
.UNINDENT
-
.SS hostcert
+.sp
Where individual hosts store and look for their certificates.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $certdir/$certname.pem
-
+.
+\fBDefault\fP: $certdir/$certname.pem
.UNINDENT
-
.SS hostcrl
-Where the host\'s certificate revocation list can be found. This is distinct from the certificate authority\'s CRL.
-
+.sp
+Where the host\(aqs certificate revocation list can be found. This is distinct from the certificate authority\(aqs CRL.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/crl.pem
-
+.
+\fBDefault\fP: $ssldir/crl.pem
.UNINDENT
-
.SS hostcsr
+.sp
Where individual hosts store and look for their certificate requests.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/csr_$certname.pem
-
+.
+\fBDefault\fP: $ssldir/csr_$certname.pem
.UNINDENT
-
.SS hostprivkey
+.sp
Where individual hosts store and look for their private key.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $privatekeydir/$certname.pem
-
+.
+\fBDefault\fP: $privatekeydir/$certname.pem
.UNINDENT
-
.SS hostpubkey
+.sp
Where individual hosts store and look for their public key.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $publickeydir/$certname.pem
-
+.
+\fBDefault\fP: $publickeydir/$certname.pem
.UNINDENT
-
-.SS http_enable_post_connection_check
-Boolean; wheter or not puppetd should validate the server SSL certificate against the request hostname.
-
-.INDENT 0.0
-
-.IP \(bu 2
-\fPDefault\fP: true
-
-.UNINDENT
-
.SS http_proxy_host
+.sp
The HTTP proxy host to use for outgoing connections. Note: You may need to use a FQDN for the server hostname when using a proxy.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: none
-
+.
+\fBDefault\fP: none
.UNINDENT
-
.SS http_proxy_port
+.sp
The HTTP proxy port to use for outgoing connections
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 3128
-
+.
+\fBDefault\fP: 3128
.UNINDENT
-
.SS httplog
+.sp
Where the puppetd web server logs.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $logdir/http.log
-
+.
+\fBDefault\fP: $logdir/http.log
.UNINDENT
-
.SS ignorecache
+.sp
Ignore cache and always recompile the configuration. This is useful for testing new configurations, where the local cache may in fact be stale even if the timestamps are up to date \- if the facts change or if the server changes.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS ignoreimport
+.sp
A parameter that can be used in commit hooks, since it enables you to parse\-check a single file rather than requiring that all files exist.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS ignoreschedules
+.sp
Boolean; whether puppetd should ignore schedules. This is useful for initial puppetd runs.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS keylength
+.sp
The bit length of keys.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 1024
-
+.
+\fBDefault\fP: 1024
.UNINDENT
-
.SS ldapattrs
-The LDAP attributes to include when querying LDAP for nodes. All returned attributes are set as variables in the top\-level scope. Multiple values should be comma\-separated. The value \'all\' returns all attributes.
-
+.sp
+The LDAP attributes to include when querying LDAP for nodes. All returned attributes are set as variables in the top\-level scope. Multiple values should be comma\-separated. The value \(aqall\(aq returns all attributes.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: all
-
+.
+\fBDefault\fP: all
.UNINDENT
-
.SS ldapbase
-The search base for LDAP searches. It\'s impossible to provide a meaningful default here, although the LDAP libraries might have one already set. Generally, it should be the \'ou=Hosts\' branch under your main directory.
-
-
+.sp
+The search base for LDAP searches. It\(aqs impossible to provide a meaningful default here, although the LDAP libraries might have one already set. Generally, it should be the \(aqou=Hosts\(aq branch under your main directory.
.SS ldapclassattrs
+.sp
The LDAP attributes to use to define Puppet classes. Values should be comma\-separated.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppetclass
-
+.
+\fBDefault\fP: puppetclass
.UNINDENT
-
.SS ldapnodes
+.sp
Whether to search for node configurations in LDAP. See \fI\%http://reductivelabs.com/trac/puppet/wiki/LDAPNodes\fP for more information.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS ldapparentattr
+.sp
The attribute to use to define the parent node.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: parentnode
-
+.
+\fBDefault\fP: parentnode
.UNINDENT
-
.SS ldappassword
+.sp
The password to use to connect to LDAP.
-
-
.SS ldapport
+.sp
The LDAP port. Only used if \fBldapnodes\fP is enabled.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 389
-
+.
+\fBDefault\fP: 389
.UNINDENT
-
.SS ldapserver
+.sp
The LDAP server. Only used if \fBldapnodes\fP is enabled.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: ldap
-
+.
+\fBDefault\fP: ldap
.UNINDENT
-
.SS ldapssl
+.sp
Whether SSL should be used when searching for nodes. Defaults to false because SSL usually requires certificates to be set up on the client side.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS ldapstackedattrs
+.sp
The LDAP attributes that should be stacked to arrays by adding the values in all hierarchy elements of the tree. Values should be comma\-separated.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppetvar
-
+.
+\fBDefault\fP: puppetvar
.UNINDENT
-
.SS ldapstring
+.sp
The search string used to find an LDAP node.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: (&(objectclass=puppetClient)(cn=%s))
-
+.
+\fBDefault\fP: (&(objectclass=puppetClient)(cn=%s))
.UNINDENT
-
.SS ldaptls
+.sp
Whether TLS should be used when searching for nodes. Defaults to false because TLS usually requires certificates to be set up on the client side.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS ldapuser
+.sp
The user to use to connect to LDAP. Must be specified as a full DN.
-
-
.SS lexical
+.sp
Whether to use lexical scoping (vs. dynamic).
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS libdir
-An extra search path for Puppet. This is only useful for those files that Puppet will load on demand, and is only guaranteed to work for those cases. In fact, the autoload mechanism is responsible for making sure this directory is in Ruby\'s search path
-
+.sp
+An extra search path for Puppet. This is only useful for those files that Puppet will load on demand, and is only guaranteed to work for those cases. In fact, the autoload mechanism is responsible for making sure this directory is in Ruby\(aqs search path
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/lib
-
+.
+\fBDefault\fP: $vardir/lib
.UNINDENT
-
.SS listen
+.sp
Whether puppetd should listen for connections. If this is true, then by default only the \fBrunner\fP server is started, which allows remote authorized and authenticated nodes to connect and trigger \fBpuppetd\fP runs.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS localcacert
+.sp
Where each client stores the CA certificate.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $certdir/ca.pem
-
+.
+\fBDefault\fP: $certdir/ca.pem
.UNINDENT
-
.SS localconfig
+.sp
Where puppetd caches the local configuration. An extension indicating the cache format is added automatically.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $statedir/localconfig
-
+.
+\fBDefault\fP: $statedir/localconfig
.UNINDENT
-
.SS logdir
+.sp
The Puppet log directory.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/log
-
+.
+\fBDefault\fP: $vardir/log
.UNINDENT
-
.SS manage_internal_file_permissions
+.sp
Whether Puppet should manage the owner, group, and mode of files it uses internally
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: true
-
+.
+\fBDefault\fP: true
.UNINDENT
-
.SS manifest
+.sp
The entry\-point manifest for puppetmasterd.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $manifestdir/site.pp
-
+.
+\fBDefault\fP: $manifestdir/site.pp
.UNINDENT
-
.SS manifestdir
+.sp
Where puppetmasterd looks for its manifests.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/manifests
-
+.
+\fBDefault\fP: $confdir/manifests
.UNINDENT
-
.SS masterhttplog
+.sp
Where the puppetmasterd web server logs.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $logdir/masterhttp.log
-
+.
+\fBDefault\fP: $logdir/masterhttp.log
.UNINDENT
-
.SS masterlog
+.sp
Where puppetmasterd logs. This is generally not used, since syslog is the default log destination.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $logdir/puppetmaster.log
-
+.
+\fBDefault\fP: $logdir/puppetmaster.log
.UNINDENT
-
.SS masterport
+.sp
Which port puppetmasterd listens on.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 8140
-
+.
+\fBDefault\fP: 8140
.UNINDENT
-
.SS maximum_uid
+.sp
The maximum allowed UID. Some platforms use negative UIDs but then ship with tools that do not know how to handle signed ints, so the UIDs show up as huge numbers that can then not be fed back into the system. This is a hackish way to fail in a slightly more useful way when that happens.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 4294967290
-
+.
+\fBDefault\fP: 4294967290
.UNINDENT
-
.SS mkusers
+.sp
Whether to create the necessary user and group that puppetd will run as.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS modulepath
+.sp
The search path for modules as a colon\-separated list of directories.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/modules:/usr/share/puppet/modules
-
+.
+\fBDefault\fP: $confdir/modules:/usr/share/puppet/modules
.UNINDENT
-
.SS name
+.sp
The name of the service, if we are running as one. The default is essentially $0 without the path or \fB.rb\fP.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppetdoc
-
+.
+\fBDefault\fP: puppetdoc
.UNINDENT
-
.SS node_name
-How the puppetmaster determines the client\'s identity and sets the \'hostname\', \'fqdn\' and \'domain\' facts for use in the manifest, in particular for determining which \'node\' statement applies to the client. Possible values are \'cert\' (use the subject\'s CN in the client\'s certificate) and \'facter\' (use the hostname that the client reported in its facts)
-
+.sp
+How the puppetmaster determines the client\(aqs identity and sets the \(aqhostname\(aq, \(aqfqdn\(aq and \(aqdomain\(aq facts for use in the manifest, in particular for determining which \(aqnode\(aq statement applies to the client. Possible values are \(aqcert\(aq (use the subject\(aqs CN in the client\(aqs certificate) and \(aqfacter\(aq (use the hostname that the client reported in its facts)
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: cert
-
+.
+\fBDefault\fP: cert
.UNINDENT
-
.SS node_terminus
+.sp
Where to find information about nodes.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: plain
-
+.
+\fBDefault\fP: plain
.UNINDENT
-
.SS noop
+.sp
Whether puppetd should be run in noop mode.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS paramcheck
+.sp
Whether to validate parameters during parsing.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: true
-
+.
+\fBDefault\fP: true
.UNINDENT
-
.SS parseonly
+.sp
Just check the syntax of the manifests.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS passfile
+.sp
Where puppetd stores the password for its private key. Generally unused.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $privatedir/password
-
+.
+\fBDefault\fP: $privatedir/password
.UNINDENT
-
.SS path
+.sp
The shell search path. Defaults to whatever is inherited from the parent process.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: none
-
+.
+\fBDefault\fP: none
.UNINDENT
-
.SS pidfile
+.sp
The pid file
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $rundir/$name.pid
-
+.
+\fBDefault\fP: $rundir/$name.pid
.UNINDENT
-
.SS plugindest
+.sp
Where Puppet should store plugins that it pulls down from the central server.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $libdir
-
+.
+\fBDefault\fP: $libdir
.UNINDENT
-
.SS pluginsignore
+.sp
What files to ignore when pulling down plugins.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: .svn CVS .git
-
+.
+\fBDefault\fP: .svn CVS .git
.UNINDENT
-
.SS pluginsource
+.sp
From where to retrieve plugins. The standard Puppet \fBfile\fP type is used for retrieval, so anything that is a valid file source can be used here.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet://$server/plugins
-
+.
+\fBDefault\fP: puppet://$server/plugins
.UNINDENT
-
.SS pluginsync
+.sp
Whether plugins should be synced with the central server.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
+.SS postrun_command
+.sp
+A command to run after every agent run. If this command returns a non\-zero return code, the entire Puppet run will be considered to have failed, even though it might have performed work during the normal run.
.SS preferred_serialization_format
-The preferred means of serializing ruby instances for passing over the wire. This won\'t guarantee that all instances will be serialized using this method, since not all classes can be guaranteed to support this format, but it will be used for all classes that support it.
-
+.sp
+The preferred means of serializing ruby instances for passing over the wire. This won\(aqt guarantee that all instances will be serialized using this method, since not all classes can be guaranteed to support this format, but it will be used for all classes that support it.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: pson
-
+.
+\fBDefault\fP: pson
.UNINDENT
-
+.SS prerun_command
+.sp
+A command to run before every agent run. If this command returns a non\-zero return code, the entire Puppet run will fail.
.SS privatedir
+.sp
Where the client stores private certificate information.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/private
-
+.
+\fBDefault\fP: $ssldir/private
.UNINDENT
-
.SS privatekeydir
+.sp
The private key directory.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/private_keys
-
+.
+\fBDefault\fP: $ssldir/private_keys
.UNINDENT
-
.SS publickeydir
+.sp
The public key directory.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/public_keys
-
+.
+\fBDefault\fP: $ssldir/public_keys
.UNINDENT
-
.SS puppetdlockfile
+.sp
A lock file to temporarily stop puppetd from doing anything.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $statedir/puppetdlock
-
+.
+\fBDefault\fP: $statedir/puppetdlock
.UNINDENT
-
.SS puppetdlog
+.sp
The log file for puppetd. This is generally not used.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $logdir/puppetd.log
-
+.
+\fBDefault\fP: $logdir/puppetd.log
.UNINDENT
-
.SS puppetport
+.sp
Which port puppetd listens on.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 8139
-
+.
+\fBDefault\fP: 8139
.UNINDENT
-
.SS queue_source
+.sp
Which type of queue to use for asynchronous processing. If your stomp server requires authentication, you can include it in the URI as long as your stomp client library is at least 1.1.1
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: stomp://localhost:61613/
-
+.
+\fBDefault\fP: stomp://localhost:61613/
.UNINDENT
-
.SS queue_type
+.sp
Which type of queue to use for asynchronous processing.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: stomp
-
+.
+\fBDefault\fP: stomp
.UNINDENT
-
.SS rails_loglevel
+.sp
The log level for Rails connections. The value must be a valid log level within Rails. Production environments normally use \fBinfo\fP and other environments normally use \fBdebug\fP.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: info
-
+.
+\fBDefault\fP: info
.UNINDENT
-
.SS railslog
+.sp
Where Rails\-specific logs are sent
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $logdir/rails.log
-
+.
+\fBDefault\fP: $logdir/rails.log
.UNINDENT
-
.SS report
+.sp
Whether to send reports after every transaction.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS report_port
+.sp
The port to communicate with the report_server.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $masterport
-
+.
+\fBDefault\fP: $masterport
.UNINDENT
-
.SS report_server
+.sp
The server to which to send transaction reports.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $server
-
+.
+\fBDefault\fP: $server
.UNINDENT
-
.SS reportdir
+.sp
The directory in which to store reports received from the client. Each client gets a separate subdirectory.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/reports
-
+.
+\fBDefault\fP: $vardir/reports
.UNINDENT
-
.SS reportfrom
-The \'from\' email address for the reports.
-
+.sp
+The \(aqfrom\(aq email address for the reports.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: \fI\%report@pelin.lovedthanlost.net\fP
-
+.
+\fBDefault\fP: \fI\%report@absinthe.lovedthanlost.net\fP
.UNINDENT
-
.SS reports
+.sp
The list of reports to generate. All reports are looked for in puppet/reports/<name>.rb, and multiple report names should be comma\-separated (whitespace is okay).
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: store
-
+.
+\fBDefault\fP: store
.UNINDENT
-
.SS reportserver
-(Deprecated for \'report_server\') The server to which to send transaction reports.
-
+.sp
+(Deprecated for \(aqreport_server\(aq) The server to which to send transaction reports.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $server
-
+.
+\fBDefault\fP: $server
.UNINDENT
-
.SS req_bits
+.sp
The bit length of the certificates.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 2048
-
+.
+\fBDefault\fP: 2048
.UNINDENT
-
.SS requestdir
+.sp
Where host certificate requests are stored.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $ssldir/certificate_requests
-
+.
+\fBDefault\fP: $ssldir/certificate_requests
.UNINDENT
-
.SS rest_authconfig
+.sp
The configuration file that defines the rights to the different rest indirections. This can be used as a fine\-grained authorization system for \fBpuppetmasterd\fP.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/auth.conf
-
+.
+\fBDefault\fP: $confdir/auth.conf
.UNINDENT
-
.SS rrddir
+.sp
The directory where RRD database files are stored. Directories for each reporting host will be created under this directory.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/rrd
-
+.
+\fBDefault\fP: $vardir/rrd
.UNINDENT
-
.SS rrdinterval
+.sp
How often RRD should expect data. This should match how often the hosts report back to the server.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $runinterval
-
+.
+\fBDefault\fP: $runinterval
.UNINDENT
-
.SS rundir
+.sp
Where Puppet PID files are kept.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/run
-
+.
+\fBDefault\fP: $vardir/run
.UNINDENT
-
.SS runinterval
+.sp
How often puppetd applies the client configuration; in seconds.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: 1800
-
+.
+\fBDefault\fP: 1800
.UNINDENT
-
.SS sendmail
+.sp
Where to find the sendmail binary with which to send email.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: /usr/sbin/sendmail
-
+.
+\fBDefault\fP: /usr/sbin/sendmail
.UNINDENT
-
.SS serial
+.sp
Where the serial number for certificates is stored.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/serial
-
+.
+\fBDefault\fP: $cadir/serial
.UNINDENT
-
.SS server
+.sp
The server to which server puppetd should connect
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet
-
+.
+\fBDefault\fP: puppet
.UNINDENT
-
.SS servertype
+.sp
The type of server to use. Currently supported options are webrick and mongrel. If you use mongrel, you will need a proxy in front of the process or processes, since Mongrel cannot speak SSL.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: webrick
-
+.
+\fBDefault\fP: webrick
.UNINDENT
-
.SS show_diff
+.sp
Whether to print a contextual diff when files are being replaced. The diff is printed on stdout, so this option is meaningless unless you are running Puppet interactively. This feature currently requires the \fBdiff/lcs\fP Ruby library.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS signeddir
+.sp
Where the CA stores signed certificates.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $cadir/signed
-
+.
+\fBDefault\fP: $cadir/signed
.UNINDENT
-
.SS smtpserver
+.sp
The server through which to send email reports.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: none
-
+.
+\fBDefault\fP: none
.UNINDENT
-
.SS splay
+.sp
Whether to sleep for a pseudo\-random (but consistent) amount of time before a run.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS splaylimit
+.sp
The maximum time to delay before runs. Defaults to being the same as the run interval.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $runinterval
-
+.
+\fBDefault\fP: $runinterval
.UNINDENT
-
.SS ssl_client_header
-The header containing an authenticated client\'s SSL DN. Only used with Mongrel. This header must be set by the proxy to the authenticated client\'s SSL DN (e.g., \fB/CN=puppet.reductivelabs.com\fP). See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
-
+.sp
+The header containing an authenticated client\(aqs SSL DN. Only used with Mongrel. This header must be set by the proxy to the authenticated client\(aqs SSL DN (e.g., \fB/CN=puppet.reductivelabs.com\fP). See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: HTTP_X_CLIENT_DN
-
+.
+\fBDefault\fP: HTTP_X_CLIENT_DN
.UNINDENT
-
.SS ssl_client_verify_header
-The header containing the status message of the client verification. Only used with Mongrel. This header must be set by the proxy to \'SUCCESS\' if the client successfully authenticated, and anything else otherwise. See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
-
+.sp
+The header containing the status message of the client verification. Only used with Mongrel. This header must be set by the proxy to \(aqSUCCESS\(aq if the client successfully authenticated, and anything else otherwise. See \fI\%http://reductivelabs.com/puppet/trac/wiki/UsingMongrel\fP for more information.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: HTTP_X_CLIENT_VERIFY
-
+.
+\fBDefault\fP: HTTP_X_CLIENT_VERIFY
.UNINDENT
-
.SS ssldir
+.sp
Where SSL certificates are kept.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/ssl
-
+.
+\fBDefault\fP: $confdir/ssl
.UNINDENT
-
.SS statedir
+.sp
The directory where Puppet state is stored. Generally, this directory can be removed without causing harm (although it might result in spurious service restarts).
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/state
-
+.
+\fBDefault\fP: $vardir/state
.UNINDENT
-
.SS statefile
+.sp
Where puppetd and puppetmasterd store state associated with the running configuration. In the case of puppetmasterd, this file reflects the state discovered through interacting with clients.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $statedir/state.yaml
-
+.
+\fBDefault\fP: $statedir/state.yaml
.UNINDENT
-
.SS storeconfigs
-Whether to store each client\'s configuration. This requires ActiveRecord from Ruby on Rails.
-
+.sp
+Whether to store each client\(aqs configuration. This requires ActiveRecord from Ruby on Rails.
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS strict_hostname_checking
+.sp
Whether to only search for the complete hostname as it is in the certificate when searching for node information in the catalogs.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS summarize
+.sp
Whether to print a transaction summary.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS syslogfacility
+.sp
What syslog facility to use when logging to syslog. Syslog has a fixed list of valid facilities, and you must choose one of those; you cannot just make one up.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: daemon
-
+.
+\fBDefault\fP: daemon
.UNINDENT
-
.SS tagmap
+.sp
The mapping between reporting tags and email addresses.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $confdir/tagmail.conf
-
+.
+\fBDefault\fP: $confdir/tagmail.conf
.UNINDENT
-
.SS tags
+.sp
Tags to use to find resources. If this is set, then only resources tagged with the specified tags will be applied. Values must be comma\-separated.
-
-
.SS templatedir
+.sp
Where Puppet looks for template files. Can be a list of colon\-seperated directories.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/templates
-
+.
+\fBDefault\fP: $vardir/templates
.UNINDENT
-
.SS thin_storeconfigs
+.sp
Boolean; wether storeconfigs store in the database only the facts and exported resources. If true, then storeconfigs performance will be higher and still allow exported/collected resources, but other usage external to Puppet might not work
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS trace
+.sp
Whether to print stack traces on some errors
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: false
-
+.
+\fBDefault\fP: false
.UNINDENT
-
.SS typecheck
+.sp
Whether to validate types during parsing.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: true
-
+.
+\fBDefault\fP: true
.UNINDENT
-
.SS usecacheonfailure
+.sp
Whether to use the cached configuration when the remote configuration will not compile. This option is useful for testing new configurations, where you want to fix the broken configuration rather than reverting to a known\-good one.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: true
-
+.
+\fBDefault\fP: true
.UNINDENT
-
.SS user
+.sp
The user puppetmasterd should run as.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: puppet
-
+.
+\fBDefault\fP: puppet
.UNINDENT
-
.SS vardir
+.sp
Where Puppet stores dynamic and growing data. The default for this parameter is calculated specially, like \fI\%confdir\fP.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: /var/puppet
-
+.
+\fBDefault\fP: /var/puppet
.UNINDENT
-
.SS yamldir
+.sp
The directory in which YAML data is stored, usually in a subdirectory.
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: $vardir/yaml
-
+.
+\fBDefault\fP: $vardir/yaml
.UNINDENT
-
.SS zlib
+.sp
Boolean; whether to use the zlib library
-
.INDENT 0.0
-
.IP \(bu 2
-\fPDefault\fP: true
-
+.
+\fBDefault\fP: true
.UNINDENT
.sp
@@ -1787,8 +1467,8 @@ Boolean; whether to use the zlib library
.ce 0
.sp
-\fIThis page autogenerated on Wed Dec 30 19:31:12 \-0500 2009\fP
-
-
-.\" Generated by docutils manpage writer on 2009-12-30 19:31.
+.sp
+\fIThis page autogenerated on Mon Feb 08 23:57:07 +1100 2010\fP
+.\" Generated by docutils manpage writer.
.\"
+.
diff --git a/man/man8/filebucket.8 b/man/man8/filebucket.8
index 3d4d15978..de2dee733 100644
--- a/man/man8/filebucket.8
+++ b/man/man8/filebucket.8
@@ -2,120 +2,106 @@
.SH NAME
\-
.\" Man page generated from reStructeredText.
-
+.
.SH SYNOPSIS
+.sp
A stand\-alone Puppet filebucket client.
-
-
.SH USAGE
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
-
.TP
.B filebucket [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose]
+.
[\-l|\-\-local] [\-r|\-\-remote]
[\-s|\-\-server <server>] [\-b|\-\-bucket <directory>] <file> <file> ...
-
.UNINDENT
.UNINDENT
.UNINDENT
-
.SH DESCRIPTION
+.sp
This is a stand\-alone filebucket client for sending files to a local or
central filebucket.
-
-
.SH USAGE
+.sp
This client can operate in three modes, with only one mode per call:
-
.INDENT 0.0
-
.TP
.B backup: Send one or more files to the specified file bucket. Each sent
+.
file is printed with its resulting md5 sum.
-
-
.TP
.B get: Return the text associated with an md5 sum. The text is printed
+.
to stdout, and only one file can be retrieved at a time.
-
-
.TP
.B restore: Given a file path and an md5 sum, store the content associated
+.
with the sum into the specified file path. You can specify an
entirely new path to this argument; you are not restricted to
restoring the content to its original location.
-
.UNINDENT
+.sp
Note that +filebucket+ defaults to using a network\-based filebucket
-available on the server named +puppet+. To use this, you\'ll have to be
+available on the server named +puppet+. To use this, you\(aqll have to be
running as a user with valid Puppet certificates. Alternatively, you can
use your local file bucket by specifying +\-\-local+.
-
-
.SH EXAMPLE
.INDENT 0.0
.INDENT 3.5
+.sp
$ filebucket backup /etc/passwd
/etc/passwd: 429b225650b912a2ee067b0a4cf1e949
$ filebucket restore /tmp/passwd 429b225650b912a2ee067b0a4cf1e949
$
-
.UNINDENT
.UNINDENT
-
.SH OPTIONS
-Note that any configuration parameter that\'s valid in the configuration
-file is also a valid long argument. For example, \'ssldir\' is a valid
-configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+.sp
+Note that any configuration parameter that\(aqs valid in the configuration
+file is also a valid long argument. For example, \(aqssldir\(aq is a valid
+configuration parameter, so you can specify \(aq\-\-ssldir <directory>\(aq as an
argument.
-
+.sp
See the configuration file documentation at
\fI\%http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference\fP for the
full list of acceptable parameters. A commented list of all
configuration options can also be generated by running puppet with
-\'\-\-genconfig\'.
-
+\(aq\-\-genconfig\(aq.
+.sp
debug: Enable full debugging.
-
+.sp
help: Print this help message
-
.INDENT 0.0
-
.TP
.B local: Use the local filebucket. This will use the default
+.
configuration information.
-
-
.TP
.B remote: Use a remote filebucket. This will use the default
+.
configuration information.
-
.UNINDENT
+.sp
server: The server to send the file to, instead of locally.
-
+.sp
verbose: Print extra information.
-
+.sp
version: Print version information.
-
-
.SH EXAMPLE
.INDENT 0.0
.INDENT 3.5
+.sp
filebucket \-b /tmp/filebucket /my/file
-
.UNINDENT
.UNINDENT
-
.SH AUTHOR
+.sp
Luke Kanies
-
-
.SH COPYRIGHT
+.sp
Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
License
-
-
-.\" Generated by docutils manpage writer on 2009-12-30 19:24.
+.\" Generated by docutils manpage writer.
.\"
+.
diff --git a/man/man8/pi.8 b/man/man8/pi.8
index 582c70e7b..519be2ca9 100644
--- a/man/man8/pi.8
+++ b/man/man8/pi.8
@@ -2,55 +2,49 @@
.SH NAME
\-
.\" Man page generated from reStructeredText.
-
+.
.SH SYNOPSIS
-Print help about puppet types on the console. Run with \'\-h\' to get
+.sp
+Print help about puppet types on the console. Run with \(aq\-h\(aq to get
detailed help.
-
-
.SH USAGE
.INDENT 0.0
.INDENT 3.5
+.sp
pi [\-h|\-\-help] [\-s|\-\-short] [\-p|\-\-providers] [\-l|\-\-list] [\-m|\-\-meta]
-
.UNINDENT
.UNINDENT
-
.SH DESCRIPTION
+.sp
Prints details of Puppet types, providers and metaparameters on the
console.
-
-
.SH OPTIONS
+.sp
help: Print this help text
-
+.sp
providers: Describe providers in detail for each type
-
+.sp
list: List all types
-
+.sp
meta: List all metaparameters
-
+.sp
short: List only parameters without detail
-
-
.SH EXAMPLE
.INDENT 0.0
.INDENT 3.5
+.sp
pi \-\-list
pi file \-\-providers
pi user \-s \-m
-
.UNINDENT
.UNINDENT
-
.SH AUTHOR
+.sp
David Lutterkort
-
-
.SH COPYRIGHT
+.sp
Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
License
-
-
-.\" Generated by docutils manpage writer on 2009-12-30 19:24.
+.\" Generated by docutils manpage writer.
.\"
+.
diff --git a/man/man8/puppet.8 b/man/man8/puppet.8
index 629fc9969..02176ce81 100644
--- a/man/man8/puppet.8
+++ b/man/man8/puppet.8
@@ -2,91 +2,81 @@
.SH NAME
\-
.\" Man page generated from reStructeredText.
-
+.
.SH SYNOPSIS
+.sp
Run a stand\-alone +puppet+ manifest.
-
-
.SH USAGE
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
-
.TP
.B puppet [\-h|\-\-help] [\-V|\-\-version] [\-d|\-\-debug] [\-v|\-\-verbose] [\-e|\-\-execute]
+.
[\-\-detailed\-exitcodes] [\-l|\-\-logdest <file>] <file>
-
.UNINDENT
.UNINDENT
.UNINDENT
-
.SH DESCRIPTION
+.sp
This is the standalone puppet execution tool; use it to execute
individual manifests that you write. If you need to execute site\-wide
manifests, use +puppetd+ and +puppetmasterd+.
-
-
.SH OPTIONS
-Note that any configuration parameter that\'s valid in the configuration
-file is also a valid long argument. For example, \'ssldir\' is a valid
-configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+.sp
+Note that any configuration parameter that\(aqs valid in the configuration
+file is also a valid long argument. For example, \(aqssldir\(aq is a valid
+configuration parameter, so you can specify \(aq\-\-ssldir <directory>\(aq as an
argument.
-
+.sp
See the configuration file documentation at
\fI\%http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference\fP for the
full list of acceptable parameters. A commented list of all
configuration options can also be generated by running puppet with
-\'\-\-genconfig\'.
-
+\(aq\-\-genconfig\(aq.
+.sp
debug: Enable full debugging.
-
.INDENT 0.0
-
.TP
.B detailed\-exitcodes: Provide transaction information via exit codes. If
-this is enabled, an exit code of \'2\' means there
-were changes, and an exit code of \'4\' means that
+.
+this is enabled, an exit code of \(aq2\(aq means there
+were changes, and an exit code of \(aq4\(aq means that
there were failures during the transaction.
-
.UNINDENT
+.sp
help: Print this help message
-
.INDENT 0.0
-
.TP
.B loadclasses: Load any stored classes. +puppetd+ caches configured
+.
classes (usually at /etc/puppet/classes.txt), and
setting this option causes all of those classes to
be set in your +puppet+ manifest.
-
-
.TP
.B logdest: Where to send messages. Choose between syslog, the
+.
console, and a log file. Defaults to sending
messages to the console.
-
.UNINDENT
+.sp
execute: Execute a specific piece of Puppet code
-
+.sp
verbose: Print extra information.
-
-
.SH EXAMPLE
.INDENT 0.0
.INDENT 3.5
+.sp
puppet \-l /tmp/manifest.log manifest.pp
-
.UNINDENT
.UNINDENT
-
.SH AUTHOR
+.sp
Luke Kanies
-
-
.SH COPYRIGHT
+.sp
Copyright (c) 2005 Reductive Labs, LLC Licensed under the GNU Public
License
-
-
-.\" Generated by docutils manpage writer on 2009-12-30 19:24.
+.\" Generated by docutils manpage writer.
.\"
+.
diff --git a/man/man8/puppetdoc.8 b/man/man8/puppetdoc.8
index e6b6a339e..5cf7269f0 100644
--- a/man/man8/puppetdoc.8
+++ b/man/man8/puppetdoc.8
@@ -2,114 +2,103 @@
.SH NAME
\-
.\" Man page generated from reStructeredText.
-
+.
.SH SYNOPSIS
+.sp
Generate a reference for all Puppet types. Largely meant for internal
Reductive Labs use.
-
-
.SH USAGE
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
-
.TP
.B puppetdoc [\-a|\-\-all] [\-h|\-\-help] [\-o|\-\-outputdir <rdoc outputdir>] [\-m|\-\-mode <text|pdf|markdown|trac|rdoc>]
+.
[\-r|\-\-reference <[type]|configuration|..>] [manifest\-file]
-
.UNINDENT
.UNINDENT
.UNINDENT
-
.SH DESCRIPTION
-If mode is not \'rdoc\', then this command generates a restructured\-text
+.sp
+If mode is not \(aqrdoc\(aq, then this command generates a restructured\-text
document describing all installed Puppet types or all allowable
arguments to puppet executables. It is largely meant for internal use
and is used to generate the reference document available on the
Reductive Labs web site.
-
-In \'rdoc\' mode, this command generates an html RDoc hierarchy describing
-the manifests that are in \'manifestdir\' and \'modulepath\' configuration
+.sp
+In \(aqrdoc\(aq mode, this command generates an html RDoc hierarchy describing
+the manifests that are in \(aqmanifestdir\(aq and \(aqmodulepath\(aq configuration
directives. The generated documentation directory is doc by default but
-can be changed with the \'outputdir\' option.
-
-If the command is started with \'manifest\-file\' command\-line arguments,
+can be changed with the \(aqoutputdir\(aq option.
+.sp
+If the command is started with \(aqmanifest\-file\(aq command\-line arguments,
puppetdoc generate a single manifest documentation that is output on
stdout.
-
-
.SH OPTIONS
.INDENT 0.0
-
.TP
-.B all: Output the docs for all of the reference types. In \'rdoc\'
+.B all: Output the docs for all of the reference types. In \(aqrdoc\(aq
+.
modes, this also outputs documentation for all resources
-
.UNINDENT
+.sp
help: Print this help message
-
.INDENT 0.0
-
.TP
.B outputdir: Specifies the directory where to output the rdoc
-documentation in \'rdoc\' mode.
-
-
+.
+documentation in \(aqrdoc\(aq mode.
.TP
-.B mode: Determine the output mode. Valid modes are \'text\', \'trac\',
-\'pdf\', \'markdown\' and \'rdoc\'. The \'pdf\' and \'markdown\' modes
+.B mode: Determine the output mode. Valid modes are \(aqtext\(aq, \(aqtrac\(aq,
+.
+\(aqpdf\(aq, \(aqmarkdown\(aq and \(aqrdoc\(aq. The \(aqpdf\(aq and \(aqmarkdown\(aq modes
create PDF or Markdown formatted files in the /tmp directory.
-Note that \'trac\' mode only works on Reductive Labs servers.
-The default mode is \'text\'. In \'rdoc\' mode you must provide
-\'manifests\-path\'
-
-
+Note that \(aqtrac\(aq mode only works on Reductive Labs servers.
+The default mode is \(aqtext\(aq. In \(aqrdoc\(aq mode you must provide
+\(aqmanifests\-path\(aq
.TP
.B reference: Build a particular reference. Get a list of references by
+.
running +puppetdoc \-\-list+.
-
.UNINDENT
-
.SH EXAMPLE
.INDENT 0.0
.INDENT 3.5
+.sp
$ puppetdoc \-r type > /tmp/type_reference.rst
-
.UNINDENT
.UNINDENT
+.sp
or
-
.INDENT 0.0
.INDENT 3.5
+.sp
$ puppetdoc \-\-outputdir /tmp/rdoc \-\-mode rdoc /path/to/manifests
-
.UNINDENT
.UNINDENT
+.sp
or
-
.INDENT 0.0
.INDENT 3.5
+.sp
$ puppetdoc /etc/puppet/manifests/site.pp
-
.UNINDENT
.UNINDENT
+.sp
or
-
.INDENT 0.0
.INDENT 3.5
+.sp
$ puppetdoc \-m markdown \-r configuration
-
.UNINDENT
.UNINDENT
-
.SH AUTHOR
+.sp
Luke Kanies
-
-
.SH COPYRIGHT
+.sp
Copyright (c) 2005\-2007 Reductive Labs, LLC Licensed under the GNU
Public License
-
-
-.\" Generated by docutils manpage writer on 2009-12-30 19:24.
+.\" Generated by docutils manpage writer.
.\"
+.
diff --git a/man/man8/ralsh.8 b/man/man8/ralsh.8
index 875f4e15e..98892e0c9 100644
--- a/man/man8/ralsh.8
+++ b/man/man8/ralsh.8
@@ -2,127 +2,122 @@
.SH NAME
\-
.\" Man page generated from reStructeredText.
+.
+.sp
vim: softtabstop=4 shiftwidth=4 expandtab
-
-
.SH SYNOPSIS
+.sp
Use the Puppet RAL to directly interact with the system.
-
-
.SH USAGE
.INDENT 0.0
.INDENT 3.5
.INDENT 0.0
-
.TP
.B ralsh [\-h|\-\-help] [\-d|\-\-debug] [\-v|\-\-verbose] [\-e|\-\-edit] [\-H|\-\-host <host>]
+.
[\-p|\-\-param <param>] [\-t|\-\-types] type <name>
-
.UNINDENT
.UNINDENT
.UNINDENT
-
.SH DESCRIPTION
+.sp
This command provides simple facilities for converting current system
state into Puppet code, along with some ability to use Puppet to affect
the current state.
-
+.sp
By default, you must at least provide a type to list, which case ralsh
will tell you everything it knows about all instances of that type. You
can optionally specify an instance name, and ralsh will only describe
that single instance.
-
+.sp
You can also add +\-\-edit+ as an argument, and ralsh will write its
output to a file, open that file in an editor, and then apply the file
as a Puppet transaction. You can easily use this to use Puppet to make
simple changes to a system.
-
-
.SH OPTIONS
-Note that any configuration parameter that\'s valid in the configuration
-file is also a valid long argument. For example, \'ssldir\' is a valid
-configuration parameter, so you can specify \'\-\-ssldir <directory>\' as an
+.sp
+Note that any configuration parameter that\(aqs valid in the configuration
+file is also a valid long argument. For example, \(aqssldir\(aq is a valid
+configuration parameter, so you can specify \(aq\-\-ssldir <directory>\(aq as an
argument.
-
+.sp
See the configuration file documentation at
\fI\%http://reductivelabs.com/trac/puppet/wiki/ConfigurationReference\fP for the
full list of acceptable parameters. A commented list of all
configuration options can also be generated by running puppet with
-\'\-\-genconfig\'.
-
+\(aq\-\-genconfig\(aq.
+.sp
debug: Enable full debugging.
-
+.sp
edit:
-
.INDENT 0.0
.INDENT 3.5
+.sp
Write the results of the query to a file, open the file in an editor,
and read the file back in as an executable Puppet manifest.
-
.UNINDENT
.UNINDENT
+.sp
host:
-
.INDENT 0.0
.INDENT 3.5
+.sp
When specified, connect to the resource server on the named host
and retrieve the list of resouces of the type specified.
-
.UNINDENT
.UNINDENT
+.sp
help:
-
.INDENT 0.0
.INDENT 3.5
+.sp
Print this help message.
-
.UNINDENT
.UNINDENT
+.sp
param:
-
.INDENT 0.0
.INDENT 3.5
+.sp
Add more parameters to be outputted from queries.
-
.UNINDENT
.UNINDENT
+.sp
types:
-
.INDENT 0.0
.INDENT 3.5
+.sp
List all available types.
-
.UNINDENT
.UNINDENT
+.sp
verbose: Print extra information.
-
-
.SH EXAMPLE
+.sp
This example uses \fBralsh\fP to return Puppet configuration for the user
\fBluke\fP:
-
-
+.sp
.nf
+.ft C
$ ralsh user luke
-user { \'luke\':
- home => \'/home/luke\',
- uid => \'100\',
- ensure => \'present\',
- comment => \'Luke Kanies,,,\',
- gid => \'1000\',
- shell => \'/bin/bash\',
- groups => [\'sysadmin\',\'audio\',\'video\',\'puppet\']
+user { \(aqluke\(aq:
+ home => \(aq/home/luke\(aq,
+ uid => \(aq100\(aq,
+ ensure => \(aqpresent\(aq,
+ comment => \(aqLuke Kanies,,,\(aq,
+ gid => \(aq1000\(aq,
+ shell => \(aq/bin/bash\(aq,
+ groups => [\(aqsysadmin\(aq,\(aqaudio\(aq,\(aqvideo\(aq,\(aqpuppet\(aq]
}
+.ft P
.fi
-
.SH AUTHOR
+.sp
Luke Kanies
-
-
.SH COPYRIGHT
+.sp
Copyright (c) 2005\-2007 Reductive Labs, LLC Licensed under the GNU
Public License
-
-
-.\" Generated by docutils manpage writer on 2009-12-30 19:24.
+.\" Generated by docutils manpage writer.
.\"
+.
diff --git a/spec/integration/bin/puppetmasterd.rb b/spec/integration/bin/puppetmasterd.rb
index 579a42d88..095263570 100755
--- a/spec/integration/bin/puppetmasterd.rb
+++ b/spec/integration/bin/puppetmasterd.rb
@@ -16,6 +16,10 @@ describe "puppetmasterd" do
Puppet[:certdnsnames] = "localhost"
@@port = 12345
+
+ Puppet::SSL::Host.instance_eval{
+ @value_cache = {}
+ }
end
after {
@@ -48,7 +52,7 @@ describe "puppetmasterd" do
f.puts { "notify { testing: }" }
end
- args = arguments + addl_args
+ args = arguments + " " + addl_args
bin = File.join(File.dirname(__FILE__), "..", "..", "..", "sbin", "puppetmasterd")
lib = File.join(File.dirname(__FILE__), "..", "..", "..", "lib")
@@ -56,9 +60,22 @@ describe "puppetmasterd" do
end
def stop
- if @pidfile and FileTest.exist?(@pidfile)
+ if @pidfile and File.exist?(@pidfile)
pid = File.read(@pidfile).chomp.to_i
Process.kill(:TERM, pid)
+ 10.times do
+ break unless File.exist?(@pidfile)
+ sleep 1
+ end
+ begin
+ # sigkill and report if process was still running
+ Process.kill(:KILL, pid)
+
+ raise "Process didn't die from SIGTERM after 10 seconds"
+ rescue Errno::ESRCH
+ # process wasn't running. good.
+ end
+
end
end
@@ -73,16 +90,10 @@ describe "puppetmasterd" do
it "should be serving status information over xmlrpc" do
start
- sleep 5
+ sleep 6
client = Puppet::Network::Client.status.new(:Server => "localhost", :Port => @@port)
- FileUtils.mkdir_p(File.dirname(Puppet[:autosign]))
- File.open(Puppet[:autosign], "w") { |f|
- f.puts Puppet[:certname]
- }
-
- client.cert
retval = client.status
retval.should == 1
diff --git a/spec/integration/defaults.rb b/spec/integration/defaults.rb
index 590be1310..1888813f5 100755
--- a/spec/integration/defaults.rb
+++ b/spec/integration/defaults.rb
@@ -220,4 +220,12 @@ describe "Puppet defaults" do
Puppet.settings[:certname] = "foo"
Puppet.settings[:ca_name].should == "foo"
end
+
+ it "should have a 'prerun_command' that defaults to the empty string" do
+ Puppet.settings[:prerun_command].should == ""
+ end
+
+ it "should have a 'postrun_command' that defaults to the empty string" do
+ Puppet.settings[:postrun_command].should == ""
+ end
end
diff --git a/spec/integration/indirector/certificate/rest.rb b/spec/integration/indirector/certificate/rest.rb
index 9131ac0c7..8042f8680 100755
--- a/spec/integration/indirector/certificate/rest.rb
+++ b/spec/integration/indirector/certificate/rest.rb
@@ -19,7 +19,6 @@ describe "Certificate REST Terminus" do
Puppet.settings[:vardir] = @dir
Puppet.settings[:server] = "127.0.0.1"
Puppet.settings[:masterport] = "34343"
- Puppet.settings[:http_enable_post_connection_check] = false
Puppet::Util::Cacher.expire
diff --git a/spec/integration/indirector/certificate_request/rest.rb b/spec/integration/indirector/certificate_request/rest.rb
index 211188ecc..86fb1ba4a 100755
--- a/spec/integration/indirector/certificate_request/rest.rb
+++ b/spec/integration/indirector/certificate_request/rest.rb
@@ -21,7 +21,6 @@ describe "Certificate Request REST Terminus" do
Puppet.settings[:vardir] = @dir
Puppet.settings[:server] = "127.0.0.1"
Puppet.settings[:masterport] = "34343"
- Puppet.settings[:http_enable_post_connection_check] = false
Puppet[:servertype] = 'webrick'
Puppet[:server] = '127.0.0.1'
diff --git a/spec/integration/indirector/certificate_revocation_list/rest.rb b/spec/integration/indirector/certificate_revocation_list/rest.rb
index 1295dd22b..8c8d6e113 100755
--- a/spec/integration/indirector/certificate_revocation_list/rest.rb
+++ b/spec/integration/indirector/certificate_revocation_list/rest.rb
@@ -19,7 +19,6 @@ describe "Certificate REST Terminus" do
Puppet.settings[:vardir] = @dir
Puppet.settings[:server] = "127.0.0.1"
Puppet.settings[:masterport] = "34343"
- Puppet.settings[:http_enable_post_connection_check] = false
Puppet::Util::Cacher.expire
diff --git a/spec/integration/indirector/report/rest.rb b/spec/integration/indirector/report/rest.rb
index 6525065a7..a3894f9a9 100644
--- a/spec/integration/indirector/report/rest.rb
+++ b/spec/integration/indirector/report/rest.rb
@@ -19,7 +19,6 @@ describe "Report REST Terminus" do
Puppet.settings[:vardir] = @dir
Puppet.settings[:server] = "127.0.0.1"
Puppet.settings[:masterport] = "34343"
- Puppet.settings[:http_enable_post_connection_check] = false
Puppet::Util::Cacher.expire
diff --git a/spec/integration/indirector/rest.rb b/spec/integration/indirector/rest.rb
index 287387ee1..57ace8562 100755
--- a/spec/integration/indirector/rest.rb
+++ b/spec/integration/indirector/rest.rb
@@ -41,7 +41,6 @@ describe Puppet::Indirector::REST do
Puppet.settings[:vardir] = @dir
Puppet.settings[:server] = "127.0.0.1"
Puppet.settings[:masterport] = "34343"
- Puppet.settings[:http_enable_post_connection_check] = false
Puppet::SSL::Host.ca_location = :local
diff --git a/spec/unit/application/puppet.rb b/spec/unit/application/puppet.rb
index be200bb89..1539f0425 100755
--- a/spec/unit/application/puppet.rb
+++ b/spec/unit/application/puppet.rb
@@ -173,6 +173,9 @@ describe "Puppet" do
describe "the main command" do
before :each do
Puppet.stubs(:[])
+ Puppet.settings.stubs(:use)
+ Puppet.stubs(:[]).with(:prerun_command).returns ""
+ Puppet.stubs(:[]).with(:postrun_command).returns ""
Puppet.stubs(:[]).with(:trace).returns(true)
@puppet.options.stubs(:[])
@@ -277,6 +280,16 @@ describe "Puppet" do
@puppet.main
end
+ it "should call the prerun and postrun commands on a Configurer instance" do
+ configurer = stub 'configurer'
+
+ Puppet::Configurer.expects(:new).returns configurer
+ configurer.expects(:execute_prerun_command)
+ configurer.expects(:execute_postrun_command)
+
+ @puppet.main
+ end
+
it "should apply the catalog" do
@catalog.expects(:apply)
diff --git a/spec/unit/configurer.rb b/spec/unit/configurer.rb
index 8a3577c59..03ef188c9 100755
--- a/spec/unit/configurer.rb
+++ b/spec/unit/configurer.rb
@@ -7,6 +7,11 @@ require File.dirname(__FILE__) + '/../spec_helper'
require 'puppet/configurer'
describe Puppet::Configurer do
+ before do
+ Puppet.settings.stubs(:use).returns(true)
+ @agent = Puppet::Configurer.new
+ end
+
it "should include the Plugin Handler module" do
Puppet::Configurer.ancestors.should be_include(Puppet::Configurer::PluginHandler)
end
@@ -19,6 +24,52 @@ describe Puppet::Configurer do
Puppet.settings.expects(:value).with(:puppetdlockfile).returns("/my/lock")
Puppet::Configurer.lockfile_path.should == "/my/lock"
end
+
+ describe "when executing a pre-run hook" do
+ it "should do nothing if the hook is set to an empty string" do
+ Puppet.settings[:prerun_command] = ""
+ Puppet::Util.expects(:exec).never
+
+ @agent.execute_prerun_command
+ end
+
+ it "should execute any pre-run command provided via the 'prerun_command' setting" do
+ Puppet.settings[:prerun_command] = "/my/command"
+ Puppet::Util.expects(:execute).with { |args| args[0] == "/my/command" }
+
+ @agent.execute_prerun_command
+ end
+
+ it "should fail if the command fails" do
+ Puppet.settings[:prerun_command] = "/my/command"
+ Puppet::Util.expects(:execute).raises Puppet::ExecutionFailure
+
+ lambda { @agent.execute_prerun_command }.should raise_error(Puppet::Configurer::CommandHookError)
+ end
+ end
+
+ describe "when executing a post-run hook" do
+ it "should do nothing if the hook is set to an empty string" do
+ Puppet.settings[:postrun_command] = ""
+ Puppet::Util.expects(:exec).never
+
+ @agent.execute_postrun_command
+ end
+
+ it "should execute any post-run command provided via the 'postrun_command' setting" do
+ Puppet.settings[:postrun_command] = "/my/command"
+ Puppet::Util.expects(:execute).with { |args| args[0] == "/my/command" }
+
+ @agent.execute_postrun_command
+ end
+
+ it "should fail if the command fails" do
+ Puppet.settings[:postrun_command] = "/my/command"
+ Puppet::Util.expects(:execute).raises Puppet::ExecutionFailure
+
+ lambda { @agent.execute_postrun_command }.should raise_error(Puppet::Configurer::CommandHookError)
+ end
+ end
end
describe Puppet::Configurer, "when initializing a report" do
@@ -102,6 +153,12 @@ describe Puppet::Configurer, "when executing a catalog run" do
@agent.run
end
+ it "should execute post-run hooks after the run" do
+ @agent.expects(:execute_postrun_command)
+
+ @agent.run
+ end
+
it "should send the report" do
report = stub 'report'
@agent.expects(:initialize_report).returns report
@@ -360,6 +417,9 @@ describe Puppet::Configurer, "when preparing for a run" do
Puppet.settings.stubs(:use).returns(true)
@agent = Puppet::Configurer.new
@agent.stubs(:dostorage)
+ @agent.stubs(:download_fact_plugins)
+ @agent.stubs(:download_plugins)
+ @agent.stubs(:execute_prerun_command)
@facts = {"one" => "two", "three" => "four"}
end
@@ -370,16 +430,19 @@ describe Puppet::Configurer, "when preparing for a run" do
end
it "should download fact plugins" do
- @agent.stubs(:dostorage)
@agent.expects(:download_fact_plugins)
@agent.prepare
end
it "should download plugins" do
- @agent.stubs(:dostorage)
@agent.expects(:download_plugins)
@agent.prepare
end
+
+ it "should perform the pre-run commands" do
+ @agent.expects(:execute_prerun_command)
+ @agent.prepare
+ end
end
diff --git a/spec/unit/network/http_pool.rb b/spec/unit/network/http_pool.rb
index 65f91efa1..7fe55c5fa 100755
--- a/spec/unit/network/http_pool.rb
+++ b/spec/unit/network/http_pool.rb
@@ -36,7 +36,7 @@ describe Puppet::Network::HttpPool do
end
it "should return an http instance created with the passed host and port" do
- http = stub 'http', :use_ssl= => nil, :read_timeout= => nil, :open_timeout= => nil, :enable_post_connection_check= => nil, :started? => false
+ http = stub 'http', :use_ssl= => nil, :read_timeout= => nil, :open_timeout= => nil, :started? => false
Net::HTTP.expects(:new).with("me", 54321, nil, nil).returns(http)
Puppet::Network::HttpPool.http_instance("me", 54321).should equal(http)
end
@@ -53,16 +53,8 @@ describe Puppet::Network::HttpPool do
Puppet::Network::HttpPool.http_instance("me", 54321).open_timeout.should == 120
end
- it "should default to http_enable_post_connection_check being enabled" do
- Puppet.settings[:http_enable_post_connection_check].should be_true
- end
-
- it "should set enable_post_connection_check true " do
- Puppet::Network::HttpPool.http_instance("me", 54321).instance_variable_get("@enable_post_connection_check").should be(Puppet.settings[:http_enable_post_connection_check])
- end
-
it "should create the http instance with the proxy host and port set if the http_proxy is not set to 'none'" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
Puppet::Network::HttpPool.http_instance("me", 54321).open_timeout.should == 120
end
@@ -72,19 +64,19 @@ describe Puppet::Network::HttpPool do
end
it "should cache http instances" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
old = Puppet::Network::HttpPool.http_instance("me", 54321)
Puppet::Network::HttpPool.http_instance("me", 54321).should equal(old)
end
it "should have a mechanism for getting a new http instance instead of the cached instance" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
old = Puppet::Network::HttpPool.http_instance("me", 54321)
Puppet::Network::HttpPool.http_instance("me", 54321, true).should_not equal(old)
end
it "should close existing, open connections when requesting a new connection" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
old = Puppet::Network::HttpPool.http_instance("me", 54321)
old.expects(:started?).returns(true)
old.expects(:finish)
@@ -92,7 +84,7 @@ describe Puppet::Network::HttpPool do
end
it "should have a mechanism for clearing the http cache" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
old = Puppet::Network::HttpPool.http_instance("me", 54321)
Puppet::Network::HttpPool.http_instance("me", 54321).should equal(old)
old = Puppet::Network::HttpPool.http_instance("me", 54321)
@@ -101,7 +93,7 @@ describe Puppet::Network::HttpPool do
end
it "should close open http connections when clearing the cache" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
one = Puppet::Network::HttpPool.http_instance("me", 54321)
one.expects(:started?).returns(true)
one.expects(:finish).returns(true)
@@ -109,7 +101,7 @@ describe Puppet::Network::HttpPool do
end
it "should not close unopened http connections when clearing the cache" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
one = Puppet::Network::HttpPool.http_instance("me", 54321)
one.expects(:started?).returns(false)
one.expects(:finish).never
@@ -123,7 +115,7 @@ describe Puppet::Network::HttpPool do
end
it "should not cache http instances" do
- stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120, :http_enable_post_connection_check => true
+ stub_settings :http_proxy_host => "myhost", :http_proxy_port => 432, :configtimeout => 120
old = Puppet::Network::HttpPool.http_instance("me", 54321)
Puppet::Network::HttpPool.http_instance("me", 54321).should_not equal(old)
end
diff --git a/spec/unit/provider/augeas/augeas.rb b/spec/unit/provider/augeas/augeas.rb
index 3b9bd2c95..89d3f503b 100644
--- a/spec/unit/provider/augeas/augeas.rb
+++ b/spec/unit/provider/augeas/augeas.rb
@@ -204,6 +204,16 @@ describe provider_class do
@provider.process_match(command).should == false
end
+ it "should return true for includes match" do
+ command = ["match", "fake value", "not_include JarJar"]
+ @provider.process_match(command).should == true
+ end
+
+ it "should return false for includes non match" do
+ command = ["match", "fake value", "not_include values"]
+ @provider.process_match(command).should == false
+ end
+
it "should return true for an array match" do
command = ["match", "fake value", "== ['set', 'of', 'values']"]
@provider.process_match(command).should == true
diff --git a/spec/unit/provider/cron/crontab.rb b/spec/unit/provider/cron/crontab.rb
deleted file mode 100755
index 5904a58b7..000000000
--- a/spec/unit/provider/cron/crontab.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env ruby
-
-Dir.chdir(File.dirname(__FILE__)) { (s = lambda { |f| File.exist?(f) ? require(f) : Dir.chdir("..") { s.call(f) } }).call("spec/spec_helper.rb") }
-
-describe Puppet::Type.type(:cron).provider(:crontab) do
- before :each do
- @cron_type = Puppet::Type.type(:cron)
- @provider = @cron_type.provider(:crontab)
- end
-
- it "should round-trip the name as a comment for @special events" do
- parse = @provider.parse <<-CRON
-# Puppet Name: test
-@reboot /bin/echo > /tmp/puppet.txt
- CRON
- prefetch = @provider.prefetch_hook(parse)
-
- @provider.to_line(prefetch[0]).should =~ /Puppet Name: test/
- end
-
-end
diff --git a/spec/unit/provider/sshkey/parsed.rb b/spec/unit/provider/sshkey/parsed.rb
index c97656fbd..fc6c85dbd 100755
--- a/spec/unit/provider/sshkey/parsed.rb
+++ b/spec/unit/provider/sshkey/parsed.rb
@@ -8,12 +8,31 @@ describe provider_class do
before do
@sshkey_class = Puppet::Type.type(:sshkey)
@provider_class = @sshkey_class.provider(:parsed)
+ @key = 'AAAAB3NzaC1yc2EAAAABIwAAAQEAzwHhxXvIrtfIwrudFqc8yQcIfMudrgpnuh1F3AV6d2BrLgu/yQE7W5UyJMUjfj427sQudRwKW45O0Jsnr33F4mUw+GIMlAAmp9g24/OcrTiB8ZUKIjoPy/cO4coxGi8/NECtRzpD/ZUPFh6OEpyOwJPMb7/EC2Az6Otw4StHdXUYw22zHazBcPFnv6zCgPx1hA7QlQDWTu4YcL0WmTYQCtMUb3FUqrcFtzGDD0ytosgwSd+JyN5vj5UwIABjnNOHPZ62EY1OFixnfqX/+dUwrFSs5tPgBF/KkC6R7tmbUfnBON6RrGEmu+ajOTOLy23qUZB4CQ53V7nyAWhzqSK+hw=='
end
- it "should not drop an empty alias" do
- line = 'test,alias, ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzwHhxXvIrtfIwrudFqc8yQcIfMudrgpnuh1F3AV6d2BrLgu/yQE7W5UyJMUjfj427sQudRwKW45O0Jsnr33F4mUw+GIMlAAmp9g24/OcrTiB8ZUKIjoPy/cO4coxGi8/NECtRzpD/ZUPFh6OEpyOwJPMb7/EC2Az6Otw4StHdXUYw22zHazBcPFnv6zCgPx1hA7QlQDWTu4YcL0WmTYQCtMUb3FUqrcFtzGDD0ytosgwSd+JyN5vj5UwIABjnNOHPZ62EY1OFixnfqX/+dUwrFSs5tPgBF/KkC6R7tmbUfnBON6RrGEmu+ajOTOLy23qUZB4CQ53V7nyAWhzqSK+hw=='
- parsed = @provider_class.parse_line(line)
- parsed[:alias].should == ["alias",""]
+ it "should parse the name from the first field" do
+ @provider_class.parse_line('test ssh-rsa '+@key)[:name].should == "test"
+ end
+
+ it "should parse the first component of the first field as the name" do
+ @provider_class.parse_line('test,alias ssh-rsa '+@key)[:name].should == "test"
+ end
+
+ it "should parse host_aliases from the remaining components of the first field" do
+ @provider_class.parse_line('test,alias ssh-rsa '+@key)[:host_aliases].should == ["alias"]
+ end
+
+ it "should parse multiple host_aliases" do
+ @provider_class.parse_line('test,alias1,alias2,alias3 ssh-rsa '+@key)[:host_aliases].should == ["alias1","alias2","alias3"]
+ end
+
+ it "should not drop an empty host_alias" do
+ @provider_class.parse_line('test,alias, ssh-rsa '+@key)[:host_aliases].should == ["alias",""]
+ end
+
+ it "should recognise when there are no host aliases" do
+ @provider_class.parse_line('test ssh-rsa '+@key)[:host_aliases].should == []
end
end
diff --git a/spec/unit/type/tidy.rb b/spec/unit/type/tidy.rb
index 88e2e280a..ccec9ed7c 100755
--- a/spec/unit/type/tidy.rb
+++ b/spec/unit/type/tidy.rb
@@ -273,6 +273,12 @@ describe tidy do
@sizer.must be_tidy("/what/ever", @stat)
end
+
+ it "should return true if the file is equal to the specified size" do
+ @stat.expects(:size).returns(1024)
+
+ @sizer.must be_tidy("/what/ever", @stat)
+ end
end
describe "and determining whether a file should be tidied" do
diff --git a/spec/unit/util/autoload.rb b/spec/unit/util/autoload.rb
index 4e1384246..220cb5f68 100755
--- a/spec/unit/util/autoload.rb
+++ b/spec/unit/util/autoload.rb
@@ -51,8 +51,9 @@ describe Puppet::Util::Autoload do
end
it "should include the module directories, the Puppet libdir, and all of the Ruby load directories" do
+ Puppet.stubs(:[]).with(:libdir).returns(%w{/libdir1 /lib/dir/two /third/lib/dir}.join(File::PATH_SEPARATOR))
@autoload.expects(:module_directories).returns %w{/one /two}
- @autoload.search_directories.should == ["/one", "/two", Puppet[:libdir], $:].flatten
+ @autoload.search_directories.should == %w{/one /two /libdir1 /lib/dir/two /third/lib/dir} + $:
end
it "should include in its search path all of the search directories that have a subdirectory matching the autoload path" do
diff --git a/test/executables/puppetmodule.rb b/test/executables/puppetmodule.rb
deleted file mode 100755
index ce28796d7..000000000
--- a/test/executables/puppetmodule.rb
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.dirname(__FILE__) + '/../lib/puppettest'
-
-require 'puppettest'
-
-class TestPuppetModule < Test::Unit::TestCase
- include PuppetTest::ExeTest
-
-
- def setup
- super
- @module = File.join(basedir, "ext", "module_puppet")
- end
-
- def test_existence
- assert(FileTest.exists?(@module), "Module does not exist")
- end
-
- def test_execution
- file = tempfile()
-
- createdfile = tempfile()
-
- File.open(file, "w") { |f|
- f.puts "class yaytest { file { \"#{createdfile}\": ensure => file } }"
- }
-
- output = nil
- cmd = @module
- cmd += " --verbose"
- #cmd += " --fqdn %s" % fqdn
- cmd += " --confdir %s" % Puppet[:confdir]
- cmd += " --vardir %s" % Puppet[:vardir]
- if Puppet[:debug]
- cmd += " --logdest %s" % "console"
- cmd += " --debug"
- cmd += " --trace"
- else
- cmd += " --logdest %s" % "/dev/null"
- end
-
- ENV["CFALLCLASSES"] = "yaytest:all"
- libsetup
-
- out = nil
- assert_nothing_raised {
- out = %x{#{cmd + " " + file} 2>&1}
- }
- assert($? == 0, "Puppet module exited with code %s: %s" % [$?.to_i, out])
-
- assert(FileTest.exists?(createdfile), "Failed to create config'ed file")
- end
-end
-
diff --git a/test/lib/puppettest/support/utils.rb b/test/lib/puppettest/support/utils.rb
index 655308d3b..5dd531200 100644
--- a/test/lib/puppettest/support/utils.rb
+++ b/test/lib/puppettest/support/utils.rb
@@ -154,11 +154,12 @@ end
module PuppetTest
include PuppetTest::Support::Utils
- def self.fakedata(dir,pat='*')
+ def fakedata(dir,pat='*')
glob = "#{basedir}/test/#{dir}/#{pat}"
files = Dir.glob(glob,File::FNM_PATHNAME)
raise Puppet::DevError, "No fakedata matching #{glob}" if files.empty?
files
end
+ module_function :fakedata
end
diff --git a/test/other/transactions.rb b/test/other/transactions.rb
index d0c6b8554..dd7742797 100755
--- a/test/other/transactions.rb
+++ b/test/other/transactions.rb
@@ -326,7 +326,7 @@ class TestTransactions < Test::Unit::TestCase
# 'subscribe' expects an array of arrays
#component[:require] = [[file.class.name,file.name]]
- ecomp[:subscribe] = fcomp
+ ecomp[:subscribe] = fcomp.ref
exec[:refreshonly] = true
trans = assert_events([], config)
diff --git a/test/ral/providers/host/parsed.rb b/test/ral/providers/host/parsed.rb
index 28b553356..ce70f5c9f 100755
--- a/test/ral/providers/host/parsed.rb
+++ b/test/ral/providers/host/parsed.rb
@@ -45,7 +45,7 @@ class TestParsedHostProvider < Test::Unit::TestCase
return {
:name => "fakehost%s" % @hcount,
:ip => "192.168.27.%s" % @hcount,
- :alias => ["alias%s" % @hcount],
+ :host_aliases => ["alias%s" % @hcount],
:ensure => :present
}
end
@@ -67,7 +67,7 @@ class TestParsedHostProvider < Test::Unit::TestCase
# Make sure we convert both directlys correctly using a simple host.
def test_basic_isomorphism
- hash = {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :alias => %w{another host}}
+ hash = {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :host_aliases => %w{another host}}
str = nil
assert_nothing_raised do
@@ -103,7 +103,7 @@ class TestParsedHostProvider < Test::Unit::TestCase
assert_equal([
{:record_type => :comment, :line => "# comment one"},
{:record_type => :blank, :line => ""},
- {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :alias => %w{another host}},
+ {:record_type => :parsed, :name => "myhost", :ip => "192.168.43.56", :host_aliases => %w{another host}},
{:record_type => :blank, :line => " "},
{:record_type => :comment, :line => "# another comment"},
{:record_type => :parsed, :name => "anotherhost", :ip => "192.168.43.57"}
@@ -150,13 +150,13 @@ class TestParsedHostProvider < Test::Unit::TestCase
}
# Remove a single field and make sure it gets tossed
- name = host.alias
- host.alias = [:absent]
+ name = host.host_aliases
+ host.host_aliases = [:absent]
assert_nothing_raised {
host.flush
assert(! file.read.include?(name[0]),
- "Did not remove alias from disk")
+ "Did not remove host_aliases from disk")
}
# Make sure it throws up if we remove a required field
diff --git a/test/ral/providers/sshkey/parsed.rb b/test/ral/providers/sshkey/parsed.rb
index 868640a10..cad758568 100755
--- a/test/ral/providers/sshkey/parsed.rb
+++ b/test/ral/providers/sshkey/parsed.rb
@@ -32,7 +32,7 @@ class TestParsedSSHKey < Test::Unit::TestCase
args = {
:name => name || "/fspuppet%s" % @pcount,
:key => "thisismykey%s" % @pcount,
- :alias => ["host1.domain.com","192.168.0.1"],
+ :host_aliases => ["host1.domain.com","192.168.0.1"],
:type => "dss",
:ensure => :present
}
@@ -68,11 +68,11 @@ class TestParsedSSHKey < Test::Unit::TestCase
key.flush
end
- assert(key.alias, "No alias set for key")
+ assert(key.host_aliases, "No host_aliases set for key")
hash = key.property_hash.dup
text = @provider.target_object(file).read
- names = [key.name, key.alias].flatten.join(",")
+ names = [key.name, key.host_aliases].flatten.join(",")
assert_equal("#{names} #{key.type} #{key.key}\n", text)
@@ -94,12 +94,12 @@ class TestParsedSSHKey < Test::Unit::TestCase
result = @provider.parse_line("one,two type key")
end
assert_equal("one", result[:name], "Did not call post hook")
- assert_equal(%w{two}, result[:alias], "Did not call post hook")
+ assert_equal(%w{two}, result[:host_aliases], "Did not call post hook")
assert_equal("one,two type key",
@provider.to_line(:record_type => :parsed,
:name => "one",
- :alias => %w{two},
+ :host_aliases => %w{two},
:type => "type",
:key => "key"),
"Did not use pre-hook when generating line"
diff --git a/test/ral/type/host.rb b/test/ral/type/host.rb
index 537adc717..dce882b96 100755
--- a/test/ral/type/host.rb
+++ b/test/ral/type/host.rb
@@ -108,7 +108,7 @@ class TestHost < Test::Unit::TestCase
# This was a hard bug to track down.
assert_instance_of(String, current_values[host.property(:ip)])
- host[:alias] = %w{madstop kirby yayness}
+ host[:host_aliases] = %w{madstop kirby yayness}
assert_events([:host_changed], host)
@@ -117,7 +117,7 @@ class TestHost < Test::Unit::TestCase
}
assert_equal(%w{madstop kirby yayness},
- current_values[host.property(:alias)])
+ current_values[host.property(:host_aliases)])
host[:ensure] = :absent
assert_events([:host_removed], host)
@@ -184,13 +184,13 @@ class TestHost < Test::Unit::TestCase
end
def test_aliasisproperty
- assert_equal(:property, @hosttype.attrtype(:alias))
+ assert_equal(:property, @hosttype.attrtype(:host_aliases))
end
def test_multivalues
host = mkhost
assert_raise(Puppet::Error) {
- host[:alias] = "puppetmasterd yayness"
+ host[:host_aliases] = "puppetmasterd yayness"
}
end
diff --git a/test/ral/type/sshkey.rb b/test/ral/type/sshkey.rb
index 74dd812bb..b528317a3 100755
--- a/test/ral/type/sshkey.rb
+++ b/test/ral/type/sshkey.rb
@@ -116,13 +116,13 @@ class TestSSHKey < Test::Unit::TestCase
end
def test_aliasisproperty
- assert_equal(:property, @sshkeytype.attrtype(:alias))
+ assert_equal(:property, @sshkeytype.attrtype(:host_aliases))
end
def test_multivalues
key = mkkey
assert_raise(Puppet::Error) {
- key[:alias] = "puppetmasterd yayness"
+ key[:host_aliases] = "puppetmasterd yayness"
}
end
diff --git a/test/util/settings.rb b/test/util/settings.rb
index c9e324564..1ec8ceeab 100755
--- a/test/util/settings.rb
+++ b/test/util/settings.rb
@@ -463,7 +463,7 @@ yay = /a/path
def test_correct_type_assumptions
file = Puppet::Util::Settings::FileSetting
- element = Puppet::Util::Settings::Setting
+ setting = Puppet::Util::Settings::Setting
bool = Puppet::Util::Settings::BooleanSetting
# We have to keep these ordered, unfortunately.
@@ -472,8 +472,8 @@ yay = /a/path
["true", bool],
[true, bool],
["false", bool],
- ["server", element],
- ["http://$server/yay", element],
+ ["server", setting],
+ ["http://$server/yay", setting],
["$server/yayness", file],
["$server/yayness.conf", file]
].each do |ary|
@@ -483,7 +483,7 @@ yay = /a/path
assert_nothing_raised {
config.setdefaults(:yayness, name => { :default => value, :desc => name.to_s})
}
- elem = config.element(name)
+ elem = config.setting(name)
assert_instance_of(type, elem,
"%s got created as wrong type" % value.inspect)
@@ -529,7 +529,7 @@ yay = /a/path
assert_nothing_raised do
config.setdefaults :test, :blocktest => {:default => "yay", :desc => "boo", :hook => proc { |value| testing = value }}
end
- elem = config.element(:blocktest)
+ elem = config.setting(:blocktest)
assert_nothing_raised do
assert_equal("yay", elem.value)