puppet 3.3.2 → 3.4.0.rc1

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 (589) hide show
  1. data/CONTRIBUTING.md +22 -0
  2. data/Gemfile +11 -2
  3. data/README.md +13 -17
  4. data/README_DEVELOPER.md +1 -1
  5. data/Rakefile +1 -1
  6. data/examples/hiera/README.md +4 -4
  7. data/ext/debian/puppetmaster.init +1 -0
  8. data/ext/debian/rules +2 -5
  9. data/ext/nagios/check_puppet.rb +7 -7
  10. data/ext/osx/file_mapping.yaml +1 -1
  11. data/ext/osx/preflight.erb +34 -19
  12. data/ext/rack/{files/config.ru → config.ru} +0 -0
  13. data/ext/rack/{files/apache2.conf → example-passenger-vhost.conf} +6 -0
  14. data/ext/redhat/puppet.spec.erb +20 -2
  15. data/ext/systemd/{puppetagent.service → puppet.service} +0 -0
  16. data/lib/hiera_puppet.rb +2 -2
  17. data/lib/puppet/agent.rb +1 -6
  18. data/lib/puppet/application.rb +15 -2
  19. data/lib/puppet/application/agent.rb +2 -7
  20. data/lib/puppet/application/apply.rb +8 -13
  21. data/lib/puppet/application/cert.rb +47 -7
  22. data/lib/puppet/application/device.rb +1 -6
  23. data/lib/puppet/application/face_base.rb +1 -1
  24. data/lib/puppet/application/filebucket.rb +1 -1
  25. data/lib/puppet/application/inspect.rb +3 -12
  26. data/lib/puppet/application/master.rb +1 -6
  27. data/lib/puppet/application/queue.rb +1 -6
  28. data/lib/puppet/application/resource.rb +2 -6
  29. data/lib/puppet/coercion.rb +11 -0
  30. data/lib/puppet/configurer.rb +5 -3
  31. data/lib/puppet/configurer/downloader.rb +3 -1
  32. data/lib/puppet/configurer/plugin_handler.rb +10 -0
  33. data/lib/puppet/confine.rb +80 -0
  34. data/lib/puppet/{provider/confine → confine}/exists.rb +3 -3
  35. data/lib/puppet/{provider/confine → confine}/false.rb +2 -2
  36. data/lib/puppet/{provider/confine → confine}/feature.rb +2 -2
  37. data/lib/puppet/{provider/confine → confine}/true.rb +2 -2
  38. data/lib/puppet/{provider/confine → confine}/variable.rb +2 -2
  39. data/lib/puppet/{provider/confine_collection.rb → confine_collection.rb} +4 -4
  40. data/lib/puppet/{provider/confiner.rb → confiner.rb} +4 -4
  41. data/lib/puppet/daemon.rb +2 -6
  42. data/lib/puppet/data_binding.rb +2 -30
  43. data/lib/puppet/defaults.rb +283 -174
  44. data/lib/puppet/error.rb +1 -0
  45. data/lib/puppet/external/nagios.rb +0 -2
  46. data/lib/puppet/external/nagios/base.rb +4 -3
  47. data/lib/puppet/external/nagios/grammar.ry +173 -112
  48. data/lib/puppet/external/nagios/parser.rb +233 -184
  49. data/lib/puppet/face/file/store.rb +1 -1
  50. data/lib/puppet/face/module/generate.rb +5 -7
  51. data/lib/puppet/face/parser.rb +12 -2
  52. data/lib/puppet/face/plugin.rb +6 -0
  53. data/lib/puppet/feature/base.rb +16 -0
  54. data/lib/puppet/feature/external_facts.rb +5 -0
  55. data/lib/puppet/feature/libuser.rb +1 -1
  56. data/lib/puppet/feature/msgpack.rb +1 -0
  57. data/lib/puppet/feature/rails.rb +2 -2
  58. data/lib/puppet/file_bucket/dipper.rb +8 -6
  59. data/lib/puppet/file_bucket/file.rb +17 -1
  60. data/lib/puppet/file_serving/base.rb +21 -10
  61. data/lib/puppet/file_serving/configuration.rb +5 -7
  62. data/lib/puppet/file_serving/configuration/parser.rb +1 -1
  63. data/lib/puppet/file_serving/content.rb +1 -1
  64. data/lib/puppet/file_serving/fileset.rb +3 -3
  65. data/lib/puppet/file_serving/metadata.rb +22 -18
  66. data/lib/puppet/file_serving/mount/file.rb +1 -1
  67. data/lib/puppet/file_serving/mount/pluginfacts.rb +35 -0
  68. data/lib/puppet/file_system.rb +3 -0
  69. data/lib/puppet/file_system/file.rb +261 -0
  70. data/lib/puppet/file_system/file18.rb +5 -0
  71. data/lib/puppet/file_system/file19.rb +5 -0
  72. data/lib/puppet/file_system/file19windows.rb +113 -0
  73. data/lib/puppet/file_system/memory_file.rb +31 -0
  74. data/lib/puppet/file_system/tempfile.rb +20 -0
  75. data/lib/puppet/indirector/active_record.rb +1 -0
  76. data/lib/puppet/indirector/catalog/compiler.rb +28 -0
  77. data/lib/puppet/indirector/certificate_request/memory.rb +6 -0
  78. data/lib/puppet/indirector/data_binding/hiera.rb +46 -2
  79. data/lib/puppet/indirector/direct_file_server.rb +2 -2
  80. data/lib/puppet/indirector/facts/facter.rb +25 -0
  81. data/lib/puppet/indirector/file_bucket_file/file.rb +60 -74
  82. data/lib/puppet/indirector/indirection.rb +5 -1
  83. data/lib/puppet/indirector/json.rb +1 -1
  84. data/lib/puppet/indirector/key/ca.rb +4 -0
  85. data/lib/puppet/indirector/key/file.rb +7 -3
  86. data/lib/puppet/indirector/key/memory.rb +6 -0
  87. data/lib/puppet/indirector/node/write_only_yaml.rb +2 -2
  88. data/lib/puppet/indirector/request.rb +17 -11
  89. data/lib/puppet/indirector/resource/ral.rb +5 -0
  90. data/lib/puppet/indirector/resource/rest.rb +1 -0
  91. data/lib/puppet/indirector/resource/store_configs.rb +4 -0
  92. data/lib/puppet/indirector/rest.rb +2 -1
  93. data/lib/puppet/indirector/ssl_file.rb +7 -7
  94. data/lib/puppet/indirector/terminus.rb +4 -0
  95. data/lib/puppet/indirector/yaml.rb +3 -3
  96. data/lib/puppet/interface/documentation.rb +4 -11
  97. data/lib/puppet/module.rb +19 -6
  98. data/lib/puppet/module_tool/applications/builder.rb +1 -1
  99. data/lib/puppet/module_tool/applications/installer.rb +1 -1
  100. data/lib/puppet/module_tool/checksums.rb +1 -1
  101. data/lib/puppet/module_tool/dependency.rb +7 -3
  102. data/lib/puppet/module_tool/metadata.rb +6 -2
  103. data/lib/puppet/module_tool/tar.rb +2 -1
  104. data/lib/puppet/module_tool/tar/gnu.rb +6 -2
  105. data/lib/puppet/module_tool/tar/mini.rb +2 -0
  106. data/lib/puppet/module_tool/tar/solaris.rb +2 -5
  107. data/lib/puppet/network/authconfig.rb +0 -2
  108. data/lib/puppet/network/authentication.rb +1 -1
  109. data/lib/puppet/network/authstore.rb +6 -7
  110. data/lib/puppet/network/format.rb +2 -3
  111. data/lib/puppet/network/format_handler.rb +16 -11
  112. data/lib/puppet/network/format_support.rb +14 -0
  113. data/lib/puppet/network/formats.rb +26 -0
  114. data/lib/puppet/network/http/connection.rb +8 -41
  115. data/lib/puppet/network/http/handler.rb +28 -32
  116. data/lib/puppet/network/http/webrick.rb +15 -22
  117. data/lib/puppet/network/http_pool.rb +43 -9
  118. data/lib/puppet/network/rights.rb +0 -0
  119. data/lib/puppet/node.rb +24 -8
  120. data/lib/puppet/node/environment.rb +18 -20
  121. data/lib/puppet/node/facts.rb +23 -6
  122. data/lib/puppet/parameter.rb +15 -2
  123. data/lib/puppet/parameter/boolean.rb +5 -0
  124. data/lib/puppet/parameter/value_collection.rb +6 -4
  125. data/lib/puppet/parser/ast/resourceparam.rb +2 -1
  126. data/lib/puppet/parser/compiler.rb +25 -9
  127. data/lib/puppet/parser/files.rb +1 -1
  128. data/lib/puppet/parser/functions.rb +12 -21
  129. data/lib/puppet/parser/functions/collect.rb +6 -35
  130. data/lib/puppet/parser/functions/contain.rb +26 -0
  131. data/lib/puppet/parser/functions/create_resources.rb +5 -0
  132. data/lib/puppet/parser/functions/extlookup.rb +2 -2
  133. data/lib/puppet/parser/functions/file.rb +1 -1
  134. data/lib/puppet/parser/functions/{reject.rb → filter.rb} +13 -12
  135. data/lib/puppet/parser/functions/fqdn_rand.rb +13 -5
  136. data/lib/puppet/parser/functions/include.rb +18 -1
  137. data/lib/puppet/parser/functions/map.rb +44 -0
  138. data/lib/puppet/parser/functions/select.rb +6 -38
  139. data/lib/puppet/parser/lexer.rb +1 -1
  140. data/lib/puppet/parser/parser_support.rb +1 -1
  141. data/lib/puppet/parser/resource.rb +6 -45
  142. data/lib/puppet/parser/scope.rb +33 -2
  143. data/lib/puppet/parser/type_loader.rb +4 -60
  144. data/lib/puppet/pops/binder/bindings_loader.rb +1 -1
  145. data/lib/puppet/pops/binder/config/binder_config.rb +3 -3
  146. data/lib/puppet/pops/binder/hiera2/bindings_provider.rb +1 -1
  147. data/lib/puppet/pops/binder/scheme_handler/confdir_hiera_scheme.rb +1 -1
  148. data/lib/puppet/pops/binder/scheme_handler/module_hiera_scheme.rb +2 -2
  149. data/lib/puppet/pops/issues.rb +4 -0
  150. data/lib/puppet/pops/model/ast_transformer.rb +4 -1
  151. data/lib/puppet/pops/model/model_label_provider.rb +1 -1
  152. data/lib/puppet/pops/parser/egrammar.ra +5 -24
  153. data/lib/puppet/pops/parser/eparser.rb +859 -902
  154. data/lib/puppet/pops/parser/lexer.rb +48 -30
  155. data/lib/puppet/pops/parser/parser_support.rb +1 -1
  156. data/lib/puppet/pops/patterns.rb +4 -4
  157. data/lib/puppet/pops/utils.rb +1 -1
  158. data/lib/puppet/pops/validation/checker3_1.rb +25 -20
  159. data/lib/puppet/provider.rb +23 -6
  160. data/lib/puppet/provider/aixobject.rb +0 -0
  161. data/lib/puppet/provider/augeas/augeas.rb +21 -5
  162. data/lib/puppet/provider/confine.rb +5 -79
  163. data/lib/puppet/provider/cron/crontab.rb +0 -0
  164. data/lib/puppet/provider/exec.rb +9 -7
  165. data/lib/puppet/provider/exec/posix.rb +10 -1
  166. data/lib/puppet/provider/exec/windows.rb +1 -1
  167. data/lib/puppet/provider/file/posix.rb +1 -0
  168. data/lib/puppet/provider/file/windows.rb +16 -5
  169. data/lib/puppet/provider/group/aix.rb +0 -0
  170. data/lib/puppet/provider/group/windows_adsi.rb +33 -1
  171. data/lib/puppet/provider/macauthorization/macauthorization.rb +1 -1
  172. data/lib/puppet/provider/mailalias/aliases.rb +0 -0
  173. data/lib/puppet/provider/maillist/mailman.rb +0 -0
  174. data/lib/puppet/provider/mount/parsed.rb +0 -0
  175. data/lib/puppet/provider/nameservice/directoryservice.rb +3 -3
  176. data/lib/puppet/provider/package/appdmg.rb +1 -1
  177. data/lib/puppet/provider/package/apple.rb +1 -1
  178. data/lib/puppet/provider/package/apt.rb +1 -1
  179. data/lib/puppet/provider/package/aptitude.rb +0 -0
  180. data/lib/puppet/provider/package/blastwave.rb +1 -1
  181. data/lib/puppet/provider/package/dpkg.rb +1 -1
  182. data/lib/puppet/provider/package/fink.rb +1 -1
  183. data/lib/puppet/provider/package/freebsd.rb +0 -0
  184. data/lib/puppet/provider/package/gem.rb +0 -0
  185. data/lib/puppet/provider/package/macports.rb +0 -0
  186. data/lib/puppet/provider/package/msi.rb +4 -10
  187. data/lib/puppet/provider/package/nim.rb +8 -8
  188. data/lib/puppet/provider/package/openbsd.rb +1 -1
  189. data/lib/puppet/provider/package/opkg.rb +0 -0
  190. data/lib/puppet/provider/package/pacman.rb +2 -2
  191. data/lib/puppet/provider/package/pkgdmg.rb +1 -1
  192. data/lib/puppet/provider/package/pkgutil.rb +1 -1
  193. data/lib/puppet/provider/package/ports.rb +0 -0
  194. data/lib/puppet/provider/package/rpm.rb +39 -3
  195. data/lib/puppet/provider/package/sun.rb +3 -3
  196. data/lib/puppet/provider/package/sunfreeware.rb +0 -0
  197. data/lib/puppet/provider/package/windows.rb +12 -19
  198. data/lib/puppet/provider/package/windows/package.rb +1 -1
  199. data/lib/puppet/provider/package/yum.rb +2 -2
  200. data/lib/puppet/provider/parsedfile.rb +0 -0
  201. data/lib/puppet/provider/port/parsed.rb +0 -0
  202. data/lib/puppet/provider/service/base.rb +0 -0
  203. data/lib/puppet/provider/service/bsd.rb +3 -3
  204. data/lib/puppet/provider/service/daemontools.rb +8 -8
  205. data/lib/puppet/provider/service/debian.rb +0 -0
  206. data/lib/puppet/provider/service/freebsd.rb +3 -3
  207. data/lib/puppet/provider/service/init.rb +5 -4
  208. data/lib/puppet/provider/service/launchd.rb +35 -24
  209. data/lib/puppet/provider/service/openbsd.rb +23 -0
  210. data/lib/puppet/provider/service/redhat.rb +0 -0
  211. data/lib/puppet/provider/service/runit.rb +3 -3
  212. data/lib/puppet/provider/service/smf.rb +0 -0
  213. data/lib/puppet/provider/service/src.rb +0 -0
  214. data/lib/puppet/provider/service/systemd.rb +0 -0
  215. data/lib/puppet/provider/service/upstart.rb +3 -3
  216. data/lib/puppet/provider/ssh_authorized_key/parsed.rb +2 -2
  217. data/lib/puppet/provider/sshkey/parsed.rb +0 -0
  218. data/lib/puppet/provider/user/aix.rb +0 -0
  219. data/lib/puppet/provider/user/directoryservice.rb +1 -1
  220. data/lib/puppet/provider/user/useradd.rb +1 -1
  221. data/lib/puppet/provider/zone/solaris.rb +1 -1
  222. data/lib/puppet/rails/benchmark.rb +1 -1
  223. data/lib/puppet/reference/configuration.rb +1 -2
  224. data/lib/puppet/reference/indirection.rb +12 -14
  225. data/lib/puppet/relationship.rb +7 -4
  226. data/lib/puppet/reports.rb +2 -2
  227. data/lib/puppet/reports/rrdgraph.rb +1 -1
  228. data/lib/puppet/reports/store.rb +3 -3
  229. data/lib/puppet/reports/tagmail.rb +2 -2
  230. data/lib/puppet/resource.rb +66 -8
  231. data/lib/puppet/resource/catalog.rb +18 -25
  232. data/lib/puppet/resource/status.rb +10 -4
  233. data/lib/puppet/run.rb +6 -2
  234. data/lib/puppet/settings.rb +39 -119
  235. data/lib/puppet/settings/base_setting.rb +8 -9
  236. data/lib/puppet/settings/directory_setting.rb +8 -0
  237. data/lib/puppet/settings/file_setting.rb +35 -1
  238. data/lib/puppet/settings/priority_setting.rb +42 -0
  239. data/lib/puppet/ssl.rb +4 -0
  240. data/lib/puppet/ssl/certificate.rb +18 -0
  241. data/lib/puppet/ssl/certificate_authority.rb +101 -72
  242. data/lib/puppet/ssl/certificate_authority/autosign_command.rb +44 -0
  243. data/lib/puppet/ssl/certificate_authority/interface.rb +21 -17
  244. data/lib/puppet/ssl/certificate_factory.rb +38 -12
  245. data/lib/puppet/ssl/certificate_request.rb +201 -47
  246. data/lib/puppet/ssl/certificate_request_attributes.rb +34 -0
  247. data/lib/puppet/ssl/certificate_revocation_list.rb +2 -2
  248. data/lib/puppet/ssl/host.rb +21 -10
  249. data/lib/puppet/ssl/inventory.rb +6 -10
  250. data/lib/puppet/ssl/key.rb +1 -1
  251. data/lib/puppet/ssl/oids.rb +78 -0
  252. data/lib/puppet/ssl/validator.rb +41 -97
  253. data/lib/puppet/ssl/validator/default_validator.rb +153 -0
  254. data/lib/puppet/ssl/validator/no_validator.rb +17 -0
  255. data/lib/puppet/status.rb +4 -0
  256. data/lib/puppet/test/test_helper.rb +5 -0
  257. data/lib/puppet/transaction.rb +13 -0
  258. data/lib/puppet/transaction/event.rb +8 -3
  259. data/lib/puppet/transaction/report.rb +6 -2
  260. data/lib/puppet/transaction/resource_harness.rb +173 -115
  261. data/lib/puppet/type.rb +30 -13
  262. data/lib/puppet/type/augeas.rb +12 -46
  263. data/lib/puppet/type/component.rb +1 -7
  264. data/lib/puppet/type/cron.rb +0 -0
  265. data/lib/puppet/type/exec.rb +13 -1
  266. data/lib/puppet/type/file.rb +19 -10
  267. data/lib/puppet/type/file/checksum.rb +0 -0
  268. data/lib/puppet/type/file/content.rb +3 -0
  269. data/lib/puppet/type/file/ensure.rb +33 -15
  270. data/lib/puppet/type/file/group.rb +0 -0
  271. data/lib/puppet/type/file/mode.rb +6 -2
  272. data/lib/puppet/type/file/owner.rb +0 -0
  273. data/lib/puppet/type/file/source.rb +65 -14
  274. data/lib/puppet/type/file/target.rb +6 -6
  275. data/lib/puppet/type/file/type.rb +0 -0
  276. data/lib/puppet/type/filebucket.rb +0 -0
  277. data/lib/puppet/type/group.rb +18 -0
  278. data/lib/puppet/type/host.rb +0 -0
  279. data/lib/puppet/type/k5login.rb +4 -4
  280. data/lib/puppet/type/mailalias.rb +0 -0
  281. data/lib/puppet/type/maillist.rb +0 -0
  282. data/lib/puppet/type/mount.rb +15 -1
  283. data/lib/puppet/type/package.rb +7 -1
  284. data/lib/puppet/type/port.rb +0 -0
  285. data/lib/puppet/type/schedule.rb +9 -4
  286. data/lib/puppet/type/service.rb +1 -1
  287. data/lib/puppet/type/sshkey.rb +0 -0
  288. data/lib/puppet/type/tidy.rb +1 -1
  289. data/lib/puppet/type/user.rb +3 -0
  290. data/lib/puppet/type/yumrepo.rb +8 -6
  291. data/lib/puppet/type/zpool.rb +0 -0
  292. data/lib/puppet/util.rb +4 -31
  293. data/lib/puppet/util/adsi.rb +73 -17
  294. data/lib/puppet/util/autoload.rb +3 -3
  295. data/lib/puppet/util/backups.rb +4 -4
  296. data/lib/puppet/util/cacher.rb +7 -13
  297. data/lib/puppet/util/checksums.rb +2 -2
  298. data/lib/puppet/util/classgen.rb +3 -1
  299. data/lib/puppet/util/colors.rb +1 -0
  300. data/lib/puppet/util/command_line.rb +5 -0
  301. data/lib/puppet/util/docs.rb +33 -27
  302. data/lib/puppet/util/execution.rb +42 -18
  303. data/lib/puppet/util/filetype.rb +3 -3
  304. data/lib/puppet/util/instance_loader.rb +2 -2
  305. data/lib/puppet/util/instrumentation.rb +23 -42
  306. data/lib/puppet/util/instrumentation/data.rb +11 -4
  307. data/lib/puppet/util/instrumentation/indirection_probe.rb +11 -4
  308. data/lib/puppet/util/instrumentation/instrumentable.rb +7 -14
  309. data/lib/puppet/util/instrumentation/listener.rb +15 -8
  310. data/lib/puppet/util/instrumentation/listeners/log.rb +4 -10
  311. data/lib/puppet/util/instrumentation/listeners/performance.rb +8 -14
  312. data/lib/puppet/util/limits.rb +12 -0
  313. data/lib/puppet/util/lockfile.rb +2 -2
  314. data/lib/puppet/util/log.rb +14 -6
  315. data/lib/puppet/util/log/destinations.rb +23 -1
  316. data/lib/puppet/util/metric.rb +9 -3
  317. data/lib/puppet/util/monkey_patches.rb +7 -2
  318. data/lib/puppet/util/network_device/config.rb +1 -1
  319. data/lib/puppet/util/plugins.rb +1 -1
  320. data/lib/puppet/util/posix.rb +0 -0
  321. data/lib/puppet/util/profiler.rb +7 -2
  322. data/lib/puppet/util/provider_features.rb +2 -2
  323. data/lib/puppet/util/rdoc.rb +28 -30
  324. data/lib/puppet/util/rdoc/code_objects.rb +75 -25
  325. data/lib/puppet/util/rdoc/generators/puppet_generator.rb +1 -1
  326. data/lib/puppet/util/rdoc/parser.rb +12 -487
  327. data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +477 -0
  328. data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc1.rb +19 -0
  329. data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc2.rb +14 -0
  330. data/lib/puppet/util/reference.rb +1 -1
  331. data/lib/puppet/util/resource_template.rb +1 -1
  332. data/lib/puppet/util/selinux.rb +1 -1
  333. data/lib/puppet/util/storage.rb +2 -2
  334. data/lib/puppet/util/suidmanager.rb +1 -1
  335. data/lib/puppet/util/tag_set.rb +29 -0
  336. data/lib/puppet/util/tagging.rb +8 -24
  337. data/lib/puppet/util/watched_file.rb +1 -1
  338. data/lib/puppet/util/watcher.rb +1 -1
  339. data/lib/puppet/util/windows.rb +3 -0
  340. data/lib/puppet/util/windows/access_control_entry.rb +84 -0
  341. data/lib/puppet/util/windows/access_control_list.rb +106 -0
  342. data/lib/puppet/util/windows/file.rb +213 -0
  343. data/lib/puppet/util/windows/process.rb +199 -0
  344. data/lib/puppet/util/windows/root_certs.rb +52 -37
  345. data/lib/puppet/util/windows/security.rb +270 -245
  346. data/lib/puppet/util/windows/security_descriptor.rb +62 -0
  347. data/lib/puppet/util/windows/sid.rb +26 -4
  348. data/lib/puppet/version.rb +2 -2
  349. data/spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb +1 -1
  350. data/spec/fixtures/unit/indirector/{hiera → data_binding/hiera}/global.yaml +0 -0
  351. data/spec/fixtures/unit/indirector/data_binding/hiera/invalid.yaml +1 -0
  352. data/spec/fixtures/unit/module/trailing-comma.json +24 -0
  353. data/spec/fixtures/unit/util/monkey_patches/x509.pem +32 -0
  354. data/spec/integration/application/apply_spec.rb +1 -1
  355. data/spec/integration/application/doc_spec.rb +1 -1
  356. data/spec/integration/configurer_spec.rb +4 -2
  357. data/spec/integration/data_binding.rb +100 -0
  358. data/spec/integration/indirector/catalog/compiler_spec.rb +16 -13
  359. data/spec/integration/indirector/direct_file_server_spec.rb +3 -5
  360. data/spec/integration/indirector/file_content/file_server_spec.rb +2 -2
  361. data/spec/integration/node/facts_spec.rb +1 -1
  362. data/spec/integration/node_spec.rb +1 -1
  363. data/spec/integration/parser/compiler_spec.rb +90 -0
  364. data/spec/integration/parser/parser_spec.rb +2 -2
  365. data/spec/integration/provider/cron/crontab_spec.rb +3 -5
  366. data/spec/integration/resource/catalog_spec.rb +1 -1
  367. data/spec/integration/ssl/autosign_spec.rb +90 -0
  368. data/spec/integration/ssl/certificate_authority_spec.rb +62 -69
  369. data/spec/integration/ssl/certificate_revocation_list_spec.rb +1 -1
  370. data/spec/integration/ssl/host_spec.rb +1 -1
  371. data/spec/integration/transaction_spec.rb +13 -13
  372. data/spec/integration/type/exec_spec.rb +2 -2
  373. data/spec/integration/type/file_spec.rb +287 -45
  374. data/spec/integration/type/tidy_spec.rb +3 -3
  375. data/spec/integration/util/rdoc/parser_spec.rb +236 -35
  376. data/spec/integration/util/settings_spec.rb +1 -1
  377. data/spec/integration/util/windows/process_spec.rb +22 -0
  378. data/spec/integration/util/windows/security_spec.rb +316 -106
  379. data/spec/lib/matchers/containment_matchers.rb +52 -0
  380. data/spec/lib/puppet_spec/compiler.rb +6 -0
  381. data/spec/lib/puppet_spec/files.rb +20 -21
  382. data/spec/shared_behaviours/documentation_on_faces.rb +3 -3
  383. data/spec/shared_behaviours/file_server_terminus.rb +2 -2
  384. data/spec/shared_contexts/platform.rb +1 -0
  385. data/spec/spec_helper.rb +13 -1
  386. data/spec/unit/agent_spec.rb +0 -12
  387. data/spec/unit/application/agent_spec.rb +4 -4
  388. data/spec/unit/application/apply_spec.rb +18 -2
  389. data/spec/unit/application/cert_spec.rb +8 -6
  390. data/spec/unit/application/device_spec.rb +1 -1
  391. data/spec/unit/application/filebucket_spec.rb +1 -1
  392. data/spec/unit/application/inspect_spec.rb +1 -1
  393. data/spec/unit/application_spec.rb +24 -0
  394. data/spec/unit/configurer/downloader_spec.rb +8 -7
  395. data/spec/unit/configurer/fact_handler_spec.rb +23 -0
  396. data/spec/unit/configurer/plugin_handler_spec.rb +7 -2
  397. data/spec/unit/configurer_spec.rb +15 -5
  398. data/spec/unit/{provider/confine → confine}/exists_spec.rb +12 -12
  399. data/spec/unit/{provider/confine → confine}/false_spec.rb +9 -9
  400. data/spec/unit/{provider/confine → confine}/feature_spec.rb +10 -10
  401. data/spec/unit/{provider/confine → confine}/true_spec.rb +7 -7
  402. data/spec/unit/{provider/confine → confine}/variable_spec.rb +16 -16
  403. data/spec/unit/{provider/confine_collection_spec.rb → confine_collection_spec.rb} +30 -30
  404. data/spec/unit/{provider/confine_spec.rb → confine_spec.rb} +11 -11
  405. data/spec/unit/{provider/confiner_spec.rb → confiner_spec.rb} +4 -4
  406. data/spec/unit/face/parser_spec.rb +54 -0
  407. data/spec/unit/file_bucket/dipper_spec.rb +2 -2
  408. data/spec/unit/file_serving/base_spec.rb +32 -9
  409. data/spec/unit/file_serving/configuration_spec.rb +7 -7
  410. data/spec/unit/file_serving/content_spec.rb +12 -7
  411. data/spec/unit/file_serving/fileset_spec.rb +57 -27
  412. data/spec/unit/file_serving/metadata_spec.rb +74 -12
  413. data/spec/unit/file_serving/mount/file_spec.rb +10 -10
  414. data/spec/unit/file_serving/mount/pluginfacts_spec.rb +73 -0
  415. data/spec/unit/file_system/file_spec.rb +486 -0
  416. data/spec/unit/file_system/tempfile_spec.rb +48 -0
  417. data/spec/unit/graph/relationship_graph_spec.rb +0 -6
  418. data/spec/unit/hiera_puppet_spec.rb +2 -2
  419. data/spec/unit/indirector/catalog/compiler_spec.rb +15 -19
  420. data/spec/unit/indirector/certificate_status/file_spec.rb +30 -40
  421. data/spec/unit/indirector/data_binding/hiera_spec.rb +95 -2
  422. data/spec/unit/indirector/direct_file_server_spec.rb +6 -6
  423. data/spec/unit/indirector/facts/facter_spec.rb +33 -0
  424. data/spec/unit/indirector/file_bucket_file/file_spec.rb +61 -52
  425. data/spec/unit/indirector/file_metadata/file_spec.rb +2 -2
  426. data/spec/unit/indirector/file_server_spec.rb +4 -4
  427. data/spec/unit/indirector/json_spec.rb +4 -4
  428. data/spec/unit/indirector/key/file_spec.rb +13 -14
  429. data/spec/unit/indirector/resource/ral_spec.rb +7 -0
  430. data/spec/unit/indirector/resource/store_configs_spec.rb +11 -0
  431. data/spec/unit/indirector/rest_spec.rb +7 -3
  432. data/spec/unit/indirector/ssl_file_spec.rb +14 -17
  433. data/spec/unit/indirector/yaml_spec.rb +4 -4
  434. data/spec/unit/module_spec.rb +43 -15
  435. data/spec/unit/module_tool/tar/gnu_spec.rb +2 -2
  436. data/spec/unit/module_tool/tar/solaris_spec.rb +2 -2
  437. data/spec/unit/module_tool/tar_spec.rb +45 -0
  438. data/spec/unit/network/authconfig_spec.rb +2 -1
  439. data/spec/unit/network/authentication_spec.rb +2 -2
  440. data/spec/unit/network/format_handler_spec.rb +2 -2
  441. data/spec/unit/network/formats_spec.rb +24 -0
  442. data/spec/unit/network/http/connection_spec.rb +76 -199
  443. data/spec/unit/network/http/handler_spec.rb +33 -34
  444. data/spec/unit/network/http_pool_spec.rb +8 -5
  445. data/spec/unit/node/environment_spec.rb +76 -90
  446. data/spec/unit/node/facts_spec.rb +20 -3
  447. data/spec/unit/node_spec.rb +43 -0
  448. data/spec/unit/parameter/boolean_spec.rb +22 -12
  449. data/spec/unit/parser/ast/resourceparam_spec.rb +51 -0
  450. data/spec/unit/parser/compiler_spec.rb +103 -35
  451. data/spec/unit/parser/eparser_adapter_spec.rb +12 -12
  452. data/spec/unit/parser/files_spec.rb +11 -11
  453. data/spec/unit/parser/functions/contain_spec.rb +185 -0
  454. data/spec/unit/parser/functions/create_resources_spec.rb +13 -5
  455. data/spec/unit/parser/functions/generate_spec.rb +1 -1
  456. data/spec/unit/parser/functions_spec.rb +2 -2
  457. data/spec/unit/parser/lexer_spec.rb +1 -1
  458. data/spec/unit/parser/methods/each_spec.rb +1 -1
  459. data/spec/unit/parser/methods/{select_spec.rb → filter_spec.rb} +11 -11
  460. data/spec/unit/parser/methods/map_spec.rb +95 -0
  461. data/spec/unit/parser/methods/reduce_spec.rb +12 -11
  462. data/spec/unit/parser/methods/shared.rb +5 -5
  463. data/spec/unit/parser/methods/slice_spec.rb +13 -13
  464. data/spec/unit/parser/parser_spec.rb +1 -1
  465. data/spec/unit/parser/resource/param_spec.rb +44 -0
  466. data/spec/unit/parser/resource_spec.rb +16 -15
  467. data/spec/unit/pops/model/ast_transformer_spec.rb +18 -4
  468. data/spec/unit/pops/parser/lexer_spec.rb +22 -5
  469. data/spec/unit/pops/parser/parse_calls_spec.rb +5 -5
  470. data/spec/unit/pops/transformer/transform_calls_spec.rb +6 -6
  471. data/spec/unit/pops/transformer/transform_containers_spec.rb +2 -2
  472. data/spec/unit/pops/validator/validator_spec.rb +31 -0
  473. data/spec/unit/provider/augeas/augeas_spec.rb +57 -2
  474. data/spec/unit/provider/exec/posix_spec.rb +8 -3
  475. data/spec/unit/provider/file/posix_spec.rb +2 -2
  476. data/spec/unit/provider/group/windows_adsi_spec.rb +70 -3
  477. data/spec/unit/provider/nameservice/directoryservice_spec.rb +3 -3
  478. data/spec/unit/provider/package/apt_spec.rb +1 -1
  479. data/spec/unit/provider/package/msi_spec.rb +15 -42
  480. data/spec/unit/provider/package/openbsd_spec.rb +3 -3
  481. data/spec/unit/provider/package/rpm_spec.rb +56 -13
  482. data/spec/unit/provider/package/windows_spec.rb +15 -19
  483. data/spec/unit/provider/service/base_spec.rb +1 -1
  484. data/spec/unit/provider/service/daemontools_spec.rb +18 -8
  485. data/spec/unit/provider/service/freebsd_spec.rb +3 -3
  486. data/spec/unit/provider/service/gentoo_spec.rb +5 -2
  487. data/spec/unit/provider/service/init_spec.rb +17 -17
  488. data/spec/unit/provider/service/launchd_spec.rb +76 -23
  489. data/spec/unit/provider/service/openbsd_spec.rb +125 -0
  490. data/spec/unit/provider/service/openwrt_spec.rb +1 -1
  491. data/spec/unit/provider/service/runit_spec.rb +12 -5
  492. data/spec/unit/provider/service/upstart_spec.rb +4 -4
  493. data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +5 -5
  494. data/spec/unit/provider/user/directoryservice_spec.rb +4 -4
  495. data/spec/unit/provider/zone/solaris_spec.rb +1 -1
  496. data/spec/unit/provider_spec.rb +2 -2
  497. data/spec/unit/reports/http_spec.rb +19 -34
  498. data/spec/unit/reports/store_spec.rb +2 -2
  499. data/spec/unit/resource/catalog_spec.rb +81 -11
  500. data/spec/unit/resource/status_spec.rb +11 -1
  501. data/spec/unit/resource/type_spec.rb +30 -1
  502. data/spec/unit/resource_spec.rb +40 -4
  503. data/spec/unit/settings/file_setting_spec.rb +2 -2
  504. data/spec/unit/settings/path_setting_spec.rb +2 -2
  505. data/spec/unit/settings/priority_setting_spec.rb +66 -0
  506. data/spec/unit/settings_spec.rb +16 -31
  507. data/spec/unit/ssl/certificate_authority/autosign_command_spec.rb +30 -0
  508. data/spec/unit/ssl/certificate_authority_spec.rb +129 -134
  509. data/spec/unit/ssl/certificate_factory_spec.rb +18 -0
  510. data/spec/unit/ssl/certificate_request_attributes_spec.rb +61 -0
  511. data/spec/unit/ssl/certificate_request_spec.rb +103 -0
  512. data/spec/unit/ssl/certificate_spec.rb +31 -18
  513. data/spec/unit/ssl/host_spec.rb +34 -8
  514. data/spec/unit/ssl/inventory_spec.rb +27 -62
  515. data/spec/unit/ssl/key_spec.rb +4 -4
  516. data/spec/unit/ssl/oids_spec.rb +48 -0
  517. data/spec/unit/ssl/validator_spec.rb +49 -6
  518. data/spec/unit/status_spec.rb +9 -0
  519. data/spec/unit/transaction/event_spec.rb +1 -9
  520. data/spec/unit/transaction/report_spec.rb +20 -1
  521. data/spec/unit/transaction/resource_harness_spec.rb +60 -210
  522. data/spec/unit/transaction_spec.rb +54 -8
  523. data/spec/unit/type/component_spec.rb +2 -2
  524. data/spec/unit/type/exec_spec.rb +14 -7
  525. data/spec/unit/type/file/content_spec.rb +13 -2
  526. data/spec/unit/type/file/ctime_spec.rb +1 -1
  527. data/spec/unit/type/file/mode_spec.rb +48 -2
  528. data/spec/unit/type/file/mtime_spec.rb +1 -1
  529. data/spec/unit/type/file/source_spec.rb +177 -7
  530. data/spec/unit/type/file_spec.rb +63 -71
  531. data/spec/unit/type/group_spec.rb +20 -0
  532. data/spec/unit/type/k5login_spec.rb +3 -3
  533. data/spec/unit/type/mount_spec.rb +53 -0
  534. data/spec/unit/type/nagios_spec.rb +216 -0
  535. data/spec/unit/type/package_spec.rb +7 -1
  536. data/spec/unit/type/schedule_spec.rb +6 -0
  537. data/spec/unit/type/service_spec.rb +3 -3
  538. data/spec/unit/type/tidy_spec.rb +14 -14
  539. data/spec/unit/type/user_spec.rb +9 -0
  540. data/spec/unit/type_spec.rb +86 -4
  541. data/spec/unit/util/adsi_spec.rb +120 -12
  542. data/spec/unit/util/autoload_spec.rb +14 -14
  543. data/spec/unit/util/backups_spec.rb +29 -21
  544. data/spec/unit/util/checksums_spec.rb +2 -1
  545. data/spec/unit/util/command_line_spec.rb +41 -0
  546. data/spec/unit/util/docs_spec.rb +91 -0
  547. data/spec/unit/util/execution_spec.rb +26 -2
  548. data/spec/unit/util/filetype_spec.rb +7 -7
  549. data/spec/unit/util/lockfile_spec.rb +2 -2
  550. data/spec/unit/util/log/destinations_spec.rb +32 -0
  551. data/spec/unit/util/monkey_patches_spec.rb +41 -0
  552. data/spec/unit/util/pidlock_spec.rb +6 -6
  553. data/spec/unit/util/rdoc/parser_spec.rb +15 -13
  554. data/spec/unit/util/rdoc_spec.rb +18 -24
  555. data/spec/unit/util/resource_template_spec.rb +3 -3
  556. data/spec/unit/util/selinux_spec.rb +4 -2
  557. data/spec/unit/util/storage_spec.rb +4 -4
  558. data/spec/unit/util/suidmanager_spec.rb +7 -0
  559. data/spec/unit/util/tag_set_spec.rb +46 -0
  560. data/spec/unit/util/tagging_spec.rb +82 -45
  561. data/spec/unit/util/watcher_spec.rb +4 -1
  562. data/spec/unit/util/windows/access_control_entry_spec.rb +67 -0
  563. data/spec/unit/util/windows/access_control_list_spec.rb +133 -0
  564. data/spec/unit/util/windows/root_certs_spec.rb +10 -8
  565. data/spec/unit/util/windows/security_descriptor_spec.rb +117 -0
  566. data/spec/unit/util/windows/sid_spec.rb +69 -0
  567. data/spec/unit/util_spec.rb +7 -7
  568. data/tasks/ci.rake +17 -36
  569. metadata +2811 -2746
  570. checksums.yaml +0 -7
  571. data/examples/mac_automount.pp +0 -16
  572. data/examples/mcx_dock_absent.pp +0 -4
  573. data/examples/mcx_dock_default.pp +0 -118
  574. data/examples/mcx_dock_full.pp +0 -125
  575. data/examples/mcx_dock_invalid.pp +0 -9
  576. data/examples/mcx_nogroup.pp +0 -118
  577. data/examples/mcx_notexists_absent.pp +0 -4
  578. data/ext/rack/README +0 -58
  579. data/ext/rack/manifest.pp +0 -59
  580. data/lib/puppet/external/lock.rb +0 -63
  581. data/lib/puppet/indirector/hiera.rb +0 -39
  582. data/lib/puppet/parser/functions/foreach.rb +0 -95
  583. data/spec/integration/network/server/webrick_spec.rb +0 -76
  584. data/spec/integration/parser/functions_spec.rb +0 -16
  585. data/spec/unit/indirector/hiera_spec.rb +0 -154
  586. data/spec/unit/parser/methods/collect_spec.rb +0 -153
  587. data/spec/unit/parser/methods/foreach_spec.rb +0 -91
  588. data/spec/unit/parser/methods/reject_spec.rb +0 -73
  589. data/spec/unit/resource/resource_type.json +0 -34
