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
@@ -3,27 +3,27 @@ module Puppet
3
3
  require 'etc'
4
4
  desc "Whether to create files that don't currently exist.
5
5
  Possible values are *absent*, *present*, *file*, and *directory*.
6
- Specifying ``present`` will match any form of file existence, and
6
+ Specifying `present` will match any form of file existence, and
7
7
  if the file is missing will create an empty file. Specifying
8
- ``absent`` will delete the file (and directory if recurse => true).
8
+ `absent` will delete the file (and directory if recurse => true).
9
9
 
10
10
  Anything other than those values will be considered to be a symlink.
11
- For instance, the following text creates a link::
11
+ For instance, the following text creates a link:
12
12
 
13
- # Useful on solaris
14
- file { \"/etc/inetd.conf\":
15
- ensure => \"/etc/inet/inetd.conf\"
16
- }
13
+ # Useful on solaris
14
+ file { \"/etc/inetd.conf\":
15
+ ensure => \"/etc/inet/inetd.conf\"
16
+ }
17
17
 
18
- You can make relative links::
18
+ You can make relative links:
19
19
 
20
- # Useful on solaris
21
- file { \"/etc/inetd.conf\":
22
- ensure => \"inet/inetd.conf\"
23
- }
20
+ # Useful on solaris
21
+ file { \"/etc/inetd.conf\":
22
+ ensure => \"inet/inetd.conf\"
23
+ }
24
24
 
25
25
  If you need to make a relative link to a file named the same
26
- as one of the valid values, you must prefix it with ``./`` or
26
+ as one of the valid values, you must prefix it with `./` or
27
27
  something similar.
28
28
 
29
29
  You can also make recursive symlinks, which will create a
@@ -13,14 +13,14 @@ module Puppet
13
13
  entries in a directory, and search/traverse allows you to access
14
14
  (read/write/execute) those entries.) Because of this feature, you
15
15
  can recursively make a directory and all of the files in it
16
- world-readable by setting e.g.::
16
+ world-readable by setting e.g.:
17
17
 
18
- file { '/some/dir':
19
- mode => 644,
20
- recurse => true,
21
- }
18
+ file { '/some/dir':
19
+ mode => 644,
20
+ recurse => true,
21
+ }
22
22
 
23
- In this case all of the files underneath ``/some/dir`` will have
23
+ In this case all of the files underneath `/some/dir` will have
24
24
  mode 644, and all of the directories will have mode 755."
25
25
 
26
26
  @event = :file_changed
@@ -56,7 +56,7 @@ module Puppet
56
56
 
57
57
  Puppet::Type.type(:file).newproperty(:seluser, :parent => Puppet::SELFileContext) do
58
58
  desc "What the SELinux user component of the context of the file should be.
59
- Any valid SELinux user component is accepted. For example ``user_u``.
59
+ Any valid SELinux user component is accepted. For example `user_u`.
60
60
  If not specified it defaults to the value returned by matchpathcon for
61
61
  the file, if any exists. Only valid on systems with SELinux support
62
62
  enabled."
@@ -67,7 +67,7 @@ module Puppet
67
67
 
68
68
  Puppet::Type.type(:file).newproperty(:selrole, :parent => Puppet::SELFileContext) do
69
69
  desc "What the SELinux role component of the context of the file should be.
70
- Any valid SELinux role component is accepted. For example ``role_r``.
70
+ Any valid SELinux role component is accepted. For example `role_r`.
71
71
  If not specified it defaults to the value returned by matchpathcon for
72
72
  the file, if any exists. Only valid on systems with SELinux support
73
73
  enabled."
@@ -78,7 +78,7 @@ module Puppet
78
78
 
79
79
  Puppet::Type.type(:file).newproperty(:seltype, :parent => Puppet::SELFileContext) do
80
80
  desc "What the SELinux type component of the context of the file should be.
81
- Any valid SELinux type component is accepted. For example ``tmp_t``.
81
+ Any valid SELinux type component is accepted. For example `tmp_t`.
82
82
  If not specified it defaults to the value returned by matchpathcon for
83
83
  the file, if any exists. Only valid on systems with SELinux support
84
84
  enabled."
@@ -89,8 +89,8 @@ module Puppet
89
89
 
90
90
  Puppet::Type.type(:file).newproperty(:selrange, :parent => Puppet::SELFileContext) do
91
91
  desc "What the SELinux range component of the context of the file should be.
