puppet 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (246) hide show
  1. data/CHANGELOG +123 -0
  2. data/conf/redhat/puppet.spec +8 -2
  3. data/conf/solaris/smf/svc-puppetd +1 -1
  4. data/conf/solaris/smf/svc-puppetmasterd +1 -1
  5. data/conf/suse/client.init +4 -4
  6. data/conf/suse/fileserver.conf +12 -0
  7. data/conf/suse/logrotate +10 -0
  8. data/conf/suse/puppet.conf +25 -0
  9. data/conf/suse/puppet.spec +114 -49
  10. data/conf/suse/ruby-env.patch +17 -0
  11. data/conf/suse/server.init +4 -4
  12. data/ext/logcheck/puppet +23 -23
  13. data/ext/puppet-load.rb +357 -0
  14. data/ext/puppetstoredconfigclean.rb +3 -3
  15. data/ext/rack/files/config.ru +3 -5
  16. data/ext/vim/syntax/puppet.vim +6 -5
  17. data/install.rb +12 -11
  18. data/lib/puppet.rb +1 -1
  19. data/lib/puppet/agent.rb +3 -1
  20. data/lib/puppet/application.rb +2 -3
  21. data/lib/puppet/application/agent.rb +4 -0
  22. data/lib/puppet/application/apply.rb +14 -6
  23. data/lib/puppet/application/describe.rb +1 -1
  24. data/lib/puppet/application/doc.rb +2 -36
  25. data/lib/puppet/application/master.rb +0 -3
  26. data/lib/puppet/application/queue.rb +1 -0
  27. data/lib/puppet/configurer.rb +4 -0
  28. data/lib/puppet/daemon.rb +1 -1
  29. data/lib/puppet/defaults.rb +38 -44
  30. data/lib/puppet/file_serving/indirection_hooks.rb +2 -2
  31. data/lib/puppet/indirector/facts/memory.rb +1 -1
  32. data/lib/puppet/indirector/node/exec.rb +1 -1
  33. data/lib/puppet/indirector/node/ldap.rb +9 -53
  34. data/lib/puppet/indirector/node/memory.rb +1 -1
  35. data/lib/puppet/indirector/yaml.rb +6 -9
  36. data/lib/puppet/network/format_handler.rb +6 -0
  37. data/lib/puppet/network/formats.rb +4 -4
  38. data/lib/puppet/network/http/handler.rb +1 -1
  39. data/lib/puppet/network/http/rack.rb +3 -0
  40. data/lib/puppet/network/http/rack/rest.rb +1 -1
  41. data/lib/puppet/network/rest_authconfig.rb +6 -3
  42. data/lib/puppet/node/environment.rb +15 -5
  43. data/lib/puppet/parameter/value_collection.rb +3 -3
  44. data/lib/puppet/parser/ast/function.rb +0 -1
  45. data/lib/puppet/parser/ast/leaf.rb +1 -1
  46. data/lib/puppet/parser/ast/resource.rb +4 -3
  47. data/lib/puppet/parser/ast/resource_reference.rb +9 -2
  48. data/lib/puppet/parser/compiler.rb +12 -14
  49. data/lib/puppet/parser/files.rb +1 -1
  50. data/lib/puppet/parser/functions.rb +2 -2
  51. data/lib/puppet/parser/functions/defined.rb +1 -1
  52. data/lib/puppet/parser/functions/extlookup.rb +157 -0
  53. data/lib/puppet/parser/functions/file.rb +1 -1
  54. data/lib/puppet/parser/functions/inline_template.rb +6 -5
  55. data/lib/puppet/parser/functions/md5.rb +5 -0
  56. data/lib/puppet/parser/functions/realize.rb +1 -1
  57. data/lib/puppet/parser/functions/regsubst.rb +19 -19
  58. data/lib/puppet/parser/functions/require.rb +2 -3
  59. data/lib/puppet/parser/functions/split.rb +1 -1
  60. data/lib/puppet/parser/functions/sprintf.rb +1 -1
  61. data/lib/puppet/parser/functions/template.rb +4 -2
  62. data/lib/puppet/parser/functions/versioncmp.rb +12 -12
  63. data/lib/puppet/parser/lexer.rb +13 -14
  64. data/lib/puppet/parser/resource.rb +2 -7
  65. data/lib/puppet/parser/resource/param.rb +1 -1
  66. data/lib/puppet/parser/scope.rb +35 -0
  67. data/lib/puppet/parser/type_loader.rb +1 -1
  68. data/lib/puppet/property.rb +5 -5
  69. data/lib/puppet/provider.rb +3 -3
  70. data/lib/puppet/provider/group/groupadd.rb +1 -1
  71. data/lib/puppet/provider/group/ldap.rb +3 -3
  72. data/lib/puppet/provider/group/pw.rb +1 -1
  73. data/lib/puppet/provider/package/apple.rb +1 -1
  74. data/lib/puppet/provider/package/apt.rb +5 -1
  75. data/lib/puppet/provider/package/aptitude.rb +1 -1
  76. data/lib/puppet/provider/package/aptrpm.rb +1 -1
  77. data/lib/puppet/provider/package/blastwave.rb +1 -1
  78. data/lib/puppet/provider/package/dpkg.rb +2 -2
  79. data/lib/puppet/provider/package/fink.rb +1 -1
  80. data/lib/puppet/provider/package/gem.rb +1 -1
  81. data/lib/puppet/provider/package/openbsd.rb +1 -1
  82. data/lib/puppet/provider/package/rpm.rb +1 -1
  83. data/lib/puppet/provider/package/rug.rb +1 -1
  84. data/lib/puppet/provider/package/sunfreeware.rb +2 -2
  85. data/lib/puppet/provider/package/up2date.rb +1 -1
  86. data/lib/puppet/provider/package/urpmi.rb +1 -1
  87. data/lib/puppet/provider/package/yum.rb +1 -1
  88. data/lib/puppet/provider/package/zypper.rb +1 -1
  89. data/lib/puppet/provider/service/base.rb +1 -1
  90. data/lib/puppet/provider/service/bsd.rb +2 -2
  91. data/lib/puppet/provider/service/debian.rb +2 -2
  92. data/lib/puppet/provider/service/gentoo.rb +2 -2
  93. data/lib/puppet/provider/service/init.rb +2 -2
  94. data/lib/puppet/provider/service/redhat.rb +2 -2
  95. data/lib/puppet/provider/user/ldap.rb +3 -3
  96. data/lib/puppet/provider/user/pw.rb +1 -1
  97. data/lib/puppet/provider/user/user_role_add.rb +1 -1
  98. data/lib/puppet/provider/user/useradd.rb +1 -1
  99. data/lib/puppet/rails/host.rb +1 -0
  100. data/lib/puppet/reference/configuration.rb +37 -34
  101. data/lib/puppet/reference/indirection.rb +3 -4
  102. data/lib/puppet/reference/metaparameter.rb +0 -8
  103. data/lib/puppet/reference/network.rb +6 -4
  104. data/lib/puppet/reference/providers.rb +4 -4
  105. data/lib/puppet/reference/report.rb +5 -6
  106. data/lib/puppet/reference/type.rb +14 -14
  107. data/lib/puppet/reports/http.rb +1 -1
  108. data/lib/puppet/reports/rrdgraph.rb +8 -9
  109. data/lib/puppet/reports/store.rb +2 -2
  110. data/lib/puppet/reports/tagmail.rb +12 -13
  111. data/lib/puppet/resource.rb +15 -115
  112. data/lib/puppet/resource/catalog.rb +1 -1
  113. data/lib/puppet/resource/type.rb +26 -3
  114. data/lib/puppet/resource/type_collection.rb +3 -6
  115. data/lib/puppet/simple_graph.rb +4 -5
  116. data/lib/puppet/transaction/resource_harness.rb +1 -1
  117. data/lib/puppet/type.rb +100 -92
  118. data/lib/puppet/type/augeas.rb +44 -45
  119. data/lib/puppet/type/computer.rb +2 -2
  120. data/lib/puppet/type/cron.rb +29 -29
  121. data/lib/puppet/type/exec.rb +66 -67
  122. data/lib/puppet/type/file.rb +25 -25
  123. data/lib/puppet/type/file/content.rb +7 -1
  124. data/lib/puppet/type/file/ensure.rb +13 -13
  125. data/lib/puppet/type/file/mode.rb +6 -6
  126. data/lib/puppet/type/file/selcontext.rb +5 -5
  127. data/lib/puppet/type/file/source.rb +36 -26
  128. data/lib/puppet/type/filebucket.rb +5 -6
  129. data/lib/puppet/type/group.rb +1 -2
  130. data/lib/puppet/type/host.rb +3 -6
  131. data/lib/puppet/type/k5login.rb +3 -3
  132. data/lib/puppet/type/macauthorization.rb +1 -2
  133. data/lib/puppet/type/mailalias.rb +0 -1
  134. data/lib/puppet/type/maillist.rb +0 -1
  135. data/lib/puppet/type/mcx.rb +9 -9
  136. data/lib/puppet/type/mount.rb +9 -10
  137. data/lib/puppet/type/notify.rb +0 -1
  138. data/lib/puppet/type/package.rb +34 -36
  139. data/lib/puppet/type/resources.rb +1 -5
  140. data/lib/puppet/type/schedule.rb +9 -12
  141. data/lib/puppet/type/selboolean.rb +2 -7
  142. data/lib/puppet/type/selmodule.rb +3 -4
  143. data/lib/puppet/type/service.rb +9 -9
  144. data/lib/puppet/type/ssh_authorized_key.rb +2 -3
  145. data/lib/puppet/type/sshkey.rb +4 -7
  146. data/lib/puppet/type/stage.rb +5 -4
  147. data/lib/puppet/type/tidy.rb +3 -3
  148. data/lib/puppet/type/user.rb +1 -2
  149. data/lib/puppet/type/whit.rb +7 -0
  150. data/lib/puppet/type/yumrepo.rb +16 -3
  151. data/lib/puppet/type/zfs.rb +1 -2
  152. data/lib/puppet/type/zone.rb +28 -28
  153. data/lib/puppet/type/zpool.rb +10 -5
  154. data/lib/puppet/util/autoload.rb +17 -5
  155. data/lib/puppet/util/cacher.rb +15 -10
  156. data/lib/puppet/util/command_line/puppetdoc +5 -5
  157. data/lib/puppet/util/command_line/puppetrun +0 -2
  158. data/lib/puppet/util/command_line/ralsh +13 -13
  159. data/lib/puppet/util/docs.rb +5 -12
  160. data/lib/puppet/util/monkey_patches.rb +5 -2
  161. data/lib/puppet/util/nagios_maker.rb +4 -5
  162. data/lib/puppet/util/provider_features.rb +2 -2
  163. data/lib/puppet/util/rdoc.rb +1 -1
  164. data/lib/puppet/util/rdoc/parser.rb +5 -3
  165. data/lib/puppet/util/reference.rb +3 -52
  166. data/man/man5/puppet.conf.5 +2072 -1526
  167. data/man/man8/filebucket.8 +104 -106
  168. data/man/man8/pi.8 +14 -47
  169. data/man/man8/puppet.8 +8 -9
  170. data/man/man8/puppetca.8 +168 -129
  171. data/man/man8/puppetd.8 +282 -226
  172. data/man/man8/puppetdoc.8 +103 -103
  173. data/man/man8/puppetmasterd.8 +51 -71
  174. data/man/man8/puppetqd.8 +18 -53
  175. data/man/man8/puppetrun.8 +163 -143
  176. data/man/man8/ralsh.8 +77 -114
  177. data/spec/integration/indirector/bucket_file/rest_spec.rb +1 -0
  178. data/spec/integration/indirector/certificate/rest_spec.rb +1 -0
  179. data/spec/integration/indirector/certificate_request/rest_spec.rb +1 -0
  180. data/spec/integration/indirector/certificate_revocation_list/rest_spec.rb +1 -0
  181. data/spec/integration/indirector/report/rest_spec.rb +1 -0
  182. data/spec/integration/indirector/rest_spec.rb +1 -0
  183. data/spec/integration/network/server/webrick_spec.rb +1 -0
  184. data/spec/integration/parser/compiler_spec.rb +43 -0
  185. data/spec/integration/provider/mailalias/aliases_spec.rb +5 -5
  186. data/spec/integration/ssl/certificate_authority_spec.rb +1 -0
  187. data/spec/integration/ssl/certificate_request_spec.rb +1 -0
  188. data/spec/integration/ssl/certificate_revocation_list_spec.rb +1 -0
  189. data/spec/integration/ssl/host_spec.rb +1 -0
  190. data/spec/monkey_patches/add_confine_and_runnable_to_rspec_dsl.rb +0 -1
  191. data/spec/monkey_patches/publicize_methods.rb +11 -0
  192. data/spec/shared_behaviours/file_serving.rb +12 -1
  193. data/spec/spec_helper.rb +6 -25
  194. data/spec/unit/application/apply_spec.rb +22 -4
  195. data/spec/unit/application/cert_spec.rb +1 -1
  196. data/spec/unit/application/doc_spec.rb +0 -19
  197. data/spec/unit/application/master_spec.rb +1 -1
  198. data/spec/unit/application_spec.rb +2 -12
  199. data/spec/unit/indirector/node/ldap_spec.rb +19 -21
  200. data/spec/unit/indirector/yaml_spec.rb +18 -6
  201. data/spec/unit/network/http/rack/rest_spec.rb +3 -3
  202. data/spec/unit/network/http/webrick/rest_spec.rb +1 -0
  203. data/spec/unit/node/environment_spec.rb +32 -3
  204. data/spec/unit/node/facts_spec.rb +13 -2
  205. data/spec/unit/parameter/value_collection_spec.rb +2 -2
  206. data/spec/unit/parser/ast/leaf_spec.rb +4 -0
  207. data/spec/unit/parser/ast/resource_reference_spec.rb +0 -5
  208. data/spec/unit/parser/ast/resource_spec.rb +7 -0
  209. data/spec/unit/parser/compiler_spec.rb +12 -1
  210. data/spec/unit/parser/files_spec.rb +3 -3
  211. data/spec/unit/parser/functions/extlookup_spec.rb +95 -0
  212. data/spec/unit/parser/functions/include_spec.rb +33 -0
  213. data/spec/unit/parser/functions/require_spec.rb +1 -1
  214. data/spec/unit/parser/functions/tag_spec.rb +1 -0
  215. data/spec/unit/parser/lexer_spec.rb +10 -1
  216. data/spec/unit/parser/resource_spec.rb +3 -9
  217. data/spec/unit/parser/type_loader_spec.rb +1 -1
  218. data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +4 -2
  219. data/spec/unit/rails/resource_spec.rb +1 -1
  220. data/spec/unit/reports/tagmail_spec.rb +2 -2
  221. data/spec/unit/resource/catalog_spec.rb +1 -1
  222. data/spec/unit/resource/type_collection_spec.rb +35 -0
  223. data/spec/unit/resource/type_spec.rb +19 -1
  224. data/spec/unit/resource_spec.rb +0 -36
  225. data/spec/unit/simple_graph_spec.rb +12 -2
  226. data/spec/unit/transaction/resource_harness_spec.rb +1 -1
  227. data/spec/unit/type/file/content_spec.rb +2 -1
  228. data/spec/unit/type/schedule_spec.rb +1 -1
  229. data/spec/unit/type/service_spec.rb +8 -0
  230. data/spec/unit/type/user_spec.rb +5 -0
  231. data/spec/unit/util/backups_spec.rb +0 -1
  232. data/spec/unit/util/rdoc/parser_spec.rb +3 -3
  233. data/spec/unit/util/rdoc_spec.rb +13 -0
  234. data/test/certmgr/support.rb +2 -1
  235. data/test/language/parser.rb +6 -6
  236. data/test/lib/puppettest.rb +3 -23
  237. data/test/lib/puppettest/fakes.rb +1 -1
  238. data/test/lib/puppettest/support/assertions.rb +0 -2
  239. data/test/lib/puppettest/support/utils.rb +25 -20
  240. data/test/ral/manager/attributes.rb +4 -1
  241. metadata +15 -9
  242. data/conf/suse/puppet.suse.patch +0 -16
  243. data/ext/extlookup.rb +0 -181
  244. data/ext/puppetlast +0 -16
  245. data/tasks/rake/tracdocs.rake +0 -8
  246. data/test/lib/mocha_standalone.rb +0 -2