@@ -1,6 +1,6 @@
1
- require 'puppet/provider/confine'
1
+ require 'puppet/confine'
2
2
 
3
- class Puppet::Provider::Confine::True < Puppet::Provider::Confine
3
+ class Puppet::Confine::True < Puppet::Confine
4
4
  def self.summarize(confines)
5
5
  confines.inject(0) { |count, confine| count + confine.summary }
6
6
  end
@@ -1,10 +1,10 @@
1
- require 'puppet/provider/confine'
1
+ require 'puppet/confine'
2
2
 
3
3
  # Require a specific value for a variable, either a Puppet setting
4
4
  # or a Facter value. This class is a bit weird because the name
5
5
  # is set explicitly by the ConfineCollection class -- from this class,
6
6
  # it's not obvious how the name would ever get set.
7
- class Puppet::Provider::Confine::Variable < Puppet::Provider::Confine
7
+ class Puppet::Confine::Variable < Puppet::Confine
8
8
  # Provide a hash summary of failing confines -- the key of the hash
9
9
  # is the name of the confine, and the value is the missing yet required values.
10
10
  # Only returns failed values, not all required values.
@@ -1,8 +1,8 @@
1
1
  # Manage a collection of confines, returning a boolean or
2
2
  # helpful information.
3
- require 'puppet/provider/confine'
3
+ require 'puppet/confine'
4
4
 