92
- Any valid SELinux range component is accepted. For example ``s0`` or
93
- ``SystemHigh``. If not specified it defaults to the value returned by
92
+ Any valid SELinux range component is accepted. For example `s0` or
93
+ `SystemHigh`. If not specified it defaults to the value returned by
94
94
  matchpathcon for the file, if any exists. Only valid on systems with
95
95
  SELinux support enabled and that have support for MCS (Multi-Category
96
96
  Security)."
@@ -12,7 +12,7 @@ module Puppet
12
12
  include Puppet::Util::Diff
13
13
 
14
14
  attr_accessor :source, :local
15
- desc "Copy a file over the current file. Uses ``checksum`` to
15
+ desc "Copy a file over the current file. Uses `checksum` to
16
16
  determine when a file should be copied. Valid values are either
17
17
  fully qualified paths to files, or URIs. Currently supported URI
18
18
  types are *puppet* and *file*.
@@ -20,47 +20,47 @@ module Puppet
20
20
  This is one of the primary mechanisms for getting content into
21
21
  applications that Puppet does not directly support and is very
22
22
  useful for those configuration files that don't change much across
23
- sytems. For instance::
23
+ sytems. For instance:
24
24
 
25
- class sendmail {
26
- file { \"/etc/mail/sendmail.cf\":
27
- source => \"puppet://server/modules/module_name/sendmail.cf\"
25
+ class sendmail {
26
+ file { \"/etc/mail/sendmail.cf\":
27
+ source => \"puppet://server/modules/module_name/sendmail.cf\"
28
+ }
28
29
  }
29
- }
30
30
 
31
- You can also leave out the server name, in which case ``puppet agent``
32
- will fill in the name of its configuration server and ``puppet apply``
31
+ You can also leave out the server name, in which case `puppet agent`
32
+ will fill in the name of its configuration server and `puppet apply`
33
33
  will use the local filesystem. This makes it easy to use the same
34
34
  configuration in both local and centralized forms.
35
35
 
36
- Currently, only the ``puppet`` scheme is supported for source
36
+ Currently, only the `puppet` scheme is supported for source
37
37
  URL's. Puppet will connect to the file server running on
38
- ``server`` to retrieve the contents of the file. If the
39
- ``server`` part is empty, the behavior of the command-line
40
- interpreter (``puppet apply``) and the client demon (``puppet agent``) differs
41
- slightly: ``apply`` will look such a file up on the module path
42
- on the local host, whereas ``agent`` will connect to the
38
+ `server` to retrieve the contents of the file. If the
39
+ `server` part is empty, the behavior of the command-line
40
+ interpreter (`puppet apply`) and the client demon (`puppet agent`) differs
41
+ slightly: `apply` will look such a file up on the module path
42
+ on the local host, whereas `agent` will connect to the
43
43
  puppet server that it received the manifest from.
44
44
 
45
- See the `FileServingConfiguration fileserver configuration documentation`:trac: for information on how to configure
45
+ See the [fileserver configuration documentation](http://projects.puppetlabs.com/projects/puppet/wiki/File_Serving_Configuration) for information on how to configure
46
46
  and use file services within Puppet.
47
47
 
48
48
  If you specify multiple file sources for a file, then the first
49
49
  source that exists will be used. This allows you to specify
50
- what amount to search paths for files::
51
-
52
- file { \"/path/to/my/file\":
53
- source => [
54
- \"/modules/nfs/files/file.$host\",
55
- \"/modules/nfs/files/file.$operatingsystem\",
56
- \"/modules/nfs/files/file\"
57
- ]
58
- }
50
+ what amount to search paths for files:
51
+
52
+ file { \"/path/to/my/file\":
53
+ source => [
54
+ \"/modules/nfs/files/file.$host\",
55
+ \"/modules/nfs/files/file.$operatingsystem\",
56
+ \"/modules/nfs/files/file\"
57
+ ]
58
+ }
59
59
 
60
60
  This will use the first found file as the source.
61
61
 
62
- You cannot currently copy links using this mechanism; set ``links``
63
- to ``follow`` if any remote sources are links.
62
+ You cannot currently copy links using this mechanism; set `links`
63
+ to `follow` if any remote sources are links.
64
64
  "
65
65
 
66
66
  validate do |sources|
@@ -94,6 +94,16 @@ module Puppet
94
94
  metadata && metadata.checksum
95
95
  end
96
96
 
97
+ # Look up (if necessary) and return remote content.
98
+ cached_attr(:content) do
99
+ raise Puppet::DevError, "No source for content was stored with the metadata" unless metadata.source
100
+
101
+ unless tmp = Puppet::FileServing::Content.find(metadata.source)
102
+ fail "Could not find any content at %s" % metadata.source
103
+ end
104
+ tmp.content
105
+ end
106
+
97
107
  # Copy the values from the source to the resource. Yay.
98
108
  def copy_source_values
99
109
  devfail "Somehow got asked to copy source values without any metadata" unless metadata
@@ -16,13 +16,13 @@ module Puppet
16
16
  undo transactions.
17
17
 
18
18
  You will normally want to define a single filebucket for your
19
- whole network and then use that as the default backup location::
19
+ whole network and then use that as the default backup location:
20
20
 
21
- # Define the bucket
22
- filebucket { main: server => puppet }
21
+ # Define the bucket
22
+ filebucket { main: server => puppet }
23
23
 
24
- # Specify it as the default target
25
- File { backup => main }
24
+ # Specify it as the default target
25
+ File { backup => main }
26
26
 
27
27
  Puppetmaster servers create a filebucket by default, so this will
28
28
  work in a default configuration."
@@ -92,4 +92,3 @@ module Puppet
92
92
  end
93
93
  end
94
94
  end
95
-
@@ -89,7 +89,7 @@ module Puppet
89
89
 
90
90
  newparam(:allowdupe, :boolean => true) do
91
91
  desc "Whether to allow duplicate GIDs. This option does not work on
92
- FreeBSD (contract to the ``pw`` man page)."
92
+ FreeBSD (contract to the `pw` man page)."
93
93
 
94
94
  newvalues(:true, :false)
95
95
 
@@ -97,4 +97,3 @@ module Puppet
97
97
  end
98
98
  end
99
99
  end
100
-
@@ -14,10 +14,8 @@ module Puppet
14
14
  end
15
15
 
16
16
  newproperty(:host_aliases) do
17
- desc 'Any aliases the host might have. Multiple values must be
18
- specified as an array. Note that this property is not the same as
19
- the "alias" metaparam; use this property to add aliases to a host
20
- on disk, and "alias" to aliases for use in your Puppet scripts.'
17
+ desc "Any aliases the host might have. Multiple values must be
18
+ specified as an array."
21
19
 
22
20
  def insync?(is)
23
21
  is == @should
@@ -94,8 +92,7 @@ module Puppet
94
92
  end
95
93
 
96
94
  @doc = "Installs and manages host entries. For most systems, these
97
- entries will just be in ``/etc/hosts``, but some systems (notably OS X)
95
+ entries will just be in `/etc/hosts`, but some systems (notably OS X)
98
96
  will have different solutions."
99
97
  end
100
98
  end
101
-
@@ -3,15 +3,15 @@
3
3
  # Plug-in type for handling k5login files
4
4
 
5
5
  Puppet::Type.newtype(:k5login) do
6
- @doc = "Manage the .k5login file for a user. Specify the full path to
7
- the .k5login file as the name and an array of principals as the
6
+ @doc = "Manage the `.k5login` file for a user. Specify the full path to
7
+ the `.k5login` file as the name and an array of principals as the
8
8
  property principals."
9
9
 
10
10
  ensurable
11
11
 
12
12
  # Principals that should exist in the file
13
13
  newproperty(:principals, :array_matching => :all) do
14
- desc "The principals present in the .k5login file."
14
+ desc "The principals present in the `.k5login` file."
15
15
  end
16
16
 
17
17
  # The path/name of the k5login file
@@ -1,8 +1,7 @@
1
1
  Puppet::Type.newtype(:macauthorization) do
2
2
 
3
3
  @doc = "Manage the Mac OS X authorization database.
4
- See:
5
- http://developer.apple.com/documentation/Security/Conceptual/Security_Overview/Security_Services/chapter_4_section_5.html for more information."
4
+ See the [Apple developer site](http://developer.apple.com/documentation/Security/Conceptual/Security_Overview/Security_Services/chapter_4_section_5.html) for more information."
6
5
 
7
6
  ensurable
8
7
 
@@ -46,4 +46,3 @@ module Puppet
46
46
  end
47
47
  end
48
48
  end
49
-
@@ -60,4 +60,3 @@ module Puppet
60
60
  end
61
61
  end
62
62
  end
63
-
@@ -21,8 +21,6 @@ Puppet::Type.newtype(:mcx) do
21
21
 
22
22
  @doc = "MCX object management using DirectoryService on OS X.
23
23
 
24
- Original Author: Jeff McCune <mccune.jeff@gmail.com>
25
-
26
24
  The default provider of this type merely manages the XML plist as
27
25
  reported by the dscl -mcxexport command. This is similar to the
28
26
  content property of the file type in Puppet.
@@ -51,13 +49,13 @@ to other machines.
51
49
 
52
50
  newparam(:name) do
53
51
  desc "The name of the resource being managed.
54
- The default naming convention follows Directory Service paths::
52
+ The default naming convention follows Directory Service paths:
55
53
 
56
- /Computers/localhost
57
- /Groups/admin
58
- /Users/localadmin
54
+ /Computers/localhost
55
+ /Groups/admin
56
+ /Users/localadmin
59
57
 
60
- The ds_type and ds_name type parameters are not necessary if the
58
+ The `ds_type` and `ds_name` type parameters are not necessary if the
61
59
  default naming convention is followed."
62
60
  isnamevar
63
61
  end
@@ -80,8 +78,10 @@ to other machines.
80
78
  newproperty(:content, :required_features => :manages_content) do
81
79
  desc "The XML Plist. The value of MCXSettings in DirectoryService.
82
80
  This is the standard output from the system command:
83
- dscl localhost -mcxexport /Local/Default/<ds_type>/ds_name
84
- Note that ds_type is capitalized and plural in the dscl command."
81
+
82
+ dscl localhost -mcxexport /Local/Default/<ds_type>/ds_name
83
+
84
+ Note that `ds_type` is capitalized and plural in the dscl command."
85
85
  end
86
86
 
87
87
  # JJM Yes, this is not DRY at all. Because of the code blocks
@@ -5,8 +5,8 @@ module Puppet
5
5
  information into the mount table. The actual behavior depends
6
6
  on the value of the 'ensure' parameter.
7
7
 
8
- Note that if a ``mount`` receives an event from another resource,
9
- it will try to remount the filesystems if ``ensure`` is set to ``mounted``."
8
+ Note that if a `mount` receives an event from another resource,
9
+ it will try to remount the filesystems if `ensure` is set to `mounted`."
10
10
 
11
11
  feature :refreshable, "The provider can remount the filesystem.",
12
12
  :methods => [:remount]
@@ -15,10 +15,10 @@ module Puppet
15
15
  # call code when sync is called.
16
16
  newproperty(:ensure) do
17
17
  desc "Control what to do with this mount. Set this attribute to
18
- ``umounted`` to make sure the filesystem is in the filesystem table
19
- but not mounted (if the filesystem is currently mounted, it will be unmounted). Set it to ``absent`` to unmount (if necessary) and remove
20
- the filesystem from the fstab. Set to ``mounted`` to add it to the
21
- fstab and mount it. Set to ``present`` to add to fstab but not change
18
+ `umounted` to make sure the filesystem is in the filesystem table
19
+ but not mounted (if the filesystem is currently mounted, it will be unmounted). Set it to `absent` to unmount (if necessary) and remove
20
+ the filesystem from the fstab. Set to `mounted` to add it to the
21
+ fstab and mount it. Set to `present` to add to fstab but not change
22
22
  mount/unmount status"
23
23
 
24
24
  newvalue(:defined) do
@@ -149,7 +149,7 @@ module Puppet
149
149
 
150
150
  newproperty(:dump) do
151
151
  desc "Whether to dump the mount. Not all platform support this.
152
- Valid values are ``1`` or ``0``. or ``2`` on FreeBSD, Default is ``0``."
152
+ Valid values are `1` or `0`. or `2` on FreeBSD, Default is `0`."
153
153
 
154
154
  if Facter["operatingsystem"].value == "FreeBSD"
155
155
  newvalue(%r{(0|1|2)})
@@ -183,7 +183,7 @@ module Puppet
183
183
  end
184
184
 
185
185
  newparam(:path) do
186
- desc "The deprecated name for the mount point. Please use ``name`` now."
186
+ desc "The deprecated name for the mount point. Please use `name` now."
187
187
 
188
188
  def value=(value)
189
189
  warning "'path' is deprecated for mounts. Please use 'name'."
@@ -193,7 +193,7 @@ module Puppet
193
193
  end
194
194
 
195
195
  newparam(:remounts) do
196
- desc "Whether the mount can be remounted ``mount -o remount``. If
196
+ desc "Whether the mount can be remounted `mount -o remount`. If
197
197
  this is false, then the filesystem will be unmounted and remounted
198
198
  manually, which is prone to failure."
199
199
 
@@ -222,4 +222,3 @@ module Puppet
222
222
  end
223
223
  end
224
224
  end
225
-
@@ -42,4 +42,3 @@ module Puppet
42
42
  end
43
43
  end
44
44
  end
45
-
@@ -8,12 +8,12 @@ module Puppet
8
8
  @doc = "Manage packages. There is a basic dichotomy in package
9
9
  support right now: Some package types (e.g., yum and apt) can
10
10
  retrieve their own package files, while others (e.g., rpm and sun) cannot. For those package formats that cannot retrieve
11
- their own files, you can use the ``source`` parameter to point to
11
+ their own files, you can use the `source` parameter to point to
12
12
  the correct file.
13
13
 
14
14
  Puppet will automatically guess the packaging format that you are
15
15
  using based on the platform you are on, but you can override it
16
- using the ``provider`` parameter; each provider defines what it
16
+ using the `provider` parameter; each provider defines what it
17
17
  requires in order to function, and you must meet those requirements
18
18
  to use a given provider."
19
19
 
@@ -22,7 +22,7 @@ module Puppet
22
22
  feature :uninstallable, "The provider can uninstall packages.",
23
23
  :methods => [:uninstall]
24
24
  feature :upgradeable, "The provider can upgrade to the latest version of a
25
- package. This feature is used by specifying ``latest`` as the
25
+ package. This feature is used by specifying `latest` as the
26
26
  desired value for the package.",
27
27
  :methods => [:update, :latest]
28
28
  feature :purgeable, "The provider can purge packages. This generally means
@@ -104,7 +104,6 @@ module Puppet
104
104
  end
105
105
  end
106
106
 
107
-
108
107
  defaultto :installed
109
108
 
110
109
  # Override the parent method, because we've got all kinds of
@@ -181,35 +180,35 @@ module Puppet
181
180
  system uses internally, which is sometimes (especially on Solaris)
182
181
  a name that is basically useless to humans. If you want to
183
182
  abstract package installation, then you can use aliases to provide
184
- a common name to packages::
185
-
186
- # In the 'openssl' class
187
- $ssl = $operatingsystem ? {
188
- solaris => SMCossl,
189
- default => openssl
190
- }
191
-
192
- # It is not an error to set an alias to the same value as the
193
- # object name.
194
- package { $ssl:
195
- ensure => installed,
196
- alias => openssl
197
- }
198
-
199
- . etc. .
200
-
201
- $ssh = $operatingsystem ? {
202
- solaris => SMCossh,
203
- default => openssh
204
- }
205
-
206
- # Use the alias to specify a dependency, rather than
207
- # having another selector to figure it out again.
208
- package { $ssh:
209
- ensure => installed,
210
- alias => openssh,
211
- require => Package[openssl]
212
- }
183
+ a common name to packages:
184
+
185
+ # In the 'openssl' class
186
+ $ssl = $operatingsystem ? {
187
+ solaris => SMCossl,
188
+ default => openssl
189
+ }
190
+
191
+ # It is not an error to set an alias to the same value as the
192
+ # object name.
193
+ package { $ssl:
194
+ ensure => installed,
195
+ alias => openssl
196
+ }
197
+
198
+ . etc. .
199
+
200
+ $ssh = $operatingsystem ? {
201
+ solaris => SMCossh,
202
+ default => openssh
203
+ }
204
+
205
+ # Use the alias to specify a dependency, rather than
206
+ # having another selector to figure it out again.
207
+ package { $ssh:
208
+ ensure => installed,
209
+ alias => openssh,
210
+ require => Package[openssl]
211
+ }
213
212
 
214
213
  "
215
214
  isnamevar
@@ -228,7 +227,7 @@ module Puppet
228
227
  end
229
228
 
230
229
  newparam(:type) do
231
- desc "Deprecated form of ``provider``."
230
+ desc "Deprecated form of `provider`."
232
231
 
233
232
  munge do |value|
234
233
  warning "'type' is deprecated; use 'provider' instead"
@@ -243,7 +242,7 @@ module Puppet
243
242
  This is currently only used on Solaris. The value will be
244
243
  validated according to system rules, which in the case of
245
244
  Solaris means that it should either be a fully qualified path
246
- or it should be in /var/sadm/install/admin."
245
+ or it should be in `/var/sadm/install/admin`."
247
246
  end
248
247
 
249
248
  newparam(:responsefile) do
@@ -320,4 +319,3 @@ module Puppet
320
319
  end
321
320
  end
322
321
  end
323
-