@@ -474,6 +474,41 @@ class Puppet::Parser::Scope
474
474
  end
475
475
  end
476
476
 
477
+ def find_resource_type(type)
478
+ # It still works fine without the type == 'class' short-cut, but it is a lot slower.
479
+ return nil if ["class", "node"].include? type.to_s.downcase
480
+ find_builtin_resource_type(type) || find_defined_resource_type(type)
481
+ end
482
+
483
+ def find_builtin_resource_type(type)
484
+ Puppet::Type.type(type.to_s.downcase.to_sym)
485
+ end
486
+
487
+ def find_defined_resource_type(type)
488
+ environment.known_resource_types.find_definition(namespaces, type.to_s.downcase)
489
+ end
490
+
491
+ def resolve_type_and_titles(type, titles)
492
+ raise ArgumentError, "titles must be an array" unless titles.is_a?(Array)
493
+
494
+ case type.downcase
495
+ when "class"
496
+ # resolve the titles
497
+ titles = titles.collect do |a_title|
498
+ hostclass = find_hostclass(a_title)
499
+ hostclass ? hostclass.name : a_title
500
+ end
501
+ when "node"
502
+ # no-op
503
+ else
504
+ # resolve the type
505
+ resource_type = find_resource_type(type)
506
+ type = resource_type.name if resource_type
507
+ end
508
+
509
+ return [type, titles]
510
+ end
511
+
477
512
  private