5
- class Puppet::Provider::ConfineCollection
5
+ class Puppet::ConfineCollection
6
6
  def confine(hash)
7
7
  if hash.include?(:for_binary)
8
8
  for_binary = true
@@ -11,11 +11,11 @@ class Puppet::Provider::ConfineCollection
11
11
  for_binary = false
12
12
  end
13
13
  hash.each do |test, values|
14
- if klass = Puppet::Provider::Confine.test(test)
14
+ if klass = Puppet::Confine.test(test)
15
15
  @confines << klass.new(values)
16
16
  @confines[-1].for_binary = true if for_binary
17
17
  else
18
- confine = Puppet::Provider::Confine.test(:variable).new(values)
18
+ confine = Puppet::Confine.test(:variable).new(values)
19
19
  confine.name = test
20
20
  @confines << confine
21
21
  end
@@ -1,10 +1,10 @@
1
- require 'puppet/provider/confine_collection'
1
+ require 'puppet/confine_collection'
2
2
 
3
3
  # The Confiner module contains methods for managing a Provider's confinement (suitability under given
4
4
  # conditions). The intent is to include this module in an object where confinement management is wanted.
5
5
  # It lazily adds an instance variable `@confine_collection` to the object where it is included.
6
6
  #
7
- module Puppet::Provider::Confiner
7
+ module Puppet::Confiner
8
8
  # Confines a provider to be suitable only under the given conditions.