478
513
 
479
514
  def extend_with_functions_module
@@ -88,7 +88,7 @@ class Puppet::Parser::TypeLoader
88
88
  nil
89
89
  end
90
90
  if result = yield(filename)
91
- Puppet.info "Automatically imported #{name} from #{filename} into #{environment}"
91
+ Puppet.debug "Automatically imported #{name} from #{filename} into #{environment}"
92
92
  result.module_name = modname if modname and result.respond_to?(:module_name=)
93
93
  return result
94
94
  end
@@ -55,10 +55,10 @@ class Puppet::Property < Puppet::Parameter
55
55
  # * <tt>:required_features</tt>: A list of features this value requires.
56
56
  # * <tt>:event</tt>: The event that should be returned when this value is set.
57
57
  # * <tt>:call</tt>: When to call any associated block. The default value
58
- # is ``instead``, which means to call the value instead of calling the
59
- # provider. You can also specify ``before`` or ``after``, which will
58
+ # is `instead`, which means to call the value instead of calling the
59
+ # provider. You can also specify `before` or `after`, which will
60
60
  # call both the block and the provider, according to the order you specify
61
- # (the ``first`` refers to when the block is called, not the provider).
61
+ # (the `first` refers to when the block is called, not the provider).
62
62
  def self.newvalue(name, options = {}, &block)