9
9
  # The hash describes a confine using mapping from symbols to values or predicate code.
10
10
  #
@@ -26,11 +26,11 @@ module Puppet::Provider::Confiner
26
26
  confine_collection.confine(hash)
27
27
  end
28
28
 
29
- # @return [Puppet::Provider::ConfineCollection] the collection of confines
29
+ # @return [Puppet::ConfineCollection] the collection of confines
30
30
  # @api private
31
31
  #
32
32
  def confine_collection
33
- @confine_collection ||= Puppet::Provider::ConfineCollection.new(self.to_s)
33
+ @confine_collection ||= Puppet::ConfineCollection.new(self.to_s)
34
34
  end
35
35
 
36
36
  # Checks whether this implementation is suitable for the current platform (or returns a summary
@@ -149,16 +149,12 @@ class Puppet::Daemon
149
149
  # Create a pidfile for our daemon, so we can be stopped and others
150
150
  # don't try to start.
151
151
  def create_pidfile
152
- Puppet::Util.synchronize_on(Puppet.run_mode.name,Sync::EX) do
153
- raise "Could not create PID file: #{@pidfile.file_path}" unless @pidfile.lock
154
- end
152
+ raise "Could not create PID file: #{@pidfile.file_path}" unless @pidfile.lock
155
153
  end
156
154
 
157
155
  # Remove the pid file for our daemon.
158
156
  def remove_pidfile
159
- Puppet::Util.synchronize_on(Puppet.run_mode.name,Sync::EX) do
160
- @pidfile.unlock
161
- end
157
+ @pidfile.unlock
162
158
  end
163
159
 
164
160
  def run_event_loop
@@ -2,39 +2,11 @@ require 'puppet/indirector'
2
2
 
3
3
  # A class for managing data lookups
4
4
  class Puppet::DataBinding
5
+ class LookupError < Puppet::Error; end
5
6
 
6
- # Set up indirection, so that data can be looked for in the complier
7
+ # Set up indirection, so that data can be looked for in the compiler
7
8
  extend Puppet::Indirector
8
9
 
9
10
  indirects(:data_binding, :terminus_setting => :data_binding_terminus,
10
11
  :doc => "Where to find external data bindings.")
11
-
12
- # A class that acts just enough like a Puppet::Parser::Scope to
13
- # fool Hiera's puppet backend. This class doesn't actually do anything
14
- # but it does allow people to use the puppet backend with the hiera
15
- # data bindings withough causing problems.
16
- class Variables
17
- FAKE_RESOURCE = Struct.new(:name).new("fake").freeze
18
- FAKE_CATALOG = Struct.new(:classes).new([].freeze).freeze
19
-
20
- def initialize(variable_bindings)
21
- @variable_bindings = variable_bindings
22
- end
23
-
24
- def [](name)
25
- @variable_bindings[name]
26
- end
27
-
28
- def resource
29
- FAKE_RESOURCE
30
- end
31
-
32
- def catalog
33
- FAKE_CATALOG
34
- end
35
-
36
- def function_include(name)
37
- # noop
38
- end
39
- end
40
12
  end
@@ -20,23 +20,27 @@ module Puppet
20
20
  :confdir => {
21
21
  :default => nil,
22
22
  :type => :directory,
23
- :desc =>
24
- "The main Puppet configuration directory. The default for this setting is calculated based on the user. If the process\n" +
25
- "is running as root or the user that Puppet is supposed to run as, it defaults to a system directory, but if it's running as any other user,\n" +
26
- "it defaults to being in the user's home directory.",
23
+ :desc => "The main Puppet configuration directory. The default for this setting
24
+ is calculated based on the user. If the process is running as root or
25
+ the user that Puppet is supposed to run as, it defaults to a system
26
+ directory, but if it's running as any other user, it defaults to being
27
+ in the user's home directory.",
27
28
  },
28
29
  :vardir => {
29
30
  :default => nil,
30
31
  :type => :directory,
31
- :desc => "Where Puppet stores dynamic and growing data. The default for this setting is calculated specially, like `confdir`_.",
32
+ :owner => "service",
33
+ :group => "service",
34
+ :desc => "Where Puppet stores dynamic and growing data. The default for this
35
+ setting is calculated specially, like `confdir`_.",
32
36
  },
33
37
 
34
38
  ### NOTE: this setting is usually being set to a symbol value. We don't officially have a
35
39
  ### setting type for that yet, but we might want to consider creating one.
36
40
  :name => {
37
41
  :default => nil,
38
- :desc => "The name of the application, if we are running as one. The\n" +
39
- "default is essentially $0 without the path or `.rb`.",
42
+ :desc => "The name of the application, if we are running as one. The
43
+ default is essentially $0 without the path or `.rb`.",
40
44
  }
41
45
  )
42
46
 
@@ -52,6 +56,15 @@ module Puppet
52
56
  )
53
57
 