63
63
  value = value_collection.newvalue(name, options, &block)
64
64
 
@@ -181,10 +181,10 @@ class Puppet::Property < Puppet::Parameter
181
181
  def log(msg)
182
182
 
183
183
  Puppet::Util::Log.create(
184
-
184
+
185
185
  :level => resource[:loglevel],
186
186
  :message => msg,
187
-
187
+
188
188
  :source => self
189
189
  )
190
190
  end
@@ -205,7 +205,7 @@ class Puppet::Provider
205
205
  dochook(:defaults) do
206
206
  if @defaults.length > 0
207
207
  return " Default for " + @defaults.collect do |f, v|
208
- "``#{f}`` == ``#{v}``"
208
+ "`#{f}` == `#{v}`"
209
209
  end.join(" and ") + "."
210
210
  end
211
211
  end
@@ -213,7 +213,7 @@ class Puppet::Provider
213
213
  dochook(:commands) do
214
214
  if @commands.length > 0
215
215
  return " Required binaries: " + @commands.collect do |n, c|
216
- "``#{c}``"
216
+ "`#{c}`"
217
217
  end.join(", ") + "."
218
218
  end
219
219
  end
@@ -221,7 +221,7 @@ class Puppet::Provider
221
221
  dochook(:features) do
222
222
  if features.length > 0
223
223
  return " Supported features: " + features.collect do |f|
224
- "``#{f}``"
224
+ "`#{f}`"
225
225
  end.join(", ") + "."
226
226
  end
227
227
  end
@@ -1,7 +1,7 @@
1
1
  require 'puppet/provider/nameservice/objectadd'
2
2
 
3
3
  Puppet::Type.type(:group).provide :groupadd, :parent => Puppet::Provider::NameService::ObjectAdd do
4
- desc "Group management via ``groupadd`` and its ilk.
4
+ desc "Group management via `groupadd` and its ilk.
5
5
 
6
6
  The default for most platforms
7
7
 
@@ -1,11 +1,11 @@
1
1
  require 'puppet/provider/ldap'
2
2
 
3
3
  Puppet::Type.type(:group).provide :ldap, :parent => Puppet::Provider::Ldap do
4
- desc "Group management via ``ldap``.
4
+ desc "Group management via `ldap`.
5
5
 
6
6
  This provider requires that you have valid values for all of the
7
- ldap-related settings, including ``ldapbase``. You will also almost
8
- definitely need settings for ``ldapuser`` and ``ldappassword``, so that
7
+ ldap-related settings, including `ldapbase`. You will also almost
8
+ definitely need settings for `ldapuser` and `ldappassword`, so that
9
9
  your clients can write to ldap.
10
10
 
11
11
  Note that this provider will automatically generate a GID for you if you do
@@ -1,7 +1,7 @@
1
1
  require 'puppet/provider/nameservice/pw'
2
2
 
3
3
  Puppet::Type.type(:group).provide :pw, :parent => Puppet::Provider::NameService::PW do
4
- desc "Group management via ``pw``.
4
+ desc "Group management via `pw`.
5
5
 
6
6
  Only works on FreeBSD.
7
7
 
@@ -5,7 +5,7 @@ Puppet::Type.type(:package).provide :apple, :parent => Puppet::Provider::Package
5
5
  desc "Package management based on OS X's builtin packaging system. This is
6
6
  essentially the simplest and least functional package system in existence --
7
7
  it only supports installation; no deletion or upgrades. The provider will
8
- automatically add the ``.pkg`` extension, so leave that off when specifying
8
+ automatically add the `.pkg` extension, so leave that off when specifying
9
9
  the package name."
10
10
 
11
11
  confine :operatingsystem => :darwin
@@ -2,7 +2,7 @@ Puppet::Type.type(:package).provide :apt, :parent => :dpkg, :source => :dpkg do
2
2
  # Provide sorting functionality
3
3
  include Puppet::Util::Package
4
4
 
5
- desc "Package management via ``apt-get``."
5
+ desc "Package management via `apt-get`."
6
6
 
7
7
  has_feature :versionable
8
8
 
@@ -14,6 +14,10 @@ Puppet::Type.type(:package).provide :apt, :parent => :dpkg, :source => :dpkg do
14
14
 
15
15
  ENV['DEBIAN_FRONTEND'] = "noninteractive"
16
16
 
17
+ # disable common apt helpers to allow non-interactive package installs
18
+ ENV['APT_LISTBUGS_FRONTEND'] = "none"
19
+ ENV['APT_LISTCHANGES_FRONTEND'] = "none"
20
+
17
21
  # A derivative of DPKG; this is how most people actually manage
18
22
  # Debian boxes, and the only thing that differs is that it can
19
23
  # install packages from remote sites.
@@ -1,5 +1,5 @@
1
1
  Puppet::Type.type(:package).provide :aptitude, :parent => :apt, :source => :dpkg do
2
- desc "Package management via ``aptitude``."
2
+ desc "Package management via `aptitude`."
3
3
 
4
4
  has_feature :versionable
5
5
 
@@ -2,7 +2,7 @@ Puppet::Type.type(:package).provide :aptrpm, :parent => :rpm, :source => :rpm do
2
2
  # Provide sorting functionality
3
3
  include Puppet::Util::Package
4
4
 
5
- desc "Package management via ``apt-get`` ported to ``rpm``."
5
+ desc "Package management via `apt-get` ported to `rpm`."
6
6
 
7
7
  has_feature :versionable
8
8
 
@@ -1,6 +1,6 @@
1
1
  # Packaging using Blastwave's pkg-get program.
2
2
  Puppet::Type.type(:package).provide :blastwave, :parent => :sun, :source => :sun do
3
- desc "Package management using Blastwave.org's ``pkg-get`` command on Solaris."
3
+ desc "Package management using Blastwave.org's `pkg-get` command on Solaris."
4
4
  pkgget = "pkg-get"
5
5
  pkgget = "/opt/csw/bin/pkg-get" if FileTest.executable?("/opt/csw/bin/pkg-get")
6
6
 
@@ -1,8 +1,8 @@
1
1
  require 'puppet/provider/package'
2
2
 
3
3
  Puppet::Type.type(:package).provide :dpkg, :parent => Puppet::Provider::Package do
4
- desc "Package management via ``dpkg``. Because this only uses ``dpkg``
5
- and not ``apt``, you must specify the source of any packages you want
4
+ desc "Package management via `dpkg`. Because this only uses `dpkg`
5
+ and not `apt`, you must specify the source of any packages you want
6
6
  to manage."
7
7
 
8
8
  has_feature :holdable
@@ -2,7 +2,7 @@ Puppet::Type.type(:package).provide :fink, :parent => :dpkg, :source => :dpkg do
2
2
  # Provide sorting functionality
3
3
  include Puppet::Util::Package
4
4
 
5
- desc "Package management via ``fink``."
5
+ desc "Package management via `fink`."
6
6
 
7
7
  commands :fink => "/sw/bin/fink"
8
8
  commands :aptget => "/sw/bin/apt-get"
@@ -3,7 +3,7 @@ require 'uri'
3
3
 
4
4
  # Ruby gems support.
5
5
  Puppet::Type.type(:package).provide :gem, :parent => Puppet::Provider::Package do
6
- desc "Ruby Gem support. If a URL is passed via ``source``, then that URL is used as the
6
+ desc "Ruby Gem support. If a URL is passed via `source`, then that URL is used as the
7
7
  remote gem repository; if a source is present but is not a valid URL, it will be
8
8
  interpreted as the path to a local gem file. If source is not present at all,
9
9
  the gem will be installed from the default gem repositories."