54
58
  define_settings(:main,
59
+ :priority => {
60
+ :default => nil,
61
+ :type => :priority,
62
+ :desc => "The scheduling priority of the process. Valid values are 'high',
63
+ 'normal', 'low', or 'idle', which are mapped to platform-specific
64
+ values. The priority can also be specified as an integer value and
65
+ will be passed as is, e.g. -5. Puppet must be running as a privileged
66
+ user in order to increase scheduling priority.",
67
+ },
55
68
  :trace => {
56
69
  :default => false,
57
70
  :type => :boolean,
@@ -70,9 +83,9 @@ module Puppet
70
83
  },
71
84
  :syslogfacility => {
72
85
  :default => "daemon",
73
- :desc => "What syslog facility to use when logging to\n" +
74
- "syslog. Syslog has a fixed list of valid facilities, and you must\n" +
75
- "choose one of those; you cannot just make one up."
86
+ :desc => "What syslog facility to use when logging to syslog.
87
+ Syslog has a fixed list of valid facilities, and you must
88
+ choose one of those; you cannot just make one up."
76
89
  },
77
90
  :statedir => {
78
91
  :default => "$vardir/state",
@@ -93,30 +106,33 @@ module Puppet
93
106
  :genconfig => {
94
107
  :default => false,
95
108
  :type => :boolean,
96
- :desc => "Whether to just print a configuration to stdout and exit. Only makes\n" +
97
- "sense when used interactively. Takes into account arguments specified\n" +
98
- "on the CLI.",
109
+ :desc => "When true, causes Puppet applications to print an example config file
110
+ to stdout and exit. The example will include descriptions of each
111
+ setting, and the current (or default) value of each setting,
112
+ incorporating any settings overridden on the CLI (with the exception
113
+ of `genconfig` itself). This setting only makes sense when specified
114
+ on the command line as `--genconfig`.",
99
115
  },
100
116
  :genmanifest => {
101
117
  :default => false,
102
118
  :type => :boolean,
103
- :desc => "Whether to just print a manifest to stdout and exit. Only makes\n" +
104
- "sense when used interactively. Takes into account arguments specified\n" +
105
- "on the CLI.",
119
+ :desc => "Whether to just print a manifest to stdout and exit. Only makes
120
+ sense when specified on the command line as `--genmanifest`. Takes into account arguments specified
121
+ on the CLI.",
106
122
  },
107
123
  :configprint => {
108
124
  :default => "",
109
- :desc => "Print the value of a specific configuration setting. If the name of a\n" +
110
- "setting is provided for this, then the value is printed and puppet\n" +
111
- "exits. Comma-separate multiple values. For a list of all values,\n" +
112
- "specify 'all'.",
125
+ :desc => "Print the value of a specific configuration setting. If the name of a
126
+ setting is provided for this, then the value is printed and puppet
127
+ exits. Comma-separate multiple values. For a list of all values,
128
+ specify 'all'.",
113
129
  },
114
130
  :color => {
115
131
  :default => "ansi",
116
132
  :type => :string,
117
- :desc => "Whether to use colors when logging to the console. Valid values are\n" +
118
- "`ansi` (equivalent to `true`), `html`, and `false`, which produces no color.\n" +
119
- "Defaults to false on Windows, as its console does not support ansi colors.",
133
+ :desc => "Whether to use colors when logging to the console. Valid values are
134
+ `ansi` (equivalent to `true`), `html`, and `false`, which produces no color.
135
+ Defaults to false on Windows, as its console does not support ansi colors.",
120
136
  },
121
137
  :mkusers => {
122
138
  :default => false,
@@ -131,14 +147,15 @@ module Puppet
131
147
  :onetime => {
132
148
  :default => false,
133
149
  :type => :boolean,
134
- :desc => "Run the configuration once, rather than as a long-running\n" +
135
- "daemon. This is useful for interactively running puppetd.",
150
+ :desc => "Perform one configuration run and exit, rather than spawning a long-running
151
+ daemon. This is useful for interactively running puppet agent, or
152
+ running puppet agent from cron.",
136
153
  :short => 'o',
137
154
  },
138
155
  :path => {
139
156
  :default => "none",
140
- :desc => "The shell search path. Defaults to whatever is inherited\n" +
141
- "from the parent process.",
157
+ :desc => "The shell search path. Defaults to whatever is inherited
158
+ from the parent process.",
142
159
  :call_hook => :on_define_and_write,
143
160
  :hook => proc do |value|
144
161
  ENV["PATH"] = "" if ENV["PATH"].nil?
@@ -153,11 +170,11 @@ module Puppet
153
170
  :libdir => {
154
171
  :type => :directory,
155
172
  :default => "$vardir/lib",
156
- :desc => "An extra search path for Puppet. This is only useful\n" +
157
- "for those files that Puppet will load on demand, and is only\n" +
158
- "guaranteed to work for those cases. In fact, the autoload\n" +
159
- "mechanism is responsible for making sure this directory\n" +
160
- "is in Ruby's search path\n",
173
+ :desc => "An extra search path for Puppet. This is only useful
174
+ for those files that Puppet will load on demand, and is only
175
+ guaranteed to work for those cases. In fact, the autoload
176
+ mechanism is responsible for making sure this directory
177
+ is in Ruby's search path\n",
161
178
  :call_hook => :on_initialize_and_write,
162
179
  :hook => proc do |value|
163
180
  $LOAD_PATH.delete(@oldlibdir) if defined?(@oldlibdir) and $LOAD_PATH.include?(@oldlibdir)
@@ -168,41 +185,44 @@ module Puppet
168
185
  :ignoreimport => {
169
186
  :default => false,
170
187
  :type => :boolean,
171
- :desc => "If true, allows the parser to continue without requiring\n" +
172
- "all files referenced with `import` statements to exist. This setting was primarily\n" +
173
- "designed for use with commit hooks for parse-checking.",
188
+ :desc => "If true, allows the parser to continue without requiring
189
+ all files referenced with `import` statements to exist. This setting was primarily
190
+ designed for use with commit hooks for parse-checking.",
174
191
  },
175
192
  :environment => {
176
193
  :default => "production",
177
- :desc => "The environment Puppet is running in. For clients\n" +
178
- "(e.g., `puppet agent`) this determines the environment itself, which\n" +
179
- "is used to find modules and much more. For servers (i.e., `puppet master`)\n" +
180
- "this provides the default environment for nodes we know nothing about."
194
+ :desc => "The environment Puppet is running in. For clients
195
+ (e.g., `puppet agent`) this determines the environment itself, which
196
+ is used to find modules and much more. For servers (i.e., `puppet master`)
197
+ this provides the default environment for nodes we know nothing about."
181
198
  },
182
199
  :diff_args => {
183
200
  :default => default_diffargs,
184
- :desc => "Which arguments to pass to the diff command when printing differences between\n" +
185
- "files. The command to use can be chosen with the `diff` setting.",
201
+ :desc => "Which arguments to pass to the diff command when printing differences between
202
+ files. The command to use can be chosen with the `diff` setting.",
186
203
  },
187
204
  :diff => {
188
205
  :default => (Puppet.features.microsoft_windows? ? "" : "diff"),
189
- :desc => "Which diff command to use when printing differences between files. This setting\n" +
190
- "has no default value on Windows, as standard `diff` is not available, but Puppet can use many\n" +
191
- "third-party diff tools.",
206
+ :desc => "Which diff command to use when printing differences between files. This setting
207
+ has no default value on Windows, as standard `diff` is not available, but Puppet can use many
208
+ third-party diff tools.",
192
209
  },
193
210
  :show_diff => {
194
211
  :type => :boolean,
195
212
  :default => false,
196
- :desc => "Whether to log and report a contextual diff when files are being replaced. This causes\n" +
197
- "partial file contents to pass through Puppet's normal logging and reporting system, so this setting\n" +
198
- "should be used with caution if you are sending Puppet's reports to an insecure destination.\n" +
199
- "This feature currently requires the `diff/lcs` Ruby library.",
213
+ :desc => "Whether to log and report a contextual diff when files are being replaced.
214
+ This causes partial file contents to pass through Puppet's normal
215
+ logging and reporting system, so this setting should be used with
216
+ caution if you are sending Puppet's reports to an insecure
217
+ destination. This feature currently requires the `diff/lcs` Ruby
218
+ library.",
200
219
  },
201
220
  :daemonize => {
202
221
  :type => :boolean,
203
222
  :default => (Puppet.features.microsoft_windows? ? false : true),
204
- :desc => "Whether to send the process into the background. This defaults to true on POSIX systems,
205
- and to false on Windows (where Puppet currently cannot daemonize).",
223
+ :desc => "Whether to send the process into the background. This defaults
224
+ to true on POSIX systems, and to false on Windows (where Puppet
225
+ currently cannot daemonize).",
206
226
  :short => "D",
207
227
  :hook => proc do |value|
208
228
  if value and Puppet.features.microsoft_windows?
@@ -212,10 +232,11 @@ module Puppet
212
232
  },
213
233
  :maximum_uid => {
214
234
  :default => 4294967290,
215
- :desc => "The maximum allowed UID. Some platforms use negative UIDs\n" +
216
- "but then ship with tools that do not know how to handle signed ints, so the UIDs show up as\n" +
217
- "huge numbers that can then not be fed back into the system. This is a hackish way to fail in a\n" +
218
- "slightly more useful way when that happens.",
235
+ :desc => "The maximum allowed UID. Some platforms use negative UIDs
236
+ but then ship with tools that do not know how to handle signed ints,
237
+ so the UIDs show up as huge numbers that can then not be fed back into
238
+ the system. This is a hackish way to fail in a slightly more useful
239
+ way when that happens.",
219
240
  },
220
241
  :route_file => {
221
242
  :default => "$confdir/routes.yaml",
@@ -385,14 +406,21 @@ module Puppet
385
406
  :freeze_main => {
386
407
  :default => false,
387
408
  :type => :boolean,
388
- :desc => "Freezes the 'main' class, disallowing any code to be added to it. This\n" +
389
- "essentially means that you can't have any code outside of a node, class, or definition other\n" +
390
- "than in the site manifest.",
409
+ :desc => "Freezes the 'main' class, disallowing any code to be added to it. This
410
+ essentially means that you can't have any code outside of a node,
411
+ class, or definition other than in the site manifest.",
391
412
  },
392
413
  :stringify_facts => {
393
414
  :default => true,
394
415
  :type => :boolean,
395
- :desc => "Flatten fact values to strings using #to_s. Means you can't have arrays or hashes as fact values.",
416
+ :desc => "Flatten fact values to strings using #to_s. Means you can't have arrays or
417
+ hashes as fact values.",
418
+ },
419
+ :trusted_node_data => {
420
+ :default => false,
421
+ :type => :boolean,
422
+ :desc => "Stores trusted node data in a hash called $trusted.
423
+ When true also prevents $trusted from being overridden in any scope.",
396
424
  }
397
425
  )
398
426
  Puppet.define_settings(:module_tool,
@@ -470,6 +498,36 @@ This is unnecessary for agents, unless you intend to use them as a server for
470
498
  It is rarely necessary for servers; it is usually helpful only if you need to
471
499
  have a pool of multiple load balanced masters, or for the same master to
472
500
  respond on two physically separate networks under different names.
501
+ EOT
502
+ },
503
+ :csr_attributes => {
504
+ :default => "$confdir/csr_attributes.yaml",
505
+ :type => :file,
506
+ :desc => <<EOT
507
+ An optional file containing custom attributes to add to certificate signing
508
+ requests (CSRs). You should ensure that this file does not exist on your CA
509
+ puppet master; if it does, unwanted certificate extensions may leak into
510
+ certificates created with the `puppet cert generate` command.
511
+
512
+ If present, this file must be a YAML hash containing a `custom_attributes` key
513
+ and/or an `extension_requests` key. The value of each key must be a hash, where
514
+ each key is a valid OID and each value is an object that can be cast to a string.
515
+
516
+ Custom attributes can be used by the CA when deciding whether to sign the
517
+ certificate, but are then discarded. Attribute OIDs can be any OID value except
518
+ the standard CSR attributes (i.e. attributes described in RFC 2985 section 5.4).
519
+ This is useful for embedding a pre-shared key for autosigning policy executables
520
+ (see the `autosign` setting), often by using the `1.2.840.113549.1.9.7`
521
+ ("challenge password") OID.
522
+
523
+ Extension requests will be permanently embedded in the final certificate.
524
+ Extension OIDs must be in the "ppRegCertExt" (`1.3.6.1.4.1.34380.1.1`) or
525
+ "ppPrivCertExt" (`1.3.6.1.4.1.34380.1.2`) OID arcs. The ppRegCertExt arc is
526
+ reserved for four of the most common pieces of data to embed: `pp_uuid` (`.1`),
527
+ `pp_instance_id` (`.2`), `pp_image_name` (`.3`), and `pp_preshared_key` (`.4`)
528
+ --- in the YAML file, these can be referred to by their short descriptive names
529
+ instead of their full OID. The ppPrivCertExt arc is unregulated, and can be used
530
+ for site-specific extensions.
473
531
  EOT
474
532
  },
475
533
  :certdir => {
@@ -558,19 +616,19 @@ EOT
558
616
  :type => :file,
559
617
  :mode => 0644,
560
618
  :owner => "service",
561
- :desc => "Certificate authorities who issue server certificates. SSL servers will not be \n" <<
562
- "considered authentic unless they posses a certificate issued by an authority \n" <<
563
- "listed in this file. If this setting has no value then the Puppet master's CA \n" <<
564
- "certificate (localcacert) will be used."
619
+ :desc => "Certificate authorities who issue server certificates. SSL servers will not be
620
+ considered authentic unless they posses a certificate issued by an authority
621
+ listed in this file. If this setting has no value then the Puppet master's CA
622
+ certificate (localcacert) will be used."
565
623
  },
566
624
  :ssl_server_ca_auth => {
567
625
  :type => :file,
568
626
  :mode => 0644,
569
627
  :owner => "service",
570
- :desc => "Certificate authorities who issue client certificates. SSL clients will not be \n" <<
571
- "considered authentic unless they posses a certificate issued by an authority \n" <<
572
- "listed in this file. If this setting has no value then the Puppet master's CA \n" <<
573
- "certificate (localcacert) will be used."
628
+ :desc => "Certificate authorities who issue client certificates. SSL clients will not be
629
+ considered authentic unless they posses a certificate issued by an authority
630
+ listed in this file. If this setting has no value then the Puppet master's CA
631
+ certificate (localcacert) will be used."
574
632
  },
575
633
  :hostcrl => {
576
634
  :default => "$ssldir/crl.pem",
@@ -583,8 +641,9 @@ EOT
583
641
  :certificate_revocation => {
584
642
  :default => true,
585
643
  :type => :boolean,
586
- :desc => "Whether certificate revocation should be supported by downloading a Certificate Revocation List (CRL)
587
- to all clients. If enabled, CA chaining will almost definitely not work.",
644
+ :desc => "Whether certificate revocation should be supported by downloading a
645
+ Certificate Revocation List (CRL)
646
+ to all clients. If enabled, CA chaining will almost definitely not work.",
588
647
  },
589
648
  :certificate_expire_warning => {
590
649
  :default => "60d",
@@ -682,11 +741,36 @@ EOT
682
741
  :autosign => {
683
742
  :default => "$confdir/autosign.conf",
684
743
  :type => :file,
685
- :mode => 0644,
686
- :desc => "Whether to enable autosign. Valid values are true (which
687
- autosigns any key request, and is a very bad idea), false (which
688
- never autosigns any key request), and the path to a file, which
689
- uses that configuration file to determine which keys to sign."},
744
+ :desc => "Whether (and how) to autosign certificate requests. This setting
745
+ is only relevant on a puppet master acting as a certificate authority (CA).
746
+
747
+ Valid values are true (autosigns all certificate requests; not recommended),
748
+ false (disables autosigning certificates), or the absolute path to a file.
749
+
750
+ The file specified in this setting may be either a **configuration file**
751
+ or a **custom policy executable.** Puppet will automatically determine
752
+ what it is: If the Puppet user (see the `user` setting) can execute the
753
+ file, it will be treated as a policy executable; otherwise, it will be
754
+ treated as a config file.
755
+
756
+ If a custom policy executable is configured, the CA puppet master will run it
757
+ every time it receives a CSR. The executable will be passed the subject CN of the
758
+ request _as a command line argument,_ and the contents of the CSR in PEM format
759
+ _on stdin._ It should exit with a status of 0 if the cert should be autosigned
760
+ and non-zero if the cert should not be autosigned.
761
+
762
+ If a certificate request is not autosigned, it will persist for review. An admin
763
+ user can use the `puppet cert sign` command to manually sign it, or can delete
764
+ the request.
765
+
766
+ For info on autosign configuration files, see
767
+ [the guide to Puppet's config files](http://docs.puppetlabs.com/guides/configuring.html).",
768
+ :hook => proc do |value|
769
+ unless [false, 'false', true, 'true'].include?(value) or Puppet::Util.absolute_path?(value)
770
+ raise ArgumentError, "The autosign parameter must be 'true'/'false' or an absolute path"
771
+ end
772
+ end
773
+ },
690
774
  :allow_duplicate_certs => {
691
775
  :default => false,
692
776
  :type => :boolean,
@@ -733,10 +817,10 @@ EOT
733
817
  :pidfile => {
734
818
  :type => :file,
735
819
  :default => "$rundir/${run_mode}.pid",
736
- :desc => "The file containing the PID of a running process. " <<
737
- "This file is intended to be used by service management " <<
738
- "frameworks and monitoring systems to determine if a " <<
739
- "puppet process is still in the process table.",
820
+ :desc => "The file containing the PID of a running process.
821
+ This file is intended to be used by service management frameworks
822
+ and monitoring systems to determine if a puppet process is still in
823
+ the process table.",
740
824
  },
741
825
  :bindaddress => {
742
826
  :default => "0.0.0.0",
@@ -825,8 +909,9 @@ EOT
825
909
  :modulepath => {
826
910
  :default => "$confdir/modules#{File::PATH_SEPARATOR}/usr/share/puppet/modules",
827
911
  :type => :path,
828
- :desc => "The search path for modules, as a list of directories separated by the system path separator character. " +
829
- "(The POSIX path separator is ':', and the Windows path separator is ';'.)",
912
+ :desc => "The search path for modules, as a list of directories separated by the system
913
+ path separator character. (The POSIX path separator is ':', and the
914
+ Windows path separator is ';'.)",
830
915
  },
831
916
  :ssl_client_header => {
832
917
  :default => "HTTP_X_CLIENT_DN",
@@ -1025,6 +1110,12 @@ EOT
1025
1110
  :desc => "Boolean; whether puppet agent should ignore schedules. This is useful
1026
1111
  for initial puppet agent runs.",
1027
1112
  },
1113
+ :default_schedules => {
1114
+ :default => true,
1115
+ :type => :boolean,
1116
+ :desc => "Boolean; whether to generate the default schedule resources. Setting this to
1117
+ false is useful for keeping external report processors clean of skipped schedule resources.",
1118
+ },
1028
1119
  :puppetport => {
1029
1120
  :default => 8139,
1030
1121
  :desc => "Which port puppet agent listens on.",
@@ -1114,49 +1205,50 @@ EOT
1114
1205
  :agent_catalog_run_lockfile => {
1115
1206
  :default => "$statedir/agent_catalog_run.lock",
1116
1207
  :type => :string, # (#2888) Ensure this file is not added to the settings catalog.
1117
- :desc => "A lock file to indicate that a puppet agent catalog run is currently in progress. " +
1118
- "The file contains the pid of the process that holds the lock on the catalog run.",
1208
+ :desc => "A lock file to indicate that a puppet agent catalog run is currently in progress.
1209
+ The file contains the pid of the process that holds the lock on the catalog run.",
1119
1210
  },
1120
1211
  :agent_disabled_lockfile => {
1121
1212
  :default => "$statedir/agent_disabled.lock",
1122
- :type => :file,
1123
- :desc => "A lock file to indicate that puppet agent runs have been administratively disabled. File contains a JSON object with state information.",
1213
+ :type => :file,
1214
+ :desc => "A lock file to indicate that puppet agent runs have been administratively
1215
+ disabled. File contains a JSON object with state information.",
1124
1216
  },
1125
1217
  :usecacheonfailure => {
1126
1218
  :default => true,
1127
1219
  :type => :boolean,
1128
1220
  :desc => "Whether to use the cached configuration when the remote
1129
- configuration will not compile. This option is useful for testing
1130
- new configurations, where you want to fix the broken configuration
1131
- rather than reverting to a known-good one.",
1221
+ configuration will not compile. This option is useful for testing
1222
+ new configurations, where you want to fix the broken configuration
1223
+ rather than reverting to a known-good one.",
1132
1224
  },
1133
1225
  :use_cached_catalog => {
1134
1226
  :default => false,
1135
1227
  :type => :boolean,
1136
1228
  :desc => "Whether to only use the cached catalog rather than compiling a new catalog
1137
- on every run. Puppet can be run with this enabled by default and then selectively
1138
- disabled when a recompile is desired.",
1229
+ on every run. Puppet can be run with this enabled by default and then selectively
1230
+ disabled when a recompile is desired.",
1139
1231
  },
1140
1232
  :ignoremissingtypes => {
1141
1233
  :default => false,
1142
1234
  :type => :boolean,
1143
1235
  :desc => "Skip searching for classes and definitions that were missing during a
1144
- prior compilation. The list of missing objects is maintained per-environment and
1145
- persists until the environment is cleared or the master is restarted.",
1236
+ prior compilation. The list of missing objects is maintained per-environment and
1237
+ persists until the environment is cleared or the master is restarted.",
1146
1238
  },
1147
1239
  :ignorecache => {
1148
1240
  :default => false,
1149
1241
  :type => :boolean,
1150
1242
  :desc => "Ignore cache and always recompile the configuration. This is
1151
- useful for testing new configurations, where the local cache may in
1152
- fact be stale even if the timestamps are up to date - if the facts
1153
- change or if the server changes.",
1243
+ useful for testing new configurations, where the local cache may in
1244
+ fact be stale even if the timestamps are up to date - if the facts
1245
+ change or if the server changes.",
1154
1246
  },
1155
1247
  :dynamicfacts => {
1156
1248
  :default => "memorysize,memoryfree,swapsize,swapfree",
1157
1249
  :desc => "(Deprecated) Facts that are dynamic; these facts will be ignored when deciding whether
1158
- changed facts should result in a recompile. Multiple facts should be
1159
- comma-separated.",
1250
+ changed facts should result in a recompile. Multiple facts should be
1251
+ comma-separated.",
1160
1252
  :hook => proc { |value|
1161
1253
  if value
1162
1254
  Puppet.deprecation_warning "The dynamicfacts setting is deprecated and will be ignored."
@@ -1167,13 +1259,13 @@ EOT
1167
1259
  :default => "$runinterval",
1168
1260
  :type => :duration,
1169
1261
  :desc => "The maximum time to delay before runs. Defaults to being the same as the
1170
- run interval. #{AS_DURATION}",
1262
+ run interval. #{AS_DURATION}",
1171
1263
  },
1172
1264
  :splay => {
1173
1265
  :default => false,
1174
1266
  :type => :boolean,
1175
1267
  :desc => "Whether to sleep for a pseudo-random (but consistent) amount of time before
1176
- a run.",
1268
+ a run.",
1177
1269
  },
1178
1270
  :clientbucketdir => {
1179
1271
  :default => "$vardir/clientbucket",
@@ -1185,8 +1277,8 @@ EOT
1185
1277
  :default => "2m",
1186
1278
  :type => :duration,
1187
1279
  :desc => "How long the client should wait for the configuration to be retrieved
1188
- before considering it a failure. This can help reduce flapping if too
1189
- many clients contact the server at one time. #{AS_DURATION}",
1280
+ before considering it a failure. This can help reduce flapping if too
1281
+ many clients contact the server at one time. #{AS_DURATION}",
1190
1282
  },
1191
1283
  :report_server => {
1192
1284
  :default => "$server",
@@ -1225,8 +1317,8 @@ EOT
1225
1317
  :default => false,
1226
1318
  :type => :boolean,
1227
1319
  :desc => "Whether to create dot graph files for the different
1228
- configuration graphs. These dot files can be interpreted by tools
1229
- like OmniGraffle or dot (which is part of ImageMagick).",
1320
+ configuration graphs. These dot files can be interpreted by tools
1321
+ like OmniGraffle or dot (which is part of ImageMagick).",
1230
1322
  },
1231
1323
  :graphdir => {
1232
1324
  :default => "$statedir/graphs",
@@ -1237,11 +1329,12 @@ EOT
1237
1329
  :default => false,
1238
1330
  :type => :boolean,
1239
1331
  :desc => "Allow http compression in REST communication with the master.
1240
- This setting might improve performance for agent -> master communications over slow WANs.
1241
- Your puppet master needs to support compression (usually by activating some settings in a reverse-proxy
1242
- in front of the puppet master, which rules out webrick).
1243
- It is harmless to activate this settings if your master doesn't support
1244
- compression, but if it supports it, this setting might reduce performance on high-speed LANs.",
1332
+ This setting might improve performance for agent -> master
1333
+ communications over slow WANs. Your puppet master needs to support
1334
+ compression (usually by activating some settings in a reverse-proxy in
1335
+ front of the puppet master, which rules out webrick). It is harmless to
1336
+ activate this settings if your master doesn't support compression, but
1337
+ if it supports it, this setting might reduce performance on high-speed LANs.",
1245
1338
  },
1246
1339
  :waitforcert => {
1247
1340
  :default => "2m",
@@ -1310,6 +1403,15 @@ EOT
1310
1403
  is used for retrieval, so anything that is a valid file source can
1311
1404
  be used here.",
1312
1405
  },
1406
+ :pluginfactdest => {
1407
+ :type => :directory,
1408
+ :default => "$vardir/facts.d",
1409
+ :desc => "Where Puppet should store external facts that are being handled by pluginsync",
1410
+ },
1411
+ :pluginfactsource => {
1412
+ :default => "puppet://$server/pluginfacts",
1413
+ :desc => "Where to retrieve external facts for pluginsync",
1414
+ },
1313
1415
  :pluginsync => {
1314
1416
  :default => true,
1315
1417
  :type => :boolean,
@@ -1330,7 +1432,8 @@ EOT
1330
1432
  :type => :path,
1331
1433
  :default => "$vardir/lib/facter#{File::PATH_SEPARATOR}$vardir/facts",
1332
1434
  :desc => "Where Puppet should look for facts. Multiple directories should
1333
- be separated by the system path separator character. (The POSIX path separator is ':', and the Windows path separator is ';'.)",
1435
+ be separated by the system path separator character. (The POSIX path
1436
+ separator is ':', and the Windows path separator is ';'.)",
1334
1437
 
1335
1438
  :call_hook => :on_initialize_and_write, # Call our hook with the default value, so we always get the value added to facter.
1336
1439
  :hook => proc { |value| Facter.search(value) if Facter.respond_to?(:search) }}
@@ -1400,27 +1503,27 @@ EOT
1400
1503
  :dbport => {
1401
1504
  :default => "",
1402
1505
  :desc => "The database password for caching. Only
1403
- used when networked databases are used. #{STORECONFIGS_ONLY}",
1506
+ used when networked databases are used. #{STORECONFIGS_ONLY}",
1404
1507
  },
1405
1508
  :dbuser => {
1406
1509
  :default => "puppet",
1407
1510
  :desc => "The database user for caching. Only
1408
- used when networked databases are used. #{STORECONFIGS_ONLY}",
1511
+ used when networked databases are used. #{STORECONFIGS_ONLY}",
1409
1512
  },
1410
1513
  :dbpassword => {
1411
1514
  :default => "puppet",
1412
1515
  :desc => "The database password for caching. Only
1413
- used when networked databases are used. #{STORECONFIGS_ONLY}",
1516
+ used when networked databases are used. #{STORECONFIGS_ONLY}",
1414
1517
  },
1415
1518
  :dbconnections => {
1416
1519
  :default => '',
1417
1520
  :desc => "The number of database connections for networked
1418
- databases. Will be ignored unless the value is a positive integer. #{STORECONFIGS_ONLY}",
1521
+ databases. Will be ignored unless the value is a positive integer. #{STORECONFIGS_ONLY}",
1419
1522
  },
1420
1523
  :dbsocket => {
1421
1524
  :default => "",
1422
1525
  :desc => "The database socket location. Only used when networked
1423
- databases are used. Will be ignored if the value is an empty string. #{STORECONFIGS_ONLY}",
1526
+ databases are used. Will be ignored if the value is an empty string. #{STORECONFIGS_ONLY}",
1424
1527
  },
1425
1528
  :railslog => {
1426
1529
  :default => "$logdir/rails.log",
@@ -1434,8 +1537,8 @@ EOT
1434
1537
  :rails_loglevel => {
1435
1538
  :default => "info",
1436
1539
  :desc => "The log level for Rails connections. The value must be
1437
- a valid log level within Rails. Production environments normally use `info`
1438
- and other environments normally use `debug`. #{STORECONFIGS_ONLY}",
1540
+ a valid log level within Rails. Production environments normally use `info`
1541
+ and other environments normally use `debug`. #{STORECONFIGS_ONLY}",
1439
1542
  }
1440
1543
  )
1441
1544
 
@@ -1445,7 +1548,7 @@ EOT
1445
1548
  :couchdb_url => {
1446
1549
  :default => "http://127.0.0.1:5984/puppet",
1447
1550
  :desc => "The url where the puppet couchdb database will be created.
1448
- Only used when `facts_terminus` is set to `couch`.",
1551
+ Only used when `facts_terminus` is set to `couch`.",
1449
1552
  }
1450
1553
  )
1451
1554
 
@@ -1454,15 +1557,15 @@ EOT
1454
1557
  :tags => {
1455
1558
  :default => "",
1456
1559
  :desc => "Tags to use to find resources. If this is set, then
1457
- only resources tagged with the specified tags will be applied.
1458
- Values must be comma-separated.",
1560
+ only resources tagged with the specified tags will be applied.
1561
+ Values must be comma-separated.",
1459
1562
  },
1460
1563
  :evaltrace => {
1461
1564
  :default => false,
1462
1565
  :type => :boolean,
1463
1566
  :desc => "Whether each resource should log when it is
1464
- being evaluated. This allows you to interactively see exactly
1465
- what is being done.",
1567
+ being evaluated. This allows you to interactively see exactly
1568
+ what is being done.",
1466
1569
  },
1467
1570
  :summarize => {
1468
1571
  :default => false,
@@ -1476,13 +1579,13 @@ EOT
1476
1579
  :external_nodes => {
1477
1580
  :default => "none",
1478
1581
  :desc => "An external command that can produce node information. The command's output
1479
- must be a YAML dump of a hash, and that hash must have a `classes` key and/or
1480
- a `parameters` key, where `classes` is an array or hash and
1481
- `parameters` is a hash. For unknown nodes, the command should
1482
- exit with a non-zero exit code.
1582
+ must be a YAML dump of a hash, and that hash must have a `classes` key and/or
1583
+ a `parameters` key, where `classes` is an array or hash and
1584
+ `parameters` is a hash. For unknown nodes, the command should
1585
+ exit with a non-zero exit code.
1483
1586
 
1484
- This command makes it straightforward to store your node mapping
1485
- information in other data sources like databases.",
1587
+ This command makes it straightforward to store your node mapping
1588
+ information in other data sources like databases.",
1486
1589
  }
1487
1590
  )
1488
1591
 
@@ -1492,15 +1595,15 @@ EOT
1492
1595
  :default => false,
1493
1596
  :type => :boolean,
1494
1597
  :desc => "Whether SSL should be used when searching for nodes.
1495
- Defaults to false because SSL usually requires certificates
1496
- to be set up on the client side.",
1598
+ Defaults to false because SSL usually requires certificates
1599
+ to be set up on the client side.",
1497
1600
  },
1498
1601
  :ldaptls => {
1499
1602
  :default => false,
1500
1603
  :type => :boolean,
1501
1604
  :desc => "Whether TLS should be used when searching for nodes.
1502
- Defaults to false because TLS usually requires certificates
1503
- to be set up on the client side.",
1605
+ Defaults to false because TLS usually requires certificates
1606
+ to be set up on the client side.",
1504
1607
  },
1505
1608
  :ldapserver => {
1506
1609
  :default => "ldap",
@@ -1518,20 +1621,20 @@ EOT
1518
1621
  :ldapclassattrs => {
1519
1622
  :default => "puppetclass",
1520
1623
  :desc => "The LDAP attributes to use to define Puppet classes. Values
1521
- should be comma-separated.",
1624
+ should be comma-separated.",
1522
1625
  },
1523
1626
  :ldapstackedattrs => {
1524
1627
  :default => "puppetvar",
1525
1628
  :desc => "The LDAP attributes that should be stacked to arrays by adding
1526
- the values in all hierarchy elements of the tree. Values
1527
- should be comma-separated.",
1629
+ the values in all hierarchy elements of the tree. Values
1630
+ should be comma-separated.",
1528
1631
  },
1529
1632
  :ldapattrs => {
1530
1633
  :default => "all",
1531
1634
  :desc => "The LDAP attributes to include when querying LDAP for nodes. All
1532
- returned attributes are set as variables in the top-level scope.
1533
- Multiple values should be comma-separated. The value 'all' returns
1534
- all attributes.",
1635
+ returned attributes are set as variables in the top-level scope.
1636
+ Multiple values should be comma-separated. The value 'all' returns
1637
+ all attributes.",
1535
1638
  },
1536
1639
  :ldapparentattr => {
1537
1640
  :default => "parentnode",
@@ -1540,7 +1643,7 @@ EOT
1540
1643
  :ldapuser => {
1541
1644
  :default => "",
1542
1645
  :desc => "The user to use to connect to LDAP. Must be specified as a
1543
- full DN.",
1646
+ full DN.",
1544
1647
  },
1545
1648
  :ldappassword => {
1546
1649
  :default => "",
@@ -1549,9 +1652,9 @@ EOT
1549
1652
  :ldapbase => {
1550
1653
  :default => "",
1551
1654
  :desc => "The search base for LDAP searches. It's impossible to provide
1552
- a meaningful default here, although the LDAP libraries might
1553
- have one already set. Generally, it should be the 'ou=Hosts'
1554
- branch under your main directory.",
1655
+ a meaningful default here, although the LDAP libraries might
1656
+ have one already set. Generally, it should be the 'ou=Hosts'
1657
+ branch under your main directory.",
1555
1658
  }
1556
1659
  )
1557
1660
 
@@ -1560,13 +1663,13 @@ EOT
1560
1663
  :default => false,
1561
1664
  :type => :boolean,
1562
1665
  :desc => "Whether to store each client's configuration, including catalogs, facts,
1563
- and related data. This also enables the import and export of resources in
1564
- the Puppet language - a mechanism for exchange resources between nodes.
1666
+ and related data. This also enables the import and export of resources in
1667
+ the Puppet language - a mechanism for exchange resources between nodes.
1565
1668
 
1566
- By default this uses ActiveRecord and an SQL database to store and query
1567
- the data; this, in turn, will depend on Rails being available.
1669
+ By default this uses ActiveRecord and an SQL database to store and query
1670
+ the data; this, in turn, will depend on Rails being available.
1568
1671
 
1569
- You can adjust the backend using the storeconfigs_backend setting.",
1672
+ You can adjust the backend using the storeconfigs_backend setting.",
1570
1673
  # Call our hook with the default value, so we always get the libdir set.
1571
1674
  :call_hook => :on_initialize_and_write,
1572
1675
  :hook => proc do |value|
@@ -1587,8 +1690,8 @@ You can adjust the backend using the storeconfigs_backend setting.",
1587
1690
  :type => :terminus,
1588
1691
  :default => "active_record",
1589
1692
  :desc => "Configure the backend terminus used for StoreConfigs.
1590
- By default, this uses the ActiveRecord store, which directly talks to the
1591
- database from within the Puppet Master process."
1693
+ By default, this uses the ActiveRecord store, which directly talks to the
1694
+ database from within the Puppet Master process."
1592
1695
  }
1593
1696
  )
1594
1697
 
@@ -1597,57 +1700,63 @@ database from within the Puppet Master process."
1597
1700
  :default => "$vardir/templates",
1598
1701
  :type => :directory,
1599
1702
  :desc => "Where Puppet looks for template files. Can be a list of colon-separated
1600
- directories.",
1703
+ directories.",
1601
1704
  },
1602
1705
 
1603
1706
  :allow_variables_with_dashes => {
1604
1707
  :default => false,
1605
1708
  :desc => <<-'EOT'
1606
- Permit hyphens (`-`) in variable names and issue deprecation warnings about
1607
- them. This setting **should always be `false`;** setting it to `true`
1608
- will cause subtle and wide-ranging bugs. It will be removed in a future version.
1609
-
1610
- Hyphenated variables caused major problems in the language, but were allowed
1611
- between Puppet 2.7.3 and 2.7.14. If you used them during this window, we
1612
- apologize for the inconvenience --- you can temporarily set this to `true`
1613
- in order to upgrade, and can rename your variables at your leisure. Please
1614
- revert it to `false` after you have renamed all affected variables.
1615
- EOT
1709
+ Permit hyphens (`-`) in variable names and issue deprecation warnings about
1710
+ them. This setting **should always be `false`;** setting it to `true`
1711
+ will cause subtle and wide-ranging bugs. It will be removed in a future version.
1712
+
1713
+ Hyphenated variables caused major problems in the language, but were allowed
1714
+ between Puppet 2.7.3 and 2.7.14. If you used them during this window, we
1715
+ apologize for the inconvenience --- you can temporarily set this to `true`
1716
+ in order to upgrade, and can rename your variables at your leisure. Please
1717
+ revert it to `false` after you have renamed all affected variables.
1718
+ EOT
1616
1719
  },
1617
1720
  :parser => {
1618
1721
  :default => "current",
1619
1722
  :desc => <<-'EOT'
1620
- Selects the parser to use for parsing puppet manifests (in puppet DSL language/'.pp' files).
1621
- Available choices are 'current' (the default), and 'future'.
1723
+ Selects the parser to use for parsing puppet manifests (in puppet DSL
1724
+ language/'.pp' files). Available choices are `current` (the default),
1725
+ and `future`.
1622
1726
 
1623
- The 'curent' parser means that the released version of the parser should be used.
1727
+ The `curent` parser means that the released version of the parser should
1728
+ be used.
1624
1729
 
1625
- The 'future' parser is a "time travel to the future" allowing early exposure to new language features.
1626
- What these fatures are will vary from release to release and they may be invididually configurable.
1730
+ The `future` parser is a "time travel to the future" allowing early
1731
+ exposure to new language features. What these fatures are will vary from
1732
+ release to release and they may be invididually configurable.
1627
1733
 
1628
- Available Since Puppet 3.2.
1629
- EOT
1734
+ Available Since Puppet 3.2.
1735
+ EOT
1630
1736
  },
1631
1737
  :max_errors => {
1632
1738
  :default => 10,
1633
1739
  :desc => <<-'EOT'
1634
- Sets the max number of logged/displayed parser validation errors in case multiple errors have been detected.
1635
- A value of 0 is the same as value 1. The count is per manifest.
1636
- EOT
1740
+ Sets the max number of logged/displayed parser validation errors in case
1741
+ multiple errors have been detected. A value of 0 is the same as value 1.
1742
+ The count is per manifest.
1743
+ EOT
1637
1744
  },
1638
1745
  :max_warnings => {
1639
1746
  :default => 10,
1640
1747
  :desc => <<-'EOT'
1641
- Sets the max number of logged/displayed parser validation warnings in case multiple errors have been detected.
1642
- A value of 0 is the same as value 1. The count is per manifest.
1643
- EOT
1748
+ Sets the max number of logged/displayed parser validation warnings in
1749
+ case multiple errors have been detected. A value of 0 is the same as
1750
+ value 1. The count is per manifest.
1751
+ EOT
1644
1752
  },
1645
1753
  :max_deprecations => {
1646
1754
  :default => 10,
1647
1755
  :desc => <<-'EOT'
1648
- Sets the max number of logged/displayed parser validation deprecation warnings in case multiple errors have been detected.
1649
- A value of 0 is the same as value 1. The count is per manifest.
1650
- EOT
1756
+ Sets the max number of logged/displayed parser validation deprecation
1757
+ warnings in case multiple errors have been detected. A value of 0 is the
1758
+ same as value 1. The count is per manifest.
1759
+ EOT
1651
1760
  }
1652
1761
 
1653
1762
  )
@@ -1656,7 +1765,7 @@ EOT
1656
1765
  :default => false,
1657
1766
  :type => :boolean,
1658
1767
  :desc => "Whether to document all resources when using `puppet doc` to
1659
- generate manifest documentation.",
1768
+ generate manifest documentation.",
1660
1769
  }
1661
1770
  )
1662
1771
  end