@@ -3,7 +3,7 @@ require 'puppet/provider/package'
3
3
  # Packaging on OpenBSD. Doesn't work anywhere else that I know of.
4
4
  Puppet::Type.type(:package).provide :openbsd, :parent => Puppet::Provider::Package do
5
5
  include Puppet::Util::Execution
6
- desc "OpenBSD's form of ``pkg_add`` support."
6
+ desc "OpenBSD's form of `pkg_add` support."
7
7
 
8
8
  commands :pkginfo => "pkg_info", :pkgadd => "pkg_add", :pkgdelete => "pkg_delete"
9
9
 
@@ -1,7 +1,7 @@
1
1
  require 'puppet/provider/package'
2
2
  # RPM packaging. Should work anywhere that has rpm installed.
3
3
  Puppet::Type.type(:package).provide :rpm, :source => :rpm, :parent => Puppet::Provider::Package do
4
- desc "RPM packaging support; should work anywhere with a working ``rpm``
4
+ desc "RPM packaging support; should work anywhere with a working `rpm`
5
5
  binary."
6
6
 
7
7
  has_feature :versionable
@@ -1,5 +1,5 @@
1
1
  Puppet::Type.type(:package).provide :rug, :parent => :rpm do
2
- desc "Support for suse ``rug`` package manager."
2
+ desc "Support for suse `rug` package manager."
3
3
 
4
4
  has_feature :versionable
5
5
 
@@ -1,7 +1,7 @@
1
1
  # At this point, it's an exact copy of the Blastwave stuff.
2
2
  Puppet::Type.type(:package).provide :sunfreeware, :parent => :blastwave, :source => :sun do
3
- desc "Package management using sunfreeware.com's ``pkg-get`` command on Solaris.
4
- At this point, support is exactly the same as ``blastwave`` support and
3
+ desc "Package management using sunfreeware.com's `pkg-get` command on Solaris.
4
+ At this point, support is exactly the same as `blastwave` support and
5
5
  has not actually been tested."
6
6
  commands :pkgget => "pkg-get"
7
7
 
@@ -1,5 +1,5 @@
1
1
  Puppet::Type.type(:package).provide :up2date, :parent => :rpm, :source => :rpm do
2
- desc "Support for Red Hat's proprietary ``up2date`` package update
2
+ desc "Support for Red Hat's proprietary `up2date` package update
3
3
  mechanism."
4
4
 
5
5
  commands :up2date => "/usr/sbin/up2date-nox"
@@ -1,5 +1,5 @@
1
1
  Puppet::Type.type(:package).provide :urpmi, :parent => :rpm, :source => :rpm do
2
- desc "Support via ``urpmi``."
2
+ desc "Support via `urpmi`."
3
3
  commands :urpmi => "urpmi", :urpmq => "urpmq", :rpm => "rpm"
4
4
 
5
5
  if command('rpm')
@@ -1,5 +1,5 @@
1
1
  Puppet::Type.type(:package).provide :yum, :parent => :rpm, :source => :rpm do
2
- desc "Support via ``yum``."
2
+ desc "Support via `yum`."
3
3
 
4
4
  has_feature :versionable
5
5
 
@@ -1,5 +1,5 @@
1
1
  Puppet::Type.type(:package).provide :zypper, :parent => :rpm do
2
- desc "Support for SuSE ``zypper`` package manager. Found in SLES10sp2+ and SLES11"
2
+ desc "Support for SuSE `zypper` package manager. Found in SLES10sp2+ and SLES11"
3
3
 
4
4
  has_feature :versionable
5
5
 
@@ -5,7 +5,7 @@ Puppet::Type.type(:service).provide :base do
5
5
  minimum you can specify is a binary for starting the process, and this
6
6
  same binary will be searched for in the process table to stop the
7
7
  service. It is preferable to specify start, stop, and status commands,
8
- akin to how you would do so using ``init``.
8
+ akin to how you would do so using `init`.
9
9
 
10
10
  "
11
11
 
@@ -1,8 +1,8 @@
1
1
  # Manage FreeBSD services.
2
2
  Puppet::Type.type(:service).provide :bsd, :parent => :init do
3
- desc "FreeBSD's (and probably NetBSD?) form of ``init``-style service management.
3
+ desc "FreeBSD's (and probably NetBSD?) form of `init`-style service management.
4
4
 
5
- Uses ``rc.conf.d`` for service enabling and disabling.
5
+ Uses `rc.conf.d` for service enabling and disabling.
6
6
 
7
7
  "
8
8
 
@@ -1,10 +1,10 @@
1
1
  # Manage debian services. Start/stop is the same as InitSvc, but enable/disable
2
2
  # is special.
3
3
  Puppet::Type.type(:service).provide :debian, :parent => :init do
4
- desc "Debian's form of ``init``-style management.
4
+ desc "Debian's form of `init`-style management.
5
5
 
6
6
  The only difference is that this supports service enabling and disabling
7
- via ``update-rc.d`` and determines enabled status via ``invoke-rc.d``.
7
+ via `update-rc.d` and determines enabled status via `invoke-rc.d`.
8
8
 
9
9
  "
10
10
 
@@ -1,9 +1,9 @@
1
1
  # Manage gentoo services. Start/stop is the same as InitSvc, but enable/disable
2
2
  # is special.
3
3
  Puppet::Type.type(:service).provide :gentoo, :parent => :init do
4
- desc "Gentoo's form of ``init``-style service management.
4
+ desc "Gentoo's form of `init`-style service management.
5
5
 
6
- Uses ``rc-update`` for service enabling and disabling.
6
+ Uses `rc-update` for service enabling and disabling.
7
7
 
8
8
  "
9
9
 
@@ -3,9 +3,9 @@
3
3
  Puppet::Type.type(:service).provide :init, :parent => :base do
4
4
  desc "Standard init service management.
5
5
 
6
- This provider assumes that the init script has no ``status`` command,
6
+ This provider assumes that the init script has no `status` command,
7
7
  because so few scripts do, so you need to either provide a status
8
- command or specify via ``hasstatus`` that one already exists in the
8
+ command or specify via `hasstatus` that one already exists in the
9
9
  init script.
10
10
 
11
11
  "
@@ -1,9 +1,9 @@
1
1
  # Manage Red Hat services. Start/stop uses /sbin/service and enable/disable uses chkconfig
2
2
 
3
3
  Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init do
4
- desc "Red Hat's (and probably many others) form of ``init``-style service management:
4
+ desc "Red Hat's (and probably many others) form of `init`-style service management:
5
5
 
6
- Uses ``chkconfig`` for service enabling and disabling.
6
+ Uses `chkconfig` for service enabling and disabling.
7
7
 
8
8
  "
9
9
 
@@ -1,10 +1,10 @@
1
1
  require 'puppet/provider/ldap'
2
2
 
3
3
  Puppet::Type.type(:user).provide :ldap, :parent => Puppet::Provider::Ldap do
4
- desc "User management via ``ldap``. This provider requires that you
4
+ desc "User management via `ldap`. This provider requires that you
5
5
  have valid values for all of the ldap-related settings,
6
- including ``ldapbase``. You will also almost definitely need settings
7
- for ``ldapuser`` and ``ldappassword``, so that your clients can write
6
+ including `ldapbase`. You will also almost definitely need settings
7
+ for `ldapuser` and `ldappassword`, so that your clients can write
8
8
  to ldap.
9
9
 
10
10
  Note that this provider will automatically generate a UID for you if
@@ -1,7 +1,7 @@
1
1
  require 'puppet/provider/nameservice/pw'
2
2
 
3
3
  Puppet::Type.type(:user).provide :pw, :parent => Puppet::Provider::NameService::PW do
4
- desc "User management via ``pw`` on FreeBSD."
4
+ desc "User management via `pw` on FreeBSD."
5
5
 
6
6
  commands :pw => "pw"
7
7
  has_features :manages_homedir, :allows_duplicates
@@ -2,7 +2,7 @@ require 'puppet/util/user_attr'
2
2
 
3
3
  Puppet::Type.type(:user).provide :user_role_add, :parent => :useradd, :source => :useradd do
4
4
 
5
- desc "User management inherits ``useradd`` and adds logic to manage roles on Solaris using roleadd."
5
+ desc "User management inherits `useradd` and adds logic to manage roles on Solaris using roleadd."
6
6
 
7
7
  defaultfor :operatingsystem => :solaris
8
8
 
@@ -1,7 +1,7 @@
1
1
  require 'puppet/provider/nameservice/objectadd'
2
2
 
3
3
  Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameService::ObjectAdd do
4
- desc "User management via ``useradd`` and its ilk. Note that you will need to install the ``Shadow Password`` Ruby library often known as ruby-libshadow to manage user passwords."
4
+ desc "User management via `useradd` and its ilk. Note that you will need to install the `Shadow Password` Ruby library often known as ruby-libshadow to manage user passwords."
5
5
 
6
6
  commands :add => "useradd", :delete => "userdel", :modify => "usermod"
7
7
 
@@ -1,3 +1,4 @@
1
+ require 'puppet/rails'
1
2
  require 'puppet/rails/resource'
2
3
  require 'puppet/rails/fact_name'
3
4
  require 'puppet/rails/source_file'
@@ -33,7 +33,7 @@ config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc
33
33
  # Leave out the section information; it was apparently confusing people.
34
34
  #str += "- **Section**: #{object.section}\n"
35
35
  unless val == ""
36
- str += "- **Default**: #{val}\n"
36
+ str += "- *Default*: #{val}\n"
37
37
  end
38
38
  str += "\n"
39
39
  end
@@ -47,7 +47,7 @@ Specifying Configuration Parameters
47
47
 
48
48
  On The Command-Line
49
49
  +++++++++++++++++++
50
- Every Puppet executable (with the exception of ``puppetdoc``) accepts all of
50
+ Every Puppet executable (with the exception of `puppetdoc`) accepts all of
51
51
  the parameters below, but not all of the arguments make sense for every executable.
52
52
 
53
53
  I have tried to be as thorough as possible in the descriptions of the
@@ -55,60 +55,61 @@ arguments, so it should be obvious whether an argument is appropriate or not.
55
55
 
56
56
  These parameters can be supplied to the executables either as command-line
57
57
  options or in the configuration file. For instance, the command-line
58
- invocation below would set the configuration directory to ``/private/puppet``::
58
+ invocation below would set the configuration directory to `/private/puppet`:
59
59
 
60
- $ puppet agent --confdir=/private/puppet
60
+ $ puppet agent --confdir=/private/puppet
61
61
 
62
62
  Note that boolean options are turned on and off with a slightly different
63
- syntax on the command line::
63
+ syntax on the command line:
64
64
 
65
- $ puppet agent --storeconfigs
65
+ $ puppet agent --storeconfigs
66
66
 
67
- $ puppet agent --no-storeconfigs
67
+ $ puppet agent --no-storeconfigs
68
68
 
69
69
  The invocations above will enable and disable, respectively, the storage of
70
70
  the client configuration.
71
71
 
72
72
  Configuration Files
73
73
  +++++++++++++++++++
74
+
74
75
  As mentioned above, the configuration parameters can also be stored in a
75
76
  configuration file, located in the configuration directory. As root, the
76
- default configuration directory is ``/etc/puppet``, and as a regular user, the
77
- default configuration directory is ``~user/.puppet``. As of 0.23.0, all
78
- executables look for ``puppet.conf`` in their configuration directory
77
+ default configuration directory is `/etc/puppet`, and as a regular user, the
78
+ default configuration directory is `~user/.puppet`. As of 0.23.0, all
79
+ executables look for `puppet.conf` in their configuration directory
79
80
  (although they previously looked for separate files). For example,
80
- ``puppet.conf`` is located at ``/etc/puppet/puppet.conf`` as root and
81
- ``~user/.puppet/puppet.conf`` as a regular user by default.
81
+ `puppet.conf` is located at `/etc/puppet/puppet.conf` as `root` and
82
+ `~user/.puppet/puppet.conf` as a regular user by default.
82
83
 
83
- All executables will set any parameters set within the ``main`` section,
84
- and each executable will also use one of the ``master``, ``agent``, or
85
- ``user`` sections.
84
+ All executables will set any parameters set within the `[main]` section,
85
+ and each executable will also use one of the `[master]`, `[agent]`.
86
86
 
87
87
  File Format
88
88
  '''''''''''
89
+
89
90
  The file follows INI-style formatting. Here is an example of a very simple
90
- ``puppet.conf`` file::
91
+ `puppet.conf` file:
91
92
 
92
- [main]
93
- confdir = /private/puppet
94
- storeconfigs = true
93
+ [main]
94
+ confdir = /private/puppet
95
+ storeconfigs = true
95
96
 
96
97
  Note that boolean parameters must be explicitly specified as `true` or
97
98
  `false` as seen above.
98
99
 
99
100
  If you need to change file parameters (e.g., reset the mode or owner), do
100
- so within curly braces on the same line::
101
+ so within curly braces on the same line:
101
102
 
102
- [main]
103
- myfile = /tmp/whatever {owner = root, mode = 644}
103
+ [main]
104
+ myfile = /tmp/whatever {owner = root, mode = 644}
104
105
 
105
106
  If you're starting out with a fresh configuration, you may wish to let
106
107
  the executable generate a template configuration file for you by invoking
107
108
  the executable in question with the `--genconfig` command. The executable
108
109
  will print a template configuration to standard output, which can be
109
- redirected to a file like so::
110
+ redirected to a file like so:
110
111
 
111
- $ puppet agent --genconfig > /etc/puppet/puppet.conf
112
+ $ puppet agent --genconfig > /etc/puppet/puppet.conf
112
113
 
113
114
  Note that this invocation will replace the contents of any pre-existing
114
115
  `puppet.conf` file, so make a backup of your present config if it contains
@@ -117,28 +118,30 @@ valuable information.
117
118
  Like the `--genconfig` argument, the executables also accept a `--genmanifest`
118
119
  argument, which will generate a manifest that can be used to manage all of
119
120
  Puppet's directories and files and prints it to standard output. This can
120
- likewise be redirected to a file::
121
+ likewise be redirected to a file:
121
122
 
122
- $ puppet agent --genmanifest > /etc/puppet/manifests/site.pp
123
+ $ puppet agent --genmanifest > /etc/puppet/manifests/site.pp
123
124
 
124
125
  Puppet can also create user and group accounts for itself (one `puppet` group
125
- and one `puppet` user) if it is invoked as `root` with the `--mkusers` argument::
126
+ and one `puppet` user) if it is invoked as `root` with the `--mkusers` argument:
126
127
 
127
- $ puppet agent --mkusers
128
+ $ puppet agent --mkusers
128
129
 
129
130
  Signals
130
131
  -------
131
- The ``puppet agent`` and ``puppet master`` executables catch some signals for special
132
- handling. Both daemons catch (``SIGHUP``), which forces the server to restart
133
- tself. Predictably, interrupt and terminate (``SIGINT`` and ``SIGTERM``) will shut
134
- down the server, whether it be an instance of ``puppet agent`` or ``puppet master``.
135
132
 
136
- Sending the ``SIGUSR1`` signal to an instance of ``puppet agent`` will cause it to
133
+ The `puppet agent` and `puppet master` executables catch some signals for special
134
+ handling. Both daemons catch (`SIGHUP`), which forces the server to restart
135
+ tself. Predictably, interrupt and terminate (`SIGINT` and `SIGTERM`) will shut
136
+ down the server, whether it be an instance of `puppet agent` or `puppet master`.
137
+
138
+ Sending the `SIGUSR1` signal to an instance of `puppet agent` will cause it to
137
139
  immediately begin a new configuration transaction with the server. This
138
- signal has no effect on ``puppet master``.
140
+ signal has no effect on `puppet master`.
139
141
 
140
142
  Configuration Parameter Reference
141
143
  ---------------------------------
144
+
142
145
  Below is a list of all documented parameters. Not all of them are valid with all
143
146
  Puppet executables, but the executables will ignore any inappropriate values.
144
147