openvox 7.37.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1120) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +15 -0
  3. data/CODEOWNERS +11 -0
  4. data/CODE_OF_CONDUCT.md +70 -0
  5. data/CONTRIBUTING.md +161 -0
  6. data/Gemfile +82 -0
  7. data/Guardfile.example +76 -0
  8. data/LICENSE +202 -0
  9. data/README.md +68 -0
  10. data/Rakefile +160 -0
  11. data/bin/puppet +9 -0
  12. data/conf/environment.conf +18 -0
  13. data/conf/fileserver.conf +32 -0
  14. data/conf/hiera.yaml +11 -0
  15. data/conf/puppet.conf +6 -0
  16. data/examples/enc/regexp_nodes/classes/databases +2 -0
  17. data/examples/enc/regexp_nodes/classes/webservers +2 -0
  18. data/examples/enc/regexp_nodes/environment/development +2 -0
  19. data/examples/enc/regexp_nodes/parameters/service/prod +1 -0
  20. data/examples/enc/regexp_nodes/parameters/service/qa +3 -0
  21. data/examples/enc/regexp_nodes/parameters/service/sandbox +1 -0
  22. data/examples/enc/regexp_nodes/regexp_nodes.rb +270 -0
  23. data/examples/hiera/README.md +91 -0
  24. data/examples/hiera/etc/hiera.yaml +15 -0
  25. data/examples/hiera/etc/hieradb/common.yaml +3 -0
  26. data/examples/hiera/etc/hieradb/dc1.yaml +6 -0
  27. data/examples/hiera/etc/hieradb/development.yaml +2 -0
  28. data/examples/hiera/etc/puppet.conf +3 -0
  29. data/examples/hiera/modules/data/manifests/common.pp +4 -0
  30. data/examples/hiera/modules/ntp/manifests/config.pp +6 -0
  31. data/examples/hiera/modules/ntp/manifests/data.pp +4 -0
  32. data/examples/hiera/modules/ntp/templates/ntp.conf.erb +3 -0
  33. data/examples/hiera/modules/users/manifests/common.pp +4 -0
  34. data/examples/hiera/modules/users/manifests/dc1.pp +4 -0
  35. data/examples/hiera/modules/users/manifests/development.pp +4 -0
  36. data/examples/hiera/site.pp +3 -0
  37. data/examples/nagios/check_puppet.rb +123 -0
  38. data/ext/README.md +13 -0
  39. data/ext/build_defaults.yaml +18 -0
  40. data/ext/debian/puppet.default +4 -0
  41. data/ext/debian/puppet.init +113 -0
  42. data/ext/hiera/hiera.yaml +15 -0
  43. data/ext/osx/puppet.plist +32 -0
  44. data/ext/project_data.yaml +20 -0
  45. data/ext/redhat/client.init +169 -0
  46. data/ext/redhat/client.sysconfig +2 -0
  47. data/ext/solaris/smf/puppet +44 -0
  48. data/ext/solaris/smf/puppet.xml +46 -0
  49. data/ext/suse/client.init +141 -0
  50. data/ext/systemd/puppet.service +26 -0
  51. data/ext/windows/puppet_interactive.bat +6 -0
  52. data/ext/windows/puppet_shell.bat +9 -0
  53. data/ext/windows/run_puppet_interactive.bat +9 -0
  54. data/ext/windows/service/daemon.bat +6 -0
  55. data/ext/windows/service/daemon.rb +225 -0
  56. data/install.rb +499 -0
  57. data/lib/hiera/puppet_function.rb +84 -0
  58. data/lib/hiera/scope.rb +90 -0
  59. data/lib/hiera_puppet.rb +80 -0
  60. data/lib/puppet/agent/disabler.rb +53 -0
  61. data/lib/puppet/agent/locker.rb +46 -0
  62. data/lib/puppet/agent.rb +176 -0
  63. data/lib/puppet/application/agent.rb +523 -0
  64. data/lib/puppet/application/apply.rb +428 -0
  65. data/lib/puppet/application/catalog.rb +4 -0
  66. data/lib/puppet/application/config.rb +5 -0
  67. data/lib/puppet/application/describe.rb +253 -0
  68. data/lib/puppet/application/device.rb +439 -0
  69. data/lib/puppet/application/doc.rb +233 -0
  70. data/lib/puppet/application/epp.rb +5 -0
  71. data/lib/puppet/application/face_base.rb +276 -0
  72. data/lib/puppet/application/facts.rb +9 -0
  73. data/lib/puppet/application/filebucket.rb +318 -0
  74. data/lib/puppet/application/generate.rb +5 -0
  75. data/lib/puppet/application/help.rb +5 -0
  76. data/lib/puppet/application/indirection_base.rb +4 -0
  77. data/lib/puppet/application/lookup.rb +433 -0
  78. data/lib/puppet/application/module.rb +4 -0
  79. data/lib/puppet/application/node.rb +4 -0
  80. data/lib/puppet/application/parser.rb +5 -0
  81. data/lib/puppet/application/plugin.rb +4 -0
  82. data/lib/puppet/application/report.rb +4 -0
  83. data/lib/puppet/application/resource.rb +254 -0
  84. data/lib/puppet/application/script.rb +264 -0
  85. data/lib/puppet/application/ssl.rb +323 -0
  86. data/lib/puppet/application.rb +596 -0
  87. data/lib/puppet/application_support.rb +68 -0
  88. data/lib/puppet/coercion.rb +40 -0
  89. data/lib/puppet/compilable_resource_type.rb +15 -0
  90. data/lib/puppet/concurrent/lock.rb +16 -0
  91. data/lib/puppet/concurrent/synchronized.rb +15 -0
  92. data/lib/puppet/concurrent/thread_local_singleton.rb +17 -0
  93. data/lib/puppet/concurrent.rb +2 -0
  94. data/lib/puppet/configurer/downloader.rb +85 -0
  95. data/lib/puppet/configurer/fact_handler.rb +50 -0
  96. data/lib/puppet/configurer/plugin_handler.rb +59 -0
  97. data/lib/puppet/configurer.rb +755 -0
  98. data/lib/puppet/confine/any.rb +26 -0
  99. data/lib/puppet/confine/boolean.rb +45 -0
  100. data/lib/puppet/confine/exists.rb +19 -0
  101. data/lib/puppet/confine/false.rb +25 -0
  102. data/lib/puppet/confine/feature.rb +17 -0
  103. data/lib/puppet/confine/true.rb +26 -0
  104. data/lib/puppet/confine/variable.rb +59 -0
  105. data/lib/puppet/confine.rb +83 -0
  106. data/lib/puppet/confine_collection.rb +51 -0
  107. data/lib/puppet/confiner.rb +46 -0
  108. data/lib/puppet/context/trusted_information.rb +120 -0
  109. data/lib/puppet/context.rb +188 -0
  110. data/lib/puppet/daemon.rb +182 -0
  111. data/lib/puppet/data_binding.rb +14 -0
  112. data/lib/puppet/datatypes/error.rb +21 -0
  113. data/lib/puppet/datatypes/impl/error.rb +40 -0
  114. data/lib/puppet/datatypes.rb +213 -0
  115. data/lib/puppet/defaults.rb +2277 -0
  116. data/lib/puppet/environments.rb +601 -0
  117. data/lib/puppet/error.rb +138 -0
  118. data/lib/puppet/etc.rb +180 -0
  119. data/lib/puppet/external/dot.rb +325 -0
  120. data/lib/puppet/external/pson/common.rb +374 -0
  121. data/lib/puppet/external/pson/pure/generator.rb +395 -0
  122. data/lib/puppet/external/pson/pure/parser.rb +308 -0
  123. data/lib/puppet/external/pson/pure.rb +15 -0
  124. data/lib/puppet/external/pson/version.rb +8 -0
  125. data/lib/puppet/face/catalog/select.rb +49 -0
  126. data/lib/puppet/face/catalog.rb +165 -0
  127. data/lib/puppet/face/config.rb +267 -0
  128. data/lib/puppet/face/epp.rb +566 -0
  129. data/lib/puppet/face/facts.rb +174 -0
  130. data/lib/puppet/face/generate.rb +66 -0
  131. data/lib/puppet/face/help/action.erb +90 -0
  132. data/lib/puppet/face/help/face.erb +115 -0
  133. data/lib/puppet/face/help/global.erb +16 -0
  134. data/lib/puppet/face/help/man.erb +152 -0
  135. data/lib/puppet/face/help.rb +242 -0
  136. data/lib/puppet/face/module/changes.rb +43 -0
  137. data/lib/puppet/face/module/install.rb +146 -0
  138. data/lib/puppet/face/module/list.rb +272 -0
  139. data/lib/puppet/face/module/uninstall.rb +89 -0
  140. data/lib/puppet/face/module/upgrade.rb +87 -0
  141. data/lib/puppet/face/module.rb +19 -0
  142. data/lib/puppet/face/node/clean.rb +107 -0
  143. data/lib/puppet/face/node.rb +43 -0
  144. data/lib/puppet/face/parser.rb +227 -0
  145. data/lib/puppet/face/plugin.rb +60 -0
  146. data/lib/puppet/face/report.rb +54 -0
  147. data/lib/puppet/face/resource.rb +53 -0
  148. data/lib/puppet/face.rb +12 -0
  149. data/lib/puppet/facter_impl.rb +96 -0
  150. data/lib/puppet/feature/base.rb +76 -0
  151. data/lib/puppet/feature/bolt.rb +3 -0
  152. data/lib/puppet/feature/cfpropertylist.rb +3 -0
  153. data/lib/puppet/feature/eventlog.rb +5 -0
  154. data/lib/puppet/feature/hiera_eyaml.rb +3 -0
  155. data/lib/puppet/feature/hocon.rb +3 -0
  156. data/lib/puppet/feature/libuser.rb +8 -0
  157. data/lib/puppet/feature/msgpack.rb +3 -0
  158. data/lib/puppet/feature/pe_license.rb +4 -0
  159. data/lib/puppet/feature/selinux.rb +3 -0
  160. data/lib/puppet/feature/ssh.rb +3 -0
  161. data/lib/puppet/feature/telnet.rb +9 -0
  162. data/lib/puppet/feature/zlib.rb +5 -0
  163. data/lib/puppet/ffi/posix/constants.rb +14 -0
  164. data/lib/puppet/ffi/posix/functions.rb +24 -0
  165. data/lib/puppet/ffi/posix.rb +10 -0
  166. data/lib/puppet/ffi/windows/api_types.rb +311 -0
  167. data/lib/puppet/ffi/windows/constants.rb +404 -0
  168. data/lib/puppet/ffi/windows/functions.rb +628 -0
  169. data/lib/puppet/ffi/windows/structs.rb +338 -0
  170. data/lib/puppet/ffi/windows.rb +12 -0
  171. data/lib/puppet/file_bucket/dipper.rb +174 -0
  172. data/lib/puppet/file_bucket/file.rb +129 -0
  173. data/lib/puppet/file_bucket.rb +4 -0
  174. data/lib/puppet/file_serving/base.rb +86 -0
  175. data/lib/puppet/file_serving/configuration/parser.rb +113 -0
  176. data/lib/puppet/file_serving/configuration.rb +113 -0
  177. data/lib/puppet/file_serving/content.rb +43 -0
  178. data/lib/puppet/file_serving/fileset.rb +186 -0
  179. data/lib/puppet/file_serving/http_metadata.rb +62 -0
  180. data/lib/puppet/file_serving/metadata.rb +171 -0
  181. data/lib/puppet/file_serving/mount/file.rb +122 -0
  182. data/lib/puppet/file_serving/mount/locales.rb +35 -0
  183. data/lib/puppet/file_serving/mount/modules.rb +26 -0
  184. data/lib/puppet/file_serving/mount/pluginfacts.rb +35 -0
  185. data/lib/puppet/file_serving/mount/plugins.rb +35 -0
  186. data/lib/puppet/file_serving/mount/scripts.rb +24 -0
  187. data/lib/puppet/file_serving/mount/tasks.rb +23 -0
  188. data/lib/puppet/file_serving/mount.rb +38 -0
  189. data/lib/puppet/file_serving/terminus_helper.rb +31 -0
  190. data/lib/puppet/file_serving/terminus_selector.rb +31 -0
  191. data/lib/puppet/file_serving.rb +3 -0
  192. data/lib/puppet/file_system/file_impl.rb +188 -0
  193. data/lib/puppet/file_system/jruby.rb +23 -0
  194. data/lib/puppet/file_system/memory_file.rb +79 -0
  195. data/lib/puppet/file_system/memory_impl.rb +99 -0
  196. data/lib/puppet/file_system/path_pattern.rb +93 -0
  197. data/lib/puppet/file_system/posix.rb +47 -0
  198. data/lib/puppet/file_system/uniquefile.rb +188 -0
  199. data/lib/puppet/file_system/windows.rb +213 -0
  200. data/lib/puppet/file_system.rb +419 -0
  201. data/lib/puppet/forge/cache.rb +60 -0
  202. data/lib/puppet/forge/errors.rb +114 -0
  203. data/lib/puppet/forge/repository.rb +95 -0
  204. data/lib/puppet/forge.rb +259 -0
  205. data/lib/puppet/functions/abs.rb +61 -0
  206. data/lib/puppet/functions/alert.rb +14 -0
  207. data/lib/puppet/functions/all.rb +104 -0
  208. data/lib/puppet/functions/annotate.rb +108 -0
  209. data/lib/puppet/functions/any.rb +109 -0
  210. data/lib/puppet/functions/assert_type.rb +93 -0
  211. data/lib/puppet/functions/binary_file.rb +32 -0
  212. data/lib/puppet/functions/break.rb +47 -0
  213. data/lib/puppet/functions/call.rb +80 -0
  214. data/lib/puppet/functions/camelcase.rb +62 -0
  215. data/lib/puppet/functions/capitalize.rb +61 -0
  216. data/lib/puppet/functions/ceiling.rb +37 -0
  217. data/lib/puppet/functions/chomp.rb +57 -0
  218. data/lib/puppet/functions/chop.rb +67 -0
  219. data/lib/puppet/functions/compare.rb +125 -0
  220. data/lib/puppet/functions/contain.rb +55 -0
  221. data/lib/puppet/functions/convert_to.rb +34 -0
  222. data/lib/puppet/functions/crit.rb +14 -0
  223. data/lib/puppet/functions/debug.rb +14 -0
  224. data/lib/puppet/functions/defined.rb +159 -0
  225. data/lib/puppet/functions/dig.rb +67 -0
  226. data/lib/puppet/functions/downcase.rb +89 -0
  227. data/lib/puppet/functions/each.rb +167 -0
  228. data/lib/puppet/functions/emerg.rb +14 -0
  229. data/lib/puppet/functions/empty.rb +85 -0
  230. data/lib/puppet/functions/epp.rb +49 -0
  231. data/lib/puppet/functions/err.rb +14 -0
  232. data/lib/puppet/functions/eyaml_lookup_key.rb +102 -0
  233. data/lib/puppet/functions/filter.rb +137 -0
  234. data/lib/puppet/functions/find_file.rb +44 -0
  235. data/lib/puppet/functions/find_template.rb +63 -0
  236. data/lib/puppet/functions/flatten.rb +64 -0
  237. data/lib/puppet/functions/floor.rb +37 -0
  238. data/lib/puppet/functions/get.rb +150 -0
  239. data/lib/puppet/functions/getvar.rb +87 -0
  240. data/lib/puppet/functions/group_by.rb +62 -0
  241. data/lib/puppet/functions/hiera.rb +89 -0
  242. data/lib/puppet/functions/hiera_array.rb +81 -0
  243. data/lib/puppet/functions/hiera_hash.rb +92 -0
  244. data/lib/puppet/functions/hiera_include.rb +104 -0
  245. data/lib/puppet/functions/hocon_data.rb +41 -0
  246. data/lib/puppet/functions/import.rb +7 -0
  247. data/lib/puppet/functions/include.rb +53 -0
  248. data/lib/puppet/functions/index.rb +167 -0
  249. data/lib/puppet/functions/info.rb +14 -0
  250. data/lib/puppet/functions/inline_epp.rb +60 -0
  251. data/lib/puppet/functions/join.rb +56 -0
  252. data/lib/puppet/functions/json_data.rb +33 -0
  253. data/lib/puppet/functions/keys.rb +25 -0
  254. data/lib/puppet/functions/length.rb +44 -0
  255. data/lib/puppet/functions/lest.rb +55 -0
  256. data/lib/puppet/functions/lookup.rb +224 -0
  257. data/lib/puppet/functions/lstrip.rb +58 -0
  258. data/lib/puppet/functions/map.rb +135 -0
  259. data/lib/puppet/functions/match.rb +130 -0
  260. data/lib/puppet/functions/max.rb +183 -0
  261. data/lib/puppet/functions/min.rb +182 -0
  262. data/lib/puppet/functions/module_directory.rb +41 -0
  263. data/lib/puppet/functions/new.rb +1011 -0
  264. data/lib/puppet/functions/next.rb +33 -0
  265. data/lib/puppet/functions/notice.rb +14 -0
  266. data/lib/puppet/functions/partition.rb +62 -0
  267. data/lib/puppet/functions/reduce.rb +162 -0
  268. data/lib/puppet/functions/regsubst.rb +101 -0
  269. data/lib/puppet/functions/require.rb +77 -0
  270. data/lib/puppet/functions/return.rb +15 -0
  271. data/lib/puppet/functions/reverse_each.rb +94 -0
  272. data/lib/puppet/functions/round.rb +24 -0
  273. data/lib/puppet/functions/rstrip.rb +58 -0
  274. data/lib/puppet/functions/scanf.rb +44 -0
  275. data/lib/puppet/functions/size.rb +15 -0
  276. data/lib/puppet/functions/slice.rb +124 -0
  277. data/lib/puppet/functions/sort.rb +74 -0
  278. data/lib/puppet/functions/split.rb +76 -0
  279. data/lib/puppet/functions/step.rb +98 -0
  280. data/lib/puppet/functions/strftime.rb +212 -0
  281. data/lib/puppet/functions/strip.rb +58 -0
  282. data/lib/puppet/functions/then.rb +77 -0
  283. data/lib/puppet/functions/tree_each.rb +197 -0
  284. data/lib/puppet/functions/type.rb +72 -0
  285. data/lib/puppet/functions/unique.rb +132 -0
  286. data/lib/puppet/functions/unwrap.rb +59 -0
  287. data/lib/puppet/functions/upcase.rb +89 -0
  288. data/lib/puppet/functions/values.rb +25 -0
  289. data/lib/puppet/functions/versioncmp.rb +40 -0
  290. data/lib/puppet/functions/warning.rb +14 -0
  291. data/lib/puppet/functions/with.rb +32 -0
  292. data/lib/puppet/functions/yaml_data.rb +45 -0
  293. data/lib/puppet/functions.rb +862 -0
  294. data/lib/puppet/generate/models/type/property.rb +70 -0
  295. data/lib/puppet/generate/models/type/type.rb +65 -0
  296. data/lib/puppet/generate/templates/type/pcore.erb +42 -0
  297. data/lib/puppet/generate/type.rb +249 -0
  298. data/lib/puppet/gettext/config.rb +275 -0
  299. data/lib/puppet/gettext/module_translations.rb +42 -0
  300. data/lib/puppet/gettext/stubs.rb +11 -0
  301. data/lib/puppet/graph/key.rb +26 -0
  302. data/lib/puppet/graph/prioritizer.rb +29 -0
  303. data/lib/puppet/graph/rb_tree_map.rb +388 -0
  304. data/lib/puppet/graph/relationship_graph.rb +284 -0
  305. data/lib/puppet/graph/sequential_prioritizer.rb +31 -0
  306. data/lib/puppet/graph/simple_graph.rb +546 -0
  307. data/lib/puppet/graph.rb +9 -0
  308. data/lib/puppet/http/client.rb +525 -0
  309. data/lib/puppet/http/dns.rb +159 -0
  310. data/lib/puppet/http/errors.rb +48 -0
  311. data/lib/puppet/http/external_client.rb +88 -0
  312. data/lib/puppet/http/factory.rb +51 -0
  313. data/lib/puppet/http/pool.rb +172 -0
  314. data/lib/puppet/http/pool_entry.rb +17 -0
  315. data/lib/puppet/http/proxy.rb +137 -0
  316. data/lib/puppet/http/redirector.rb +85 -0
  317. data/lib/puppet/http/resolver/server_list.rb +87 -0
  318. data/lib/puppet/http/resolver/settings.rb +23 -0
  319. data/lib/puppet/http/resolver/srv.rb +41 -0
  320. data/lib/puppet/http/resolver.rb +48 -0
  321. data/lib/puppet/http/response.rb +102 -0
  322. data/lib/puppet/http/response_converter.rb +24 -0
  323. data/lib/puppet/http/response_net_http.rb +42 -0
  324. data/lib/puppet/http/retry_after_handler.rb +77 -0
  325. data/lib/puppet/http/service/ca.rb +101 -0
  326. data/lib/puppet/http/service/compiler.rb +353 -0
  327. data/lib/puppet/http/service/file_server.rb +198 -0
  328. data/lib/puppet/http/service/puppetserver.rb +53 -0
  329. data/lib/puppet/http/service/report.rb +64 -0
  330. data/lib/puppet/http/service.rb +182 -0
  331. data/lib/puppet/http/session.rb +122 -0
  332. data/lib/puppet/http/site.rb +42 -0
  333. data/lib/puppet/http.rb +46 -0
  334. data/lib/puppet/indirector/catalog/compiler.rb +431 -0
  335. data/lib/puppet/indirector/catalog/json.rb +40 -0
  336. data/lib/puppet/indirector/catalog/msgpack.rb +6 -0
  337. data/lib/puppet/indirector/catalog/rest.rb +49 -0
  338. data/lib/puppet/indirector/catalog/store_configs.rb +8 -0
  339. data/lib/puppet/indirector/catalog/yaml.rb +6 -0
  340. data/lib/puppet/indirector/code.rb +6 -0
  341. data/lib/puppet/indirector/data_binding/hiera.rb +7 -0
  342. data/lib/puppet/indirector/data_binding/none.rb +8 -0
  343. data/lib/puppet/indirector/direct_file_server.rb +17 -0
  344. data/lib/puppet/indirector/envelope.rb +11 -0
  345. data/lib/puppet/indirector/errors.rb +5 -0
  346. data/lib/puppet/indirector/exec.rb +38 -0
  347. data/lib/puppet/indirector/face.rb +153 -0
  348. data/lib/puppet/indirector/fact_search.rb +60 -0
  349. data/lib/puppet/indirector/facts/facter.rb +117 -0
  350. data/lib/puppet/indirector/facts/json.rb +27 -0
  351. data/lib/puppet/indirector/facts/memory.rb +9 -0
  352. data/lib/puppet/indirector/facts/network_device.rb +27 -0
  353. data/lib/puppet/indirector/facts/rest.rb +44 -0
  354. data/lib/puppet/indirector/facts/store_configs.rb +11 -0
  355. data/lib/puppet/indirector/facts/yaml.rb +29 -0
  356. data/lib/puppet/indirector/file_bucket_file/file.rb +262 -0
  357. data/lib/puppet/indirector/file_bucket_file/rest.rb +50 -0
  358. data/lib/puppet/indirector/file_bucket_file/selector.rb +53 -0
  359. data/lib/puppet/indirector/file_content/file.rb +7 -0
  360. data/lib/puppet/indirector/file_content/file_server.rb +7 -0
  361. data/lib/puppet/indirector/file_content/rest.rb +35 -0
  362. data/lib/puppet/indirector/file_content/selector.rb +30 -0
  363. data/lib/puppet/indirector/file_content.rb +5 -0
  364. data/lib/puppet/indirector/file_metadata/file.rb +7 -0
  365. data/lib/puppet/indirector/file_metadata/file_server.rb +7 -0
  366. data/lib/puppet/indirector/file_metadata/http.rb +47 -0
  367. data/lib/puppet/indirector/file_metadata/rest.rb +56 -0
  368. data/lib/puppet/indirector/file_metadata/selector.rb +30 -0
  369. data/lib/puppet/indirector/file_metadata.rb +5 -0
  370. data/lib/puppet/indirector/file_server.rb +54 -0
  371. data/lib/puppet/indirector/generic_http.rb +5 -0
  372. data/lib/puppet/indirector/hiera.rb +100 -0
  373. data/lib/puppet/indirector/indirection.rb +372 -0
  374. data/lib/puppet/indirector/json.rb +79 -0
  375. data/lib/puppet/indirector/memory.rb +34 -0
  376. data/lib/puppet/indirector/msgpack.rb +83 -0
  377. data/lib/puppet/indirector/node/exec.rb +70 -0
  378. data/lib/puppet/indirector/node/json.rb +8 -0
  379. data/lib/puppet/indirector/node/memory.rb +10 -0
  380. data/lib/puppet/indirector/node/msgpack.rb +7 -0
  381. data/lib/puppet/indirector/node/plain.rb +21 -0
  382. data/lib/puppet/indirector/node/rest.rb +29 -0
  383. data/lib/puppet/indirector/node/store_configs.rb +8 -0
  384. data/lib/puppet/indirector/node/yaml.rb +7 -0
  385. data/lib/puppet/indirector/none.rb +9 -0
  386. data/lib/puppet/indirector/plain.rb +9 -0
  387. data/lib/puppet/indirector/report/json.rb +34 -0
  388. data/lib/puppet/indirector/report/msgpack.rb +11 -0
  389. data/lib/puppet/indirector/report/processor.rb +60 -0
  390. data/lib/puppet/indirector/report/rest.rb +42 -0
  391. data/lib/puppet/indirector/report/yaml.rb +34 -0
  392. data/lib/puppet/indirector/request.rb +194 -0
  393. data/lib/puppet/indirector/resource/ral.rb +66 -0
  394. data/lib/puppet/indirector/resource/store_configs.rb +12 -0
  395. data/lib/puppet/indirector/resource/validator.rb +8 -0
  396. data/lib/puppet/indirector/rest.rb +64 -0
  397. data/lib/puppet/indirector/store_configs.rb +30 -0
  398. data/lib/puppet/indirector/terminus.rb +176 -0
  399. data/lib/puppet/indirector/yaml.rb +63 -0
  400. data/lib/puppet/indirector.rb +61 -0
  401. data/lib/puppet/info_service/class_information_service.rb +109 -0
  402. data/lib/puppet/info_service/plan_information_service.rb +36 -0
  403. data/lib/puppet/info_service/task_information_service.rb +44 -0
  404. data/lib/puppet/info_service.rb +26 -0
  405. data/lib/puppet/interface/action.rb +406 -0
  406. data/lib/puppet/interface/action_builder.rb +161 -0
  407. data/lib/puppet/interface/action_manager.rb +98 -0
  408. data/lib/puppet/interface/documentation.rb +357 -0
  409. data/lib/puppet/interface/face_collection.rb +137 -0
  410. data/lib/puppet/interface/option.rb +172 -0
  411. data/lib/puppet/interface/option_builder.rb +105 -0
  412. data/lib/puppet/interface/option_manager.rb +106 -0
  413. data/lib/puppet/interface.rb +239 -0
  414. data/lib/puppet/loaders.rb +30 -0
  415. data/lib/puppet/metatype/manager.rb +197 -0
  416. data/lib/puppet/module/plan.rb +159 -0
  417. data/lib/puppet/module/task.rb +283 -0
  418. data/lib/puppet/module.rb +475 -0
  419. data/lib/puppet/module_tool/applications/application.rb +91 -0
  420. data/lib/puppet/module_tool/applications/checksummer.rb +62 -0
  421. data/lib/puppet/module_tool/applications/installer.rb +411 -0
  422. data/lib/puppet/module_tool/applications/uninstaller.rb +119 -0
  423. data/lib/puppet/module_tool/applications/unpacker.rb +100 -0
  424. data/lib/puppet/module_tool/applications/upgrader.rb +282 -0
  425. data/lib/puppet/module_tool/applications.rb +12 -0
  426. data/lib/puppet/module_tool/checksums.rb +49 -0
  427. data/lib/puppet/module_tool/contents_description.rb +89 -0
  428. data/lib/puppet/module_tool/dependency.rb +41 -0
  429. data/lib/puppet/module_tool/errors/base.rb +15 -0
  430. data/lib/puppet/module_tool/errors/installer.rb +93 -0
  431. data/lib/puppet/module_tool/errors/shared.rb +227 -0
  432. data/lib/puppet/module_tool/errors/uninstaller.rb +50 -0
  433. data/lib/puppet/module_tool/errors/upgrader.rb +63 -0
  434. data/lib/puppet/module_tool/errors.rb +11 -0
  435. data/lib/puppet/module_tool/install_directory.rb +45 -0
  436. data/lib/puppet/module_tool/installed_modules.rb +96 -0
  437. data/lib/puppet/module_tool/local_tarball.rb +90 -0
  438. data/lib/puppet/module_tool/metadata.rb +221 -0
  439. data/lib/puppet/module_tool/shared_behaviors.rb +181 -0
  440. data/lib/puppet/module_tool/tar/gnu.rb +19 -0
  441. data/lib/puppet/module_tool/tar/mini.rb +116 -0
  442. data/lib/puppet/module_tool/tar.rb +18 -0
  443. data/lib/puppet/module_tool.rb +194 -0
  444. data/lib/puppet/network/authconfig.rb +7 -0
  445. data/lib/puppet/network/authorization.rb +19 -0
  446. data/lib/puppet/network/client_request.rb +29 -0
  447. data/lib/puppet/network/format.rb +110 -0
  448. data/lib/puppet/network/format_handler.rb +108 -0
  449. data/lib/puppet/network/format_support.rb +139 -0
  450. data/lib/puppet/network/formats.rb +329 -0
  451. data/lib/puppet/network/http/api/indirected_routes.rb +277 -0
  452. data/lib/puppet/network/http/api/indirection_type.rb +32 -0
  453. data/lib/puppet/network/http/api/master/v3/environments.rb +3 -0
  454. data/lib/puppet/network/http/api/master/v3.rb +3 -0
  455. data/lib/puppet/network/http/api/master.rb +3 -0
  456. data/lib/puppet/network/http/api/server/v3/environments.rb +48 -0
  457. data/lib/puppet/network/http/api/server/v3.rb +39 -0
  458. data/lib/puppet/network/http/api/server.rb +10 -0
  459. data/lib/puppet/network/http/api.rb +39 -0
  460. data/lib/puppet/network/http/connection.rb +286 -0
  461. data/lib/puppet/network/http/error.rb +73 -0
  462. data/lib/puppet/network/http/handler.rb +215 -0
  463. data/lib/puppet/network/http/issues.rb +12 -0
  464. data/lib/puppet/network/http/memory_response.rb +13 -0
  465. data/lib/puppet/network/http/request.rb +71 -0
  466. data/lib/puppet/network/http/response.rb +23 -0
  467. data/lib/puppet/network/http/route.rb +101 -0
  468. data/lib/puppet/network/http.rb +28 -0
  469. data/lib/puppet/network/http_pool.rb +77 -0
  470. data/lib/puppet/network/uri.rb +18 -0
  471. data/lib/puppet/network.rb +3 -0
  472. data/lib/puppet/node/environment.rb +635 -0
  473. data/lib/puppet/node/facts.rb +165 -0
  474. data/lib/puppet/node/server_facts.rb +46 -0
  475. data/lib/puppet/node.rb +256 -0
  476. data/lib/puppet/pal/catalog_compiler.rb +108 -0
  477. data/lib/puppet/pal/compiler.rb +222 -0
  478. data/lib/puppet/pal/function_signature.rb +52 -0
  479. data/lib/puppet/pal/json_catalog_encoder.rb +71 -0
  480. data/lib/puppet/pal/pal_api.rb +15 -0
  481. data/lib/puppet/pal/pal_impl.rb +590 -0
  482. data/lib/puppet/pal/plan_signature.rb +71 -0
  483. data/lib/puppet/pal/script_compiler.rb +73 -0
  484. data/lib/puppet/pal/task_signature.rb +58 -0
  485. data/lib/puppet/parameter/boolean.rb +15 -0
  486. data/lib/puppet/parameter/package_options.rb +31 -0
  487. data/lib/puppet/parameter/path.rb +57 -0
  488. data/lib/puppet/parameter/value.rb +91 -0
  489. data/lib/puppet/parameter/value_collection.rb +212 -0
  490. data/lib/puppet/parameter.rb +589 -0
  491. data/lib/puppet/parser/abstract_compiler.rb +36 -0
  492. data/lib/puppet/parser/ast/block_expression.rb +15 -0
  493. data/lib/puppet/parser/ast/branch.rb +19 -0
  494. data/lib/puppet/parser/ast/hostclass.rb +27 -0
  495. data/lib/puppet/parser/ast/leaf.rb +81 -0
  496. data/lib/puppet/parser/ast/node.rb +17 -0
  497. data/lib/puppet/parser/ast/pops_bridge.rb +245 -0
  498. data/lib/puppet/parser/ast/resource.rb +66 -0
  499. data/lib/puppet/parser/ast/resource_instance.rb +10 -0
  500. data/lib/puppet/parser/ast/resourceparam.rb +31 -0
  501. data/lib/puppet/parser/ast/top_level_construct.rb +4 -0
  502. data/lib/puppet/parser/ast.rb +61 -0
  503. data/lib/puppet/parser/catalog_compiler.rb +56 -0
  504. data/lib/puppet/parser/compiler/catalog_validator/relationship_validator.rb +39 -0
  505. data/lib/puppet/parser/compiler/catalog_validator.rb +33 -0
  506. data/lib/puppet/parser/compiler.rb +615 -0
  507. data/lib/puppet/parser/e4_parser_adapter.rb +60 -0
  508. data/lib/puppet/parser/files.rb +93 -0
  509. data/lib/puppet/parser/functions/assert_type.rb +60 -0
  510. data/lib/puppet/parser/functions/binary_file.rb +24 -0
  511. data/lib/puppet/parser/functions/break.rb +39 -0
  512. data/lib/puppet/parser/functions/contain.rb +30 -0
  513. data/lib/puppet/parser/functions/create_resources.rb +110 -0
  514. data/lib/puppet/parser/functions/defined.rb +107 -0
  515. data/lib/puppet/parser/functions/dig.rb +38 -0
  516. data/lib/puppet/parser/functions/digest.rb +5 -0
  517. data/lib/puppet/parser/functions/each.rb +104 -0
  518. data/lib/puppet/parser/functions/epp.rb +39 -0
  519. data/lib/puppet/parser/functions/fail.rb +11 -0
  520. data/lib/puppet/parser/functions/file.rb +33 -0
  521. data/lib/puppet/parser/functions/filter.rb +79 -0
  522. data/lib/puppet/parser/functions/find_file.rb +28 -0
  523. data/lib/puppet/parser/functions/fqdn_rand.rb +44 -0
  524. data/lib/puppet/parser/functions/generate.rb +37 -0
  525. data/lib/puppet/parser/functions/hiera.rb +103 -0
  526. data/lib/puppet/parser/functions/hiera_array.rb +92 -0
  527. data/lib/puppet/parser/functions/hiera_hash.rb +102 -0
  528. data/lib/puppet/parser/functions/hiera_include.rb +101 -0
  529. data/lib/puppet/parser/functions/include.rb +34 -0
  530. data/lib/puppet/parser/functions/inline_epp.rb +51 -0
  531. data/lib/puppet/parser/functions/inline_template.rb +26 -0
  532. data/lib/puppet/parser/functions/lest.rb +49 -0
  533. data/lib/puppet/parser/functions/lookup.rb +132 -0
  534. data/lib/puppet/parser/functions/map.rb +76 -0
  535. data/lib/puppet/parser/functions/match.rb +43 -0
  536. data/lib/puppet/parser/functions/md5.rb +5 -0
  537. data/lib/puppet/parser/functions/new.rb +991 -0
  538. data/lib/puppet/parser/functions/next.rb +38 -0
  539. data/lib/puppet/parser/functions/realize.rb +20 -0
  540. data/lib/puppet/parser/functions/reduce.rb +137 -0
  541. data/lib/puppet/parser/functions/regsubst.rb +62 -0
  542. data/lib/puppet/parser/functions/require.rb +40 -0
  543. data/lib/puppet/parser/functions/return.rb +92 -0
  544. data/lib/puppet/parser/functions/reverse_each.rb +83 -0
  545. data/lib/puppet/parser/functions/scanf.rb +38 -0
  546. data/lib/puppet/parser/functions/sha1.rb +5 -0
  547. data/lib/puppet/parser/functions/sha256.rb +5 -0
  548. data/lib/puppet/parser/functions/shellquote.rb +61 -0
  549. data/lib/puppet/parser/functions/slice.rb +39 -0
  550. data/lib/puppet/parser/functions/split.rb +28 -0
  551. data/lib/puppet/parser/functions/sprintf.rb +61 -0
  552. data/lib/puppet/parser/functions/step.rb +84 -0
  553. data/lib/puppet/parser/functions/strftime.rb +185 -0
  554. data/lib/puppet/parser/functions/tag.rb +12 -0
  555. data/lib/puppet/parser/functions/tagged.rb +21 -0
  556. data/lib/puppet/parser/functions/template.rb +39 -0
  557. data/lib/puppet/parser/functions/then.rb +73 -0
  558. data/lib/puppet/parser/functions/type.rb +53 -0
  559. data/lib/puppet/parser/functions/versioncmp.rb +30 -0
  560. data/lib/puppet/parser/functions/with.rb +28 -0
  561. data/lib/puppet/parser/functions.rb +321 -0
  562. data/lib/puppet/parser/parser_factory.rb +30 -0
  563. data/lib/puppet/parser/relationship.rb +84 -0
  564. data/lib/puppet/parser/resource/param.rb +35 -0
  565. data/lib/puppet/parser/resource.rb +351 -0
  566. data/lib/puppet/parser/scope.rb +1127 -0
  567. data/lib/puppet/parser/script_compiler.rb +123 -0
  568. data/lib/puppet/parser/templatewrapper.rb +104 -0
  569. data/lib/puppet/parser/type_loader.rb +150 -0
  570. data/lib/puppet/parser.rb +20 -0
  571. data/lib/puppet/plugins/configuration.rb +29 -0
  572. data/lib/puppet/plugins/syntax_checkers.rb +98 -0
  573. data/lib/puppet/plugins.rb +9 -0
  574. data/lib/puppet/pops/adaptable.rb +197 -0
  575. data/lib/puppet/pops/adapters.rb +156 -0
  576. data/lib/puppet/pops/evaluator/access_operator.rb +719 -0
  577. data/lib/puppet/pops/evaluator/callable_signature.rb +107 -0
  578. data/lib/puppet/pops/evaluator/closure.rb +375 -0
  579. data/lib/puppet/pops/evaluator/collector_transformer.rb +234 -0
  580. data/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +86 -0
  581. data/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +29 -0
  582. data/lib/puppet/pops/evaluator/collectors/exported_collector.rb +70 -0
  583. data/lib/puppet/pops/evaluator/collectors/fixed_set_collector.rb +38 -0
  584. data/lib/puppet/pops/evaluator/compare_operator.rb +254 -0
  585. data/lib/puppet/pops/evaluator/deferred_resolver.rb +225 -0
  586. data/lib/puppet/pops/evaluator/epp_evaluator.rb +120 -0
  587. data/lib/puppet/pops/evaluator/evaluator_impl.rb +1317 -0
  588. data/lib/puppet/pops/evaluator/external_syntax_support.rb +46 -0
  589. data/lib/puppet/pops/evaluator/json_strict_literal_evaluator.rb +82 -0
  590. data/lib/puppet/pops/evaluator/literal_evaluator.rb +100 -0
  591. data/lib/puppet/pops/evaluator/puppet_proc.rb +69 -0
  592. data/lib/puppet/pops/evaluator/relationship_operator.rb +185 -0
  593. data/lib/puppet/pops/evaluator/runtime3_converter.rb +221 -0
  594. data/lib/puppet/pops/evaluator/runtime3_resource_support.rb +119 -0
  595. data/lib/puppet/pops/evaluator/runtime3_support.rb +535 -0
  596. data/lib/puppet/pops/functions/dispatch.rb +107 -0
  597. data/lib/puppet/pops/functions/dispatcher.rb +75 -0
  598. data/lib/puppet/pops/functions/function.rb +139 -0
  599. data/lib/puppet/pops/issue_reporter.rb +137 -0
  600. data/lib/puppet/pops/issues.rb +928 -0
  601. data/lib/puppet/pops/label_provider.rb +90 -0
  602. data/lib/puppet/pops/loader/base_loader.rb +178 -0
  603. data/lib/puppet/pops/loader/dependency_loader.rb +91 -0
  604. data/lib/puppet/pops/loader/gem_support.rb +51 -0
  605. data/lib/puppet/pops/loader/generic_plan_instantiator.rb +28 -0
  606. data/lib/puppet/pops/loader/loader.rb +221 -0
  607. data/lib/puppet/pops/loader/loader_paths.rb +412 -0
  608. data/lib/puppet/pops/loader/module_loaders.rb +556 -0
  609. data/lib/puppet/pops/loader/predefined_loader.rb +28 -0
  610. data/lib/puppet/pops/loader/puppet_function_instantiator.rb +84 -0
  611. data/lib/puppet/pops/loader/puppet_plan_instantiator.rb +93 -0
  612. data/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +79 -0
  613. data/lib/puppet/pops/loader/ruby_data_type_instantiator.rb +39 -0
  614. data/lib/puppet/pops/loader/ruby_function_instantiator.rb +45 -0
  615. data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +120 -0
  616. data/lib/puppet/pops/loader/runtime3_type_loader.rb +103 -0
  617. data/lib/puppet/pops/loader/simple_environment_loader.rb +20 -0
  618. data/lib/puppet/pops/loader/static_loader.rb +131 -0
  619. data/lib/puppet/pops/loader/task_instantiator.rb +44 -0
  620. data/lib/puppet/pops/loader/type_definition_instantiator.rb +100 -0
  621. data/lib/puppet/pops/loader/typed_name.rb +54 -0
  622. data/lib/puppet/pops/loader/uri_helper.rb +22 -0
  623. data/lib/puppet/pops/loaders.rb +546 -0
  624. data/lib/puppet/pops/lookup/configured_data_provider.rb +93 -0
  625. data/lib/puppet/pops/lookup/context.rb +199 -0
  626. data/lib/puppet/pops/lookup/data_adapter.rb +27 -0
  627. data/lib/puppet/pops/lookup/data_dig_function_provider.rb +145 -0
  628. data/lib/puppet/pops/lookup/data_hash_function_provider.rb +126 -0
  629. data/lib/puppet/pops/lookup/data_provider.rb +92 -0
  630. data/lib/puppet/pops/lookup/environment_data_provider.rb +35 -0
  631. data/lib/puppet/pops/lookup/explainer.rb +595 -0
  632. data/lib/puppet/pops/lookup/function_provider.rb +110 -0
  633. data/lib/puppet/pops/lookup/global_data_provider.rb +75 -0
  634. data/lib/puppet/pops/lookup/hiera_config.rb +775 -0
  635. data/lib/puppet/pops/lookup/interpolation.rb +155 -0
  636. data/lib/puppet/pops/lookup/invocation.rb +268 -0
  637. data/lib/puppet/pops/lookup/key_recorder.rb +18 -0
  638. data/lib/puppet/pops/lookup/location_resolver.rb +99 -0
  639. data/lib/puppet/pops/lookup/lookup_adapter.rb +528 -0
  640. data/lib/puppet/pops/lookup/lookup_key.rb +99 -0
  641. data/lib/puppet/pops/lookup/lookup_key_function_provider.rb +92 -0
  642. data/lib/puppet/pops/lookup/module_data_provider.rb +89 -0
  643. data/lib/puppet/pops/lookup/sub_lookup.rb +92 -0
  644. data/lib/puppet/pops/lookup.rb +97 -0
  645. data/lib/puppet/pops/merge_strategy.rb +441 -0
  646. data/lib/puppet/pops/migration/migration_checker.rb +58 -0
  647. data/lib/puppet/pops/model/ast.pp +669 -0
  648. data/lib/puppet/pops/model/ast.rb +4675 -0
  649. data/lib/puppet/pops/model/ast_transformer.rb +131 -0
  650. data/lib/puppet/pops/model/factory.rb +1155 -0
  651. data/lib/puppet/pops/model/model_label_provider.rb +134 -0
  652. data/lib/puppet/pops/model/model_tree_dumper.rb +445 -0
  653. data/lib/puppet/pops/model/pn_transformer.rb +385 -0
  654. data/lib/puppet/pops/model/tree_dumper.rb +59 -0
  655. data/lib/puppet/pops/parser/code_merger.rb +29 -0
  656. data/lib/puppet/pops/parser/egrammar.ra +889 -0
  657. data/lib/puppet/pops/parser/eparser.rb +3184 -0
  658. data/lib/puppet/pops/parser/epp_parser.rb +51 -0
  659. data/lib/puppet/pops/parser/epp_support.rb +265 -0
  660. data/lib/puppet/pops/parser/evaluating_parser.rb +162 -0
  661. data/lib/puppet/pops/parser/heredoc_support.rb +153 -0
  662. data/lib/puppet/pops/parser/interpolation_support.rb +249 -0
  663. data/lib/puppet/pops/parser/lexer2.rb +777 -0
  664. data/lib/puppet/pops/parser/lexer_support.rb +221 -0
  665. data/lib/puppet/pops/parser/locatable.rb +23 -0
  666. data/lib/puppet/pops/parser/locator.rb +357 -0
  667. data/lib/puppet/pops/parser/parser_support.rb +251 -0
  668. data/lib/puppet/pops/parser/pn_parser.rb +317 -0
  669. data/lib/puppet/pops/parser/slurp_support.rb +118 -0
  670. data/lib/puppet/pops/patterns.rb +60 -0
  671. data/lib/puppet/pops/pcore.rb +135 -0
  672. data/lib/puppet/pops/pn.rb +236 -0
  673. data/lib/puppet/pops/puppet_stack.rb +61 -0
  674. data/lib/puppet/pops/resource/param.rb +55 -0
  675. data/lib/puppet/pops/resource/resource_type_impl.rb +294 -0
  676. data/lib/puppet/pops/resource/resource_type_set.pcore +22 -0
  677. data/lib/puppet/pops/semantic_error.rb +29 -0
  678. data/lib/puppet/pops/serialization/abstract_reader.rb +180 -0
  679. data/lib/puppet/pops/serialization/abstract_writer.rb +222 -0
  680. data/lib/puppet/pops/serialization/deserializer.rb +80 -0
  681. data/lib/puppet/pops/serialization/extension.rb +158 -0
  682. data/lib/puppet/pops/serialization/from_data_converter.rb +224 -0
  683. data/lib/puppet/pops/serialization/instance_reader.rb +19 -0
  684. data/lib/puppet/pops/serialization/instance_writer.rb +14 -0
  685. data/lib/puppet/pops/serialization/json.rb +297 -0
  686. data/lib/puppet/pops/serialization/json_path.rb +127 -0
  687. data/lib/puppet/pops/serialization/object.rb +70 -0
  688. data/lib/puppet/pops/serialization/serializer.rb +140 -0
  689. data/lib/puppet/pops/serialization/time_factory.rb +67 -0
  690. data/lib/puppet/pops/serialization/to_data_converter.rb +313 -0
  691. data/lib/puppet/pops/serialization/to_stringified_converter.rb +226 -0
  692. data/lib/puppet/pops/serialization.rb +43 -0
  693. data/lib/puppet/pops/time/timespan.rb +716 -0
  694. data/lib/puppet/pops/time/timestamp.rb +160 -0
  695. data/lib/puppet/pops/types/annotatable.rb +36 -0
  696. data/lib/puppet/pops/types/annotation.rb +71 -0
  697. data/lib/puppet/pops/types/class_loader.rb +132 -0
  698. data/lib/puppet/pops/types/implementation_registry.rb +134 -0
  699. data/lib/puppet/pops/types/iterable.rb +365 -0
  700. data/lib/puppet/pops/types/p_binary_type.rb +232 -0
  701. data/lib/puppet/pops/types/p_init_type.rb +238 -0
  702. data/lib/puppet/pops/types/p_meta_type.rb +94 -0
  703. data/lib/puppet/pops/types/p_object_type.rb +1117 -0
  704. data/lib/puppet/pops/types/p_object_type_extension.rb +228 -0
  705. data/lib/puppet/pops/types/p_runtime_type.rb +115 -0
  706. data/lib/puppet/pops/types/p_sem_ver_range_type.rb +190 -0
  707. data/lib/puppet/pops/types/p_sem_ver_type.rb +155 -0
  708. data/lib/puppet/pops/types/p_sensitive_type.rb +83 -0
  709. data/lib/puppet/pops/types/p_timespan_type.rb +192 -0
  710. data/lib/puppet/pops/types/p_timestamp_type.rb +73 -0
  711. data/lib/puppet/pops/types/p_type_set_type.rb +387 -0
  712. data/lib/puppet/pops/types/p_uri_type.rb +190 -0
  713. data/lib/puppet/pops/types/puppet_object.rb +40 -0
  714. data/lib/puppet/pops/types/recursion_guard.rb +136 -0
  715. data/lib/puppet/pops/types/ruby_generator.rb +472 -0
  716. data/lib/puppet/pops/types/ruby_method.rb +31 -0
  717. data/lib/puppet/pops/types/string_converter.rb +1134 -0
  718. data/lib/puppet/pops/types/tree_iterators.rb +254 -0
  719. data/lib/puppet/pops/types/type_acceptor.rb +25 -0
  720. data/lib/puppet/pops/types/type_asserter.rb +47 -0
  721. data/lib/puppet/pops/types/type_assertion_error.rb +27 -0
  722. data/lib/puppet/pops/types/type_calculator.rb +822 -0
  723. data/lib/puppet/pops/types/type_conversion_error.rb +15 -0
  724. data/lib/puppet/pops/types/type_factory.rb +631 -0
  725. data/lib/puppet/pops/types/type_formatter.rb +801 -0
  726. data/lib/puppet/pops/types/type_mismatch_describer.rb +1096 -0
  727. data/lib/puppet/pops/types/type_parser.rb +683 -0
  728. data/lib/puppet/pops/types/type_set_reference.rb +59 -0
  729. data/lib/puppet/pops/types/type_with_members.rb +43 -0
  730. data/lib/puppet/pops/types/types.rb +3633 -0
  731. data/lib/puppet/pops/utils.rb +119 -0
  732. data/lib/puppet/pops/validation/checker4_0.rb +1148 -0
  733. data/lib/puppet/pops/validation/tasks_checker.rb +93 -0
  734. data/lib/puppet/pops/validation/validator_factory_4_0.rb +45 -0
  735. data/lib/puppet/pops/validation.rb +459 -0
  736. data/lib/puppet/pops/visitable.rb +6 -0
  737. data/lib/puppet/pops/visitor.rb +122 -0
  738. data/lib/puppet/pops.rb +121 -0
  739. data/lib/puppet/property/boolean.rb +7 -0
  740. data/lib/puppet/property/ensure.rb +106 -0
  741. data/lib/puppet/property/keyvalue.rb +158 -0
  742. data/lib/puppet/property/list.rb +70 -0
  743. data/lib/puppet/property/ordered_list.rb +29 -0
  744. data/lib/puppet/property.rb +611 -0
  745. data/lib/puppet/provider/aix_object.rb +485 -0
  746. data/lib/puppet/provider/command.rb +25 -0
  747. data/lib/puppet/provider/confine.rb +6 -0
  748. data/lib/puppet/provider/exec/posix.rb +60 -0
  749. data/lib/puppet/provider/exec/shell.rb +25 -0
  750. data/lib/puppet/provider/exec/windows.rb +55 -0
  751. data/lib/puppet/provider/exec.rb +105 -0
  752. data/lib/puppet/provider/file/posix.rb +144 -0
  753. data/lib/puppet/provider/file/windows.rb +152 -0
  754. data/lib/puppet/provider/group/aix.rb +99 -0
  755. data/lib/puppet/provider/group/directoryservice.rb +22 -0
  756. data/lib/puppet/provider/group/groupadd.rb +174 -0
  757. data/lib/puppet/provider/group/ldap.rb +48 -0
  758. data/lib/puppet/provider/group/pw.rb +51 -0
  759. data/lib/puppet/provider/group/windows_adsi.rb +113 -0
  760. data/lib/puppet/provider/ldap.rb +141 -0
  761. data/lib/puppet/provider/nameservice/directoryservice.rb +512 -0
  762. data/lib/puppet/provider/nameservice/objectadd.rb +22 -0
  763. data/lib/puppet/provider/nameservice/pw.rb +21 -0
  764. data/lib/puppet/provider/nameservice.rb +293 -0
  765. data/lib/puppet/provider/network_device.rb +74 -0
  766. data/lib/puppet/provider/package/aix.rb +169 -0
  767. data/lib/puppet/provider/package/appdmg.rb +111 -0
  768. data/lib/puppet/provider/package/apple.rb +47 -0
  769. data/lib/puppet/provider/package/apt.rb +262 -0
  770. data/lib/puppet/provider/package/aptitude.rb +35 -0
  771. data/lib/puppet/provider/package/aptrpm.rb +83 -0
  772. data/lib/puppet/provider/package/blastwave.rb +112 -0
  773. data/lib/puppet/provider/package/dnf.rb +50 -0
  774. data/lib/puppet/provider/package/dnfmodule.rb +141 -0
  775. data/lib/puppet/provider/package/dpkg.rb +192 -0
  776. data/lib/puppet/provider/package/fink.rb +97 -0
  777. data/lib/puppet/provider/package/freebsd.rb +47 -0
  778. data/lib/puppet/provider/package/gem.rb +293 -0
  779. data/lib/puppet/provider/package/hpux.rb +44 -0
  780. data/lib/puppet/provider/package/macports.rb +110 -0
  781. data/lib/puppet/provider/package/nim.rb +291 -0
  782. data/lib/puppet/provider/package/openbsd.rb +260 -0
  783. data/lib/puppet/provider/package/opkg.rb +82 -0
  784. data/lib/puppet/provider/package/pacman.rb +273 -0
  785. data/lib/puppet/provider/package/pip.rb +346 -0
  786. data/lib/puppet/provider/package/pip2.rb +17 -0
  787. data/lib/puppet/provider/package/pip3.rb +17 -0
  788. data/lib/puppet/provider/package/pkg.rb +295 -0
  789. data/lib/puppet/provider/package/pkgdmg.rb +153 -0
  790. data/lib/puppet/provider/package/pkgin.rb +87 -0
  791. data/lib/puppet/provider/package/pkgng.rb +173 -0
  792. data/lib/puppet/provider/package/pkgutil.rb +187 -0
  793. data/lib/puppet/provider/package/portage.rb +310 -0
  794. data/lib/puppet/provider/package/ports.rb +91 -0
  795. data/lib/puppet/provider/package/portupgrade.rb +240 -0
  796. data/lib/puppet/provider/package/puppet_gem.rb +34 -0
  797. data/lib/puppet/provider/package/puppetserver_gem.rb +171 -0
  798. data/lib/puppet/provider/package/rpm.rb +250 -0
  799. data/lib/puppet/provider/package/rug.rb +51 -0
  800. data/lib/puppet/provider/package/sun.rb +133 -0
  801. data/lib/puppet/provider/package/sunfreeware.rb +9 -0
  802. data/lib/puppet/provider/package/tdnf.rb +28 -0
  803. data/lib/puppet/provider/package/up2date.rb +40 -0
  804. data/lib/puppet/provider/package/urpmi.rb +55 -0
  805. data/lib/puppet/provider/package/windows/exe_package.rb +106 -0
  806. data/lib/puppet/provider/package/windows/msi_package.rb +70 -0
  807. data/lib/puppet/provider/package/windows/package.rb +110 -0
  808. data/lib/puppet/provider/package/windows.rb +130 -0
  809. data/lib/puppet/provider/package/yum.rb +387 -0
  810. data/lib/puppet/provider/package/zypper.rb +206 -0
  811. data/lib/puppet/provider/package.rb +59 -0
  812. data/lib/puppet/provider/package_targetable.rb +69 -0
  813. data/lib/puppet/provider/parsedfile.rb +490 -0
  814. data/lib/puppet/provider/service/base.rb +139 -0
  815. data/lib/puppet/provider/service/bsd.rb +51 -0
  816. data/lib/puppet/provider/service/daemontools.rb +193 -0
  817. data/lib/puppet/provider/service/debian.rb +75 -0
  818. data/lib/puppet/provider/service/freebsd.rb +143 -0
  819. data/lib/puppet/provider/service/gentoo.rb +45 -0
  820. data/lib/puppet/provider/service/init.rb +192 -0
  821. data/lib/puppet/provider/service/launchd.rb +384 -0
  822. data/lib/puppet/provider/service/openbsd.rb +100 -0
  823. data/lib/puppet/provider/service/openrc.rb +71 -0
  824. data/lib/puppet/provider/service/openwrt.rb +36 -0
  825. data/lib/puppet/provider/service/rcng.rb +51 -0
  826. data/lib/puppet/provider/service/redhat.rb +72 -0
  827. data/lib/puppet/provider/service/runit.rb +106 -0
  828. data/lib/puppet/provider/service/service.rb +68 -0
  829. data/lib/puppet/provider/service/smf.rb +317 -0
  830. data/lib/puppet/provider/service/src.rb +147 -0
  831. data/lib/puppet/provider/service/systemd.rb +232 -0
  832. data/lib/puppet/provider/service/upstart.rb +385 -0
  833. data/lib/puppet/provider/service/windows.rb +182 -0
  834. data/lib/puppet/provider/user/aix.rb +361 -0
  835. data/lib/puppet/provider/user/directoryservice.rb +680 -0
  836. data/lib/puppet/provider/user/hpux.rb +95 -0
  837. data/lib/puppet/provider/user/ldap.rb +132 -0
  838. data/lib/puppet/provider/user/openbsd.rb +77 -0
  839. data/lib/puppet/provider/user/pw.rb +108 -0
  840. data/lib/puppet/provider/user/user_role_add.rb +239 -0
  841. data/lib/puppet/provider/user/useradd.rb +406 -0
  842. data/lib/puppet/provider/user/windows_adsi.rb +172 -0
  843. data/lib/puppet/provider.rb +612 -0
  844. data/lib/puppet/reference/configuration.rb +97 -0
  845. data/lib/puppet/reference/function.rb +17 -0
  846. data/lib/puppet/reference/indirection.rb +71 -0
  847. data/lib/puppet/reference/metaparameter.rb +33 -0
  848. data/lib/puppet/reference/providers.rb +117 -0
  849. data/lib/puppet/reference/report.rb +20 -0
  850. data/lib/puppet/reference/type.rb +109 -0
  851. data/lib/puppet/relationship.rb +84 -0
  852. data/lib/puppet/reports/http.rb +44 -0
  853. data/lib/puppet/reports/log.rb +14 -0
  854. data/lib/puppet/reports/store.rb +68 -0
  855. data/lib/puppet/reports.rb +93 -0
  856. data/lib/puppet/resource/catalog.rb +654 -0
  857. data/lib/puppet/resource/status.rb +229 -0
  858. data/lib/puppet/resource/type.rb +425 -0
  859. data/lib/puppet/resource/type_collection.rb +231 -0
  860. data/lib/puppet/resource.rb +663 -0
  861. data/lib/puppet/runtime.rb +65 -0
  862. data/lib/puppet/scheduler/job.rb +53 -0
  863. data/lib/puppet/scheduler/scheduler.rb +44 -0
  864. data/lib/puppet/scheduler/splay_job.rb +32 -0
  865. data/lib/puppet/scheduler/timer.rb +13 -0
  866. data/lib/puppet/scheduler.rb +16 -0
  867. data/lib/puppet/settings/alias_setting.rb +37 -0
  868. data/lib/puppet/settings/array_setting.rb +17 -0
  869. data/lib/puppet/settings/autosign_setting.rb +22 -0
  870. data/lib/puppet/settings/base_setting.rb +223 -0
  871. data/lib/puppet/settings/boolean_setting.rb +32 -0
  872. data/lib/puppet/settings/certificate_revocation_setting.rb +21 -0
  873. data/lib/puppet/settings/config_file.rb +146 -0
  874. data/lib/puppet/settings/directory_setting.rb +18 -0
  875. data/lib/puppet/settings/duration_setting.rb +32 -0
  876. data/lib/puppet/settings/enum_setting.rb +16 -0
  877. data/lib/puppet/settings/environment_conf.rb +224 -0
  878. data/lib/puppet/settings/errors.rb +11 -0
  879. data/lib/puppet/settings/file_or_directory_setting.rb +40 -0
  880. data/lib/puppet/settings/file_setting.rb +241 -0
  881. data/lib/puppet/settings/http_extra_headers_setting.rb +25 -0
  882. data/lib/puppet/settings/ini_file.rb +226 -0
  883. data/lib/puppet/settings/integer_setting.rb +17 -0
  884. data/lib/puppet/settings/path_setting.rb +8 -0
  885. data/lib/puppet/settings/port_setting.rb +15 -0
  886. data/lib/puppet/settings/priority_setting.rb +43 -0
  887. data/lib/puppet/settings/server_list_setting.rb +29 -0
  888. data/lib/puppet/settings/string_setting.rb +9 -0
  889. data/lib/puppet/settings/symbolic_enum_setting.rb +17 -0
  890. data/lib/puppet/settings/terminus_setting.rb +14 -0
  891. data/lib/puppet/settings/ttl_setting.rb +51 -0
  892. data/lib/puppet/settings/value_translator.rb +14 -0
  893. data/lib/puppet/settings.rb +1642 -0
  894. data/lib/puppet/ssl/base.rb +149 -0
  895. data/lib/puppet/ssl/certificate.rb +96 -0
  896. data/lib/puppet/ssl/certificate_request.rb +324 -0
  897. data/lib/puppet/ssl/certificate_request_attributes.rb +37 -0
  898. data/lib/puppet/ssl/certificate_signer.rb +39 -0
  899. data/lib/puppet/ssl/digest.rb +20 -0
  900. data/lib/puppet/ssl/error.rb +26 -0
  901. data/lib/puppet/ssl/oids.rb +197 -0
  902. data/lib/puppet/ssl/openssl_loader.rb +24 -0
  903. data/lib/puppet/ssl/ssl_context.rb +25 -0
  904. data/lib/puppet/ssl/ssl_provider.rb +350 -0
  905. data/lib/puppet/ssl/state_machine.rb +474 -0
  906. data/lib/puppet/ssl/verifier.rb +142 -0
  907. data/lib/puppet/ssl.rb +23 -0
  908. data/lib/puppet/syntax_checkers/base64.rb +40 -0
  909. data/lib/puppet/syntax_checkers/epp.rb +34 -0
  910. data/lib/puppet/syntax_checkers/json.rb +35 -0
  911. data/lib/puppet/syntax_checkers/pp.rb +34 -0
  912. data/lib/puppet/syntax_checkers.rb +3 -0
  913. data/lib/puppet/test/test_helper.rb +265 -0
  914. data/lib/puppet/thread_local.rb +4 -0
  915. data/lib/puppet/transaction/additional_resource_generator.rb +220 -0
  916. data/lib/puppet/transaction/event.rb +168 -0
  917. data/lib/puppet/transaction/event_manager.rb +179 -0
  918. data/lib/puppet/transaction/persistence.rb +119 -0
  919. data/lib/puppet/transaction/report.rb +504 -0
  920. data/lib/puppet/transaction/resource_harness.rb +323 -0
  921. data/lib/puppet/transaction.rb +491 -0
  922. data/lib/puppet/trusted_external.rb +41 -0
  923. data/lib/puppet/type/component.rb +89 -0
  924. data/lib/puppet/type/exec.rb +720 -0
  925. data/lib/puppet/type/file/checksum.rb +50 -0
  926. data/lib/puppet/type/file/checksum_value.rb +54 -0
  927. data/lib/puppet/type/file/content.rb +176 -0
  928. data/lib/puppet/type/file/ctime.rb +21 -0
  929. data/lib/puppet/type/file/data_sync.rb +98 -0
  930. data/lib/puppet/type/file/ensure.rb +195 -0
  931. data/lib/puppet/type/file/group.rb +48 -0
  932. data/lib/puppet/type/file/mode.rb +189 -0
  933. data/lib/puppet/type/file/mtime.rb +19 -0
  934. data/lib/puppet/type/file/owner.rb +51 -0
  935. data/lib/puppet/type/file/selcontext.rb +142 -0
  936. data/lib/puppet/type/file/source.rb +379 -0
  937. data/lib/puppet/type/file/target.rb +88 -0
  938. data/lib/puppet/type/file/type.rb +20 -0
  939. data/lib/puppet/type/file.rb +1133 -0
  940. data/lib/puppet/type/filebucket.rb +121 -0
  941. data/lib/puppet/type/group.rb +237 -0
  942. data/lib/puppet/type/notify.rb +47 -0
  943. data/lib/puppet/type/package.rb +713 -0
  944. data/lib/puppet/type/resources.rb +187 -0
  945. data/lib/puppet/type/schedule.rb +441 -0
  946. data/lib/puppet/type/service.rb +309 -0
  947. data/lib/puppet/type/stage.rb +27 -0
  948. data/lib/puppet/type/tidy.rb +376 -0
  949. data/lib/puppet/type/user.rb +859 -0
  950. data/lib/puppet/type/whit.rb +34 -0
  951. data/lib/puppet/type.rb +2676 -0
  952. data/lib/puppet/util/at_fork/noop.rb +18 -0
  953. data/lib/puppet/util/at_fork/solaris.rb +160 -0
  954. data/lib/puppet/util/at_fork.rb +35 -0
  955. data/lib/puppet/util/autoload.rb +215 -0
  956. data/lib/puppet/util/backups.rb +86 -0
  957. data/lib/puppet/util/character_encoding.rb +80 -0
  958. data/lib/puppet/util/checksums.rb +376 -0
  959. data/lib/puppet/util/classgen.rb +228 -0
  960. data/lib/puppet/util/colors.rb +100 -0
  961. data/lib/puppet/util/command_line/puppet_option_parser.rb +87 -0
  962. data/lib/puppet/util/command_line/trollop.rb +825 -0
  963. data/lib/puppet/util/command_line.rb +196 -0
  964. data/lib/puppet/util/constant_inflector.rb +24 -0
  965. data/lib/puppet/util/diff.rb +81 -0
  966. data/lib/puppet/util/docs.rb +128 -0
  967. data/lib/puppet/util/errors.rb +159 -0
  968. data/lib/puppet/util/execution.rb +424 -0
  969. data/lib/puppet/util/execution_stub.rb +26 -0
  970. data/lib/puppet/util/feature.rb +129 -0
  971. data/lib/puppet/util/file_watcher.rb +28 -0
  972. data/lib/puppet/util/fileparsing.rb +408 -0
  973. data/lib/puppet/util/filetype.rb +358 -0
  974. data/lib/puppet/util/http_proxy.rb +4 -0
  975. data/lib/puppet/util/inifile.rb +340 -0
  976. data/lib/puppet/util/instance_loader.rb +66 -0
  977. data/lib/puppet/util/json.rb +92 -0
  978. data/lib/puppet/util/json_lockfile.rb +44 -0
  979. data/lib/puppet/util/ldap/connection.rb +73 -0
  980. data/lib/puppet/util/ldap/generator.rb +42 -0
  981. data/lib/puppet/util/ldap/manager.rb +284 -0
  982. data/lib/puppet/util/ldap.rb +2 -0
  983. data/lib/puppet/util/libuser.conf +15 -0
  984. data/lib/puppet/util/libuser.rb +12 -0
  985. data/lib/puppet/util/limits.rb +12 -0
  986. data/lib/puppet/util/lockfile.rb +66 -0
  987. data/lib/puppet/util/log/destination.rb +49 -0
  988. data/lib/puppet/util/log/destinations.rb +253 -0
  989. data/lib/puppet/util/log.rb +427 -0
  990. data/lib/puppet/util/logging.rb +300 -0
  991. data/lib/puppet/util/metaid.rb +21 -0
  992. data/lib/puppet/util/metric.rb +65 -0
  993. data/lib/puppet/util/monkey_patches.rb +122 -0
  994. data/lib/puppet/util/multi_match.rb +51 -0
  995. data/lib/puppet/util/network_device/base.rb +23 -0
  996. data/lib/puppet/util/network_device/config.rb +105 -0
  997. data/lib/puppet/util/network_device/transport/base.rb +26 -0
  998. data/lib/puppet/util/network_device/transport.rb +5 -0
  999. data/lib/puppet/util/network_device.rb +17 -0
  1000. data/lib/puppet/util/package/version/debian.rb +175 -0
  1001. data/lib/puppet/util/package/version/gem.rb +15 -0
  1002. data/lib/puppet/util/package/version/pip.rb +167 -0
  1003. data/lib/puppet/util/package/version/range/eq.rb +14 -0
  1004. data/lib/puppet/util/package/version/range/gt.rb +14 -0
  1005. data/lib/puppet/util/package/version/range/gt_eq.rb +14 -0
  1006. data/lib/puppet/util/package/version/range/lt.rb +14 -0
  1007. data/lib/puppet/util/package/version/range/lt_eq.rb +14 -0
  1008. data/lib/puppet/util/package/version/range/min_max.rb +21 -0
  1009. data/lib/puppet/util/package/version/range/simple.rb +11 -0
  1010. data/lib/puppet/util/package/version/range.rb +53 -0
  1011. data/lib/puppet/util/package/version/rpm.rb +73 -0
  1012. data/lib/puppet/util/package.rb +40 -0
  1013. data/lib/puppet/util/pidlock.rb +102 -0
  1014. data/lib/puppet/util/platform.rb +70 -0
  1015. data/lib/puppet/util/plist.rb +161 -0
  1016. data/lib/puppet/util/posix.rb +203 -0
  1017. data/lib/puppet/util/profiler/aggregate.rb +85 -0
  1018. data/lib/puppet/util/profiler/around_profiler.rb +67 -0
  1019. data/lib/puppet/util/profiler/logging.rb +48 -0
  1020. data/lib/puppet/util/profiler/object_counts.rb +17 -0
  1021. data/lib/puppet/util/profiler/wall_clock.rb +35 -0
  1022. data/lib/puppet/util/profiler.rb +53 -0
  1023. data/lib/puppet/util/provider_features.rb +179 -0
  1024. data/lib/puppet/util/psych_support.rb +30 -0
  1025. data/lib/puppet/util/rdoc/code_objects.rb +295 -0
  1026. data/lib/puppet/util/rdoc/generators/puppet_generator.rb +912 -0
  1027. data/lib/puppet/util/rdoc/generators/template/puppet/puppet.rb +1085 -0
  1028. data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +259 -0
  1029. data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc2.rb +14 -0
  1030. data/lib/puppet/util/rdoc/parser.rb +12 -0
  1031. data/lib/puppet/util/rdoc.rb +53 -0
  1032. data/lib/puppet/util/reference.rb +119 -0
  1033. data/lib/puppet/util/resource_template.rb +61 -0
  1034. data/lib/puppet/util/retry_action.rb +46 -0
  1035. data/lib/puppet/util/rpm_compare.rb +193 -0
  1036. data/lib/puppet/util/rubygems.rb +67 -0
  1037. data/lib/puppet/util/run_mode.rb +122 -0
  1038. data/lib/puppet/util/selinux.rb +297 -0
  1039. data/lib/puppet/util/skip_tags.rb +13 -0
  1040. data/lib/puppet/util/splayer.rb +18 -0
  1041. data/lib/puppet/util/storage.rb +100 -0
  1042. data/lib/puppet/util/suidmanager.rb +166 -0
  1043. data/lib/puppet/util/symbolic_file_mode.rb +156 -0
  1044. data/lib/puppet/util/tag_set.rb +27 -0
  1045. data/lib/puppet/util/tagging.rb +132 -0
  1046. data/lib/puppet/util/terminal.rb +16 -0
  1047. data/lib/puppet/util/user_attr.rb +21 -0
  1048. data/lib/puppet/util/warnings.rb +31 -0
  1049. data/lib/puppet/util/watched_file.rb +37 -0
  1050. data/lib/puppet/util/watcher/change_watcher.rb +33 -0
  1051. data/lib/puppet/util/watcher/periodic_watcher.rb +37 -0
  1052. data/lib/puppet/util/watcher/timer.rb +19 -0
  1053. data/lib/puppet/util/watcher.rb +17 -0
  1054. data/lib/puppet/util/windows/access_control_entry.rb +84 -0
  1055. data/lib/puppet/util/windows/access_control_list.rb +113 -0
  1056. data/lib/puppet/util/windows/adsi.rb +654 -0
  1057. data/lib/puppet/util/windows/com.rb +225 -0
  1058. data/lib/puppet/util/windows/daemon.rb +343 -0
  1059. data/lib/puppet/util/windows/error.rb +84 -0
  1060. data/lib/puppet/util/windows/eventlog.rb +187 -0
  1061. data/lib/puppet/util/windows/file.rb +355 -0
  1062. data/lib/puppet/util/windows/monkey_patches/process.rb +414 -0
  1063. data/lib/puppet/util/windows/principal.rb +201 -0
  1064. data/lib/puppet/util/windows/process.rb +364 -0
  1065. data/lib/puppet/util/windows/registry.rb +441 -0
  1066. data/lib/puppet/util/windows/root_certs.rb +108 -0
  1067. data/lib/puppet/util/windows/security.rb +907 -0
  1068. data/lib/puppet/util/windows/security_descriptor.rb +62 -0
  1069. data/lib/puppet/util/windows/service.rb +696 -0
  1070. data/lib/puppet/util/windows/sid.rb +289 -0
  1071. data/lib/puppet/util/windows/string.rb +15 -0
  1072. data/lib/puppet/util/windows/user.rb +550 -0
  1073. data/lib/puppet/util/windows.rb +51 -0
  1074. data/lib/puppet/util/yaml.rb +65 -0
  1075. data/lib/puppet/util.rb +808 -0
  1076. data/lib/puppet/vendor/require_vendored.rb +4 -0
  1077. data/lib/puppet/vendor.rb +57 -0
  1078. data/lib/puppet/version.rb +95 -0
  1079. data/lib/puppet/x509/cert_provider.rb +369 -0
  1080. data/lib/puppet/x509/pem_store.rb +55 -0
  1081. data/lib/puppet/x509.rb +11 -0
  1082. data/lib/puppet.rb +345 -0
  1083. data/lib/puppet_pal.rb +8 -0
  1084. data/lib/puppet_x.rb +14 -0
  1085. data/locales/config.yaml +29 -0
  1086. data/locales/en/puppet.po +19 -0
  1087. data/locales/puppet.pot +20 -0
  1088. data/man/man5/puppet.conf.5 +2198 -0
  1089. data/man/man8/puppet-agent.8 +203 -0
  1090. data/man/man8/puppet-apply.8 +100 -0
  1091. data/man/man8/puppet-catalog.8 +291 -0
  1092. data/man/man8/puppet-config.8 +151 -0
  1093. data/man/man8/puppet-describe.8 +51 -0
  1094. data/man/man8/puppet-device.8 +119 -0
  1095. data/man/man8/puppet-doc.8 +46 -0
  1096. data/man/man8/puppet-epp.8 +377 -0
  1097. data/man/man8/puppet-facts.8 +234 -0
  1098. data/man/man8/puppet-filebucket.8 +166 -0
  1099. data/man/man8/puppet-generate.8 +84 -0
  1100. data/man/man8/puppet-help.8 +67 -0
  1101. data/man/man8/puppet-lookup.8 +107 -0
  1102. data/man/man8/puppet-module.8 +325 -0
  1103. data/man/man8/puppet-node.8 +163 -0
  1104. data/man/man8/puppet-parser.8 +130 -0
  1105. data/man/man8/puppet-plugin.8 +73 -0
  1106. data/man/man8/puppet-report.8 +127 -0
  1107. data/man/man8/puppet-resource.8 +88 -0
  1108. data/man/man8/puppet-script.8 +70 -0
  1109. data/man/man8/puppet-ssl.8 +63 -0
  1110. data/man/man8/puppet.8 +28 -0
  1111. data/tasks/benchmark.rake +180 -0
  1112. data/tasks/ci.rake +24 -0
  1113. data/tasks/generate_ast_model.rake +90 -0
  1114. data/tasks/generate_cert_fixtures.rake +194 -0
  1115. data/tasks/manpages.rake +67 -0
  1116. data/tasks/memwalk.rake +195 -0
  1117. data/tasks/parallel.rake +410 -0
  1118. data/tasks/parser.rake +22 -0
  1119. data/tasks/yard.rake +59 -0
  1120. metadata +1324 -0
@@ -0,0 +1,2277 @@
1
+ require_relative '../puppet/util/platform'
2
+
3
+ module Puppet
4
+
5
+ def self.default_diffargs
6
+ '-u'
7
+ end
8
+
9
+ def self.default_digest_algorithm
10
+ 'sha256'
11
+ end
12
+
13
+ def self.valid_digest_algorithms
14
+ Puppet::Util::Platform.fips_enabled? ?
15
+ %w[sha256 sha384 sha512 sha224] :
16
+ %w[sha256 sha384 sha512 sha224 md5]
17
+ end
18
+
19
+ def self.default_file_checksum_types
20
+ Puppet::Util::Platform.fips_enabled? ?
21
+ %w[sha256 sha384 sha512 sha224] :
22
+ %w[sha256 sha384 sha512 sha224 md5]
23
+ end
24
+
25
+ def self.valid_file_checksum_types
26
+ Puppet::Util::Platform.fips_enabled? ?
27
+ %w[sha256 sha256lite sha384 sha512 sha224 sha1 sha1lite mtime ctime] :
28
+ %w[sha256 sha256lite sha384 sha512 sha224 sha1 sha1lite md5 md5lite mtime ctime]
29
+ end
30
+
31
+ def self.default_cadir
32
+ return "" if Puppet::Util::Platform.windows?
33
+ old_ca_dir = "#{Puppet[:ssldir]}/ca"
34
+ new_ca_dir = "/etc/puppetlabs/puppetserver/ca"
35
+
36
+ if File.exist?(old_ca_dir)
37
+ if File.symlink?(old_ca_dir)
38
+ File.readlink(old_ca_dir)
39
+ else
40
+ old_ca_dir
41
+ end
42
+ else
43
+ new_ca_dir
44
+ end
45
+ end
46
+
47
+ def self.default_basemodulepath
48
+ if Puppet::Util::Platform.windows?
49
+ path = ['$codedir/modules']
50
+ installdir = ENV["FACTER_env_windows_installdir"]
51
+ if installdir
52
+ path << "#{installdir}/puppet/modules"
53
+ end
54
+ path.join(File::PATH_SEPARATOR)
55
+ else
56
+ '$codedir/modules:/opt/puppetlabs/puppet/modules'
57
+ end
58
+ end
59
+
60
+ def self.default_vendormoduledir
61
+ if Puppet::Util::Platform.windows?
62
+ installdir = ENV["FACTER_env_windows_installdir"]
63
+ if installdir
64
+ "#{installdir}\\puppet\\vendor_modules"
65
+ else
66
+ nil
67
+ end
68
+ else
69
+ '/opt/puppetlabs/puppet/vendor_modules'
70
+ end
71
+ end
72
+
73
+ ############################################################################################
74
+ # NOTE: For information about the available values for the ":type" property of settings,
75
+ # see the docs for Settings.define_settings
76
+ ############################################################################################
77
+
78
+ AS_DURATION = %q{This setting can be a time interval in seconds (30 or 30s), minutes (30m), hours (6h), days (2d), or years (5y).}
79
+
80
+ # @api public
81
+ # @param args [Puppet::Settings] the settings object to define default settings for
82
+ # @return void
83
+ def self.initialize_default_settings!(settings)
84
+ settings.define_settings(:main,
85
+ :confdir => {
86
+ :default => nil,
87
+ :type => :directory,
88
+ :desc => "The main Puppet configuration directory. The default for this setting
89
+ is calculated based on the user. If the process is running as root or
90
+ the user that Puppet is supposed to run as, it defaults to a system
91
+ directory, but if it's running as any other user, it defaults to being
92
+ in the user's home directory.",
93
+ },
94
+ :codedir => {
95
+ :default => nil,
96
+ :type => :directory,
97
+ :desc => "The main Puppet code directory. The default for this setting
98
+ is calculated based on the user. If the process is running as root or
99
+ the user that Puppet is supposed to run as, it defaults to a system
100
+ directory, but if it's running as any other user, it defaults to being
101
+ in the user's home directory.",
102
+ },
103
+ :vardir => {
104
+ :default => nil,
105
+ :type => :directory,
106
+ :owner => "service",
107
+ :group => "service",
108
+ :desc => "Where Puppet stores dynamic and growing data. The default for this
109
+ setting is calculated specially, like `confdir`_.",
110
+ },
111
+
112
+ ### NOTE: this setting is usually being set to a symbol value. We don't officially have a
113
+ ### setting type for that yet, but we might want to consider creating one.
114
+ :name => {
115
+ :default => nil,
116
+ :desc => "The name of the application, if we are running as one. The
117
+ default is essentially $0 without the path or `.rb`.",
118
+ }
119
+ )
120
+
121
+ settings.define_settings(:main,
122
+ :logdir => {
123
+ :default => nil,
124
+ :type => :directory,
125
+ :mode => "0750",
126
+ :owner => "service",
127
+ :group => "service",
128
+ :desc => "The directory in which to store log files",
129
+ },
130
+ :log_level => {
131
+ :default => 'notice',
132
+ :type => :enum,
133
+ :values => ["debug","info","notice","warning","err","alert","emerg","crit"],
134
+ :desc => "Default logging level for messages from Puppet. Allowed values are:
135
+
136
+ * debug
137
+ * info
138
+ * notice
139
+ * warning
140
+ * err
141
+ * alert
142
+ * emerg
143
+ * crit
144
+ ",
145
+ :hook => proc {|value| Puppet::Util::Log.level = value },
146
+ :call_hook => :on_initialize_and_write,
147
+ },
148
+ :disable_warnings => {
149
+ :default => [],
150
+ :type => :array,
151
+ :desc => "A comma-separated list of warning types to suppress. If large numbers
152
+ of warnings are making Puppet's logs too large or difficult to use, you
153
+ can temporarily silence them with this setting.
154
+
155
+ If you are preparing to upgrade Puppet to a new major version, you
156
+ should re-enable all warnings for a while.
157
+
158
+ Valid values for this setting are:
159
+
160
+ * `deprecations` --- disables deprecation warnings.
161
+ * `undefined_variables` --- disables warnings about non existing variables.
162
+ * `undefined_resources` --- disables warnings about non existing resources.",
163
+ :hook => proc do |value|
164
+ values = munge(value)
165
+ valid = %w[deprecations undefined_variables undefined_resources]
166
+ invalid = values - (values & valid)
167
+ if not invalid.empty?
168
+ raise ArgumentError, _("Cannot disable unrecognized warning types '%{invalid}'.") % { invalid: invalid.join(',') } +
169
+ ' ' + _("Valid values are '%{values}'.") % { values: valid.join(', ') }
170
+ end
171
+ end
172
+ },
173
+ :skip_logging_catalog_request_destination => {
174
+ :default => false,
175
+ :type => :boolean,
176
+ :desc => "If you wish to suppress the notice of which compiler supplied the
177
+ catalog",
178
+ },
179
+ :merge_dependency_warnings => {
180
+ :default => false,
181
+ :type => :boolean,
182
+ :desc => "Whether to merge class-level dependency failure warnings.
183
+
184
+ When a class has a failed dependency, every resource in the class
185
+ generates a notice level message about the dependency failure,
186
+ and a warning level message about skipping the resource.
187
+
188
+ If true, all messages caused by a class dependency failure are merged
189
+ into one message associated with the class.
190
+ ",
191
+ },
192
+ :strict => {
193
+ :default => :warning,
194
+ :type => :symbolic_enum,
195
+ :values => [:off, :warning, :error],
196
+ :desc => "The strictness level of puppet. Allowed values are:
197
+
198
+ * off - do not perform extra validation, do not report
199
+ * warning - perform extra validation, report as warning (default)
200
+ * error - perform extra validation, fail with error
201
+
202
+ The strictness level is for both language semantics and runtime
203
+ evaluation validation. In addition to controlling the behavior with
204
+ this primary server switch some individual warnings may also be controlled
205
+ by the disable_warnings setting.
206
+
207
+ No new validations will be added to a micro (x.y.z) release,
208
+ but may be added in minor releases (x.y.0). In major releases
209
+ it expected that most (if not all) strictness validation become
210
+ standard behavior.",
211
+ :hook => proc do |value|
212
+ munge(value)
213
+ value.to_sym
214
+ end
215
+ },
216
+ :disable_i18n => {
217
+ :default => true,
218
+ :type => :boolean,
219
+ :desc => "If true, turns off all translations of Puppet and module
220
+ log messages, which affects error, warning, and info log messages,
221
+ as well as any translations in the report and CLI.",
222
+ :hook => proc do |value|
223
+ if value
224
+ require_relative '../puppet/gettext/stubs'
225
+ Puppet::GettextConfig.disable_gettext
226
+ end
227
+ end
228
+ }
229
+ )
230
+
231
+ settings.define_settings(:main,
232
+ :priority => {
233
+ :default => nil,
234
+ :type => :priority,
235
+ :desc => "The scheduling priority of the process. Valid values are 'high',
236
+ 'normal', 'low', or 'idle', which are mapped to platform-specific
237
+ values. The priority can also be specified as an integer value and
238
+ will be passed as is, e.g. -5. Puppet must be running as a privileged
239
+ user in order to increase scheduling priority.",
240
+ },
241
+ :trace => {
242
+ :default => false,
243
+ :type => :boolean,
244
+ :desc => "Whether to print stack traces on some errors. Will print
245
+ internal Ruby stack trace interleaved with Puppet function frames.",
246
+ :hook => proc do |value|
247
+ # Enable or disable Facter's trace option too
248
+ Puppet.runtime[:facter].trace(value)
249
+ end
250
+ },
251
+ :puppet_trace => {
252
+ :default => false,
253
+ :type => :boolean,
254
+ :desc => "Whether to print the Puppet stack trace on some errors.
255
+ This is a noop if `trace` is also set.",
256
+ },
257
+ :profile => {
258
+ :default => false,
259
+ :type => :boolean,
260
+ :desc => "Whether to enable experimental performance profiling",
261
+ },
262
+ :versioned_environment_dirs => {
263
+ :default => false,
264
+ :type => :boolean,
265
+ :desc => "Whether or not to look for versioned environment directories,
266
+ symlinked from `$environmentpath/<environment>`. This is an experimental
267
+ feature and should be used with caution."
268
+ },
269
+ :static_catalogs => {
270
+ :default => true,
271
+ :type => :boolean,
272
+ :desc => "Whether to compile a [static catalog](https://puppet.com/docs/puppet/latest/static_catalogs.html#enabling-or-disabling-static-catalogs),
273
+ which occurs only on Puppet Server when the `code-id-command` and
274
+ `code-content-command` settings are configured in its `puppetserver.conf` file.",
275
+ },
276
+ :settings_catalog => {
277
+ :default => true,
278
+ :type => :boolean,
279
+ :desc => "Whether to compile and apply the settings catalog",
280
+ },
281
+ :strict_environment_mode => {
282
+ :default => false,
283
+ :type => :boolean,
284
+ :desc => "Whether the agent specified environment should be considered authoritative,
285
+ causing the run to fail if the retrieved catalog does not match it.",
286
+ },
287
+ :autoflush => {
288
+ :default => true,
289
+ :type => :boolean,
290
+ :desc => "Whether log files should always flush to disk.",
291
+ :hook => proc { |value| Log.autoflush = value }
292
+ },
293
+ :syslogfacility => {
294
+ :default => "daemon",
295
+ :desc => "What syslog facility to use when logging to syslog.
296
+ Syslog has a fixed list of valid facilities, and you must
297
+ choose one of those; you cannot just make one up."
298
+ },
299
+ :statedir => {
300
+ :default => "$vardir/state",
301
+ :type => :directory,
302
+ :mode => "01755",
303
+ :desc => "The directory where Puppet state is stored. Generally,
304
+ this directory can be removed without causing harm (although it
305
+ might result in spurious service restarts)."
306
+ },
307
+ :rundir => {
308
+ :default => nil,
309
+ :type => :directory,
310
+ :mode => "0755",
311
+ :owner => "service",
312
+ :group => "service",
313
+ :desc => "Where Puppet PID files are kept."
314
+ },
315
+ :genconfig => {
316
+ :default => false,
317
+ :type => :boolean,
318
+ :desc => "When true, causes Puppet applications to print an example config file
319
+ to stdout and exit. The example will include descriptions of each
320
+ setting, and the current (or default) value of each setting,
321
+ incorporating any settings overridden on the CLI (with the exception
322
+ of `genconfig` itself). This setting only makes sense when specified
323
+ on the command line as `--genconfig`.",
324
+ },
325
+ :genmanifest => {
326
+ :default => false,
327
+ :type => :boolean,
328
+ :desc => "Whether to just print a manifest to stdout and exit. Only makes
329
+ sense when specified on the command line as `--genmanifest`. Takes into account arguments specified
330
+ on the CLI.",
331
+ },
332
+ :configprint => {
333
+ :default => "",
334
+ :deprecated => :completely,
335
+ :desc => "Prints the value of a specific configuration setting. If the name of a
336
+ setting is provided for this, then the value is printed and puppet
337
+ exits. Comma-separate multiple values. For a list of all values,
338
+ specify 'all'. This setting is deprecated, the 'puppet config' command replaces this functionality.",
339
+ },
340
+ :color => {
341
+ :default => "ansi",
342
+ :type => :string,
343
+ :desc => "Whether to use colors when logging to the console. Valid values are
344
+ `ansi` (equivalent to `true`), `html`, and `false`, which produces no color."
345
+ },
346
+ :mkusers => {
347
+ :default => false,
348
+ :type => :boolean,
349
+ :desc => "Whether to create the necessary user and group that puppet agent will run as.",
350
+ },
351
+ :manage_internal_file_permissions => {
352
+ :default => ! Puppet::Util::Platform.windows?,
353
+ :type => :boolean,
354
+ :desc => "Whether Puppet should manage the owner, group, and mode of files it uses internally.
355
+ **Note**: For Windows agents, the default is `false` for versions 4.10.13 and greater, versions 5.5.6 and greater, and versions 6.0 and greater.",
356
+ },
357
+ :onetime => {
358
+ :default => false,
359
+ :type => :boolean,
360
+ :desc => "Perform one configuration run and exit, rather than spawning a long-running
361
+ daemon. This is useful for interactively running puppet agent, or
362
+ running puppet agent from cron.",
363
+ :short => 'o',
364
+ },
365
+ :path => {
366
+ :default => "none",
367
+ :desc => "The shell search path. Defaults to whatever is inherited
368
+ from the parent process.
369
+
370
+ This setting can only be set in the `[main]` section of puppet.conf; it cannot
371
+ be set in `[server]`, `[agent]`, or an environment config section.",
372
+ :call_hook => :on_define_and_write,
373
+ :hook => proc do |value|
374
+ Puppet::Util.set_env('PATH', '') if Puppet::Util.get_env('PATH').nil?
375
+ Puppet::Util.set_env('PATH', value) unless value == 'none'
376
+ paths = Puppet::Util.get_env('PATH').split(File::PATH_SEPARATOR)
377
+ Puppet::Util::Platform.default_paths.each do |path|
378
+ Puppet::Util.set_env('PATH', Puppet::Util.get_env('PATH') + File::PATH_SEPARATOR + path) unless paths.include?(path)
379
+ end
380
+ value
381
+ end
382
+ },
383
+ :libdir => {
384
+ :type => :directory,
385
+ :default => "$vardir/lib",
386
+ :desc => "An extra search path for Puppet. This is only useful
387
+ for those files that Puppet will load on demand, and is only
388
+ guaranteed to work for those cases. In fact, the autoload
389
+ mechanism is responsible for making sure this directory
390
+ is in Ruby's search path\n"
391
+ },
392
+ :environment => {
393
+ :default => "production",
394
+ :desc => "The environment in which Puppet is running. For clients,
395
+ such as `puppet agent`, this determines the environment itself, which
396
+ Puppet uses to find modules and much more. For servers, such as `puppet server`,
397
+ this provides the default environment for nodes that Puppet knows nothing about.
398
+
399
+ When defining an environment in the `[agent]` section, this refers to the
400
+ environment that the agent requests from the primary server. The environment doesn't
401
+ have to exist on the local filesystem because the agent fetches it from the
402
+ primary server. This definition is used when running `puppet agent`.
403
+
404
+ When defined in the `[user]` section, the environment refers to the path that
405
+ Puppet uses to search for code and modules related to its execution. This
406
+ requires the environment to exist locally on the filesystem where puppet is
407
+ being executed. Puppet subcommands, including `puppet module` and
408
+ `puppet apply`, use this definition.
409
+
410
+ Given that the context and effects vary depending on the
411
+ [config section](https://puppet.com/docs/puppet/latest/config_file_main.html#config-sections)
412
+ in which the `environment` setting is defined, do not set it globally.",
413
+ :short => "E"
414
+ },
415
+ :environmentpath => {
416
+ :default => "$codedir/environments",
417
+ :desc => "A search path for directory environments, as a list of directories
418
+ separated by the system path separator character. (The POSIX path separator
419
+ is ':', and the Windows path separator is ';'.)
420
+
421
+ This setting must have a value set to enable **directory environments.** The
422
+ recommended value is `$codedir/environments`. For more details, see
423
+ <https://puppet.com/docs/puppet/latest/environments_about.html>",
424
+ :type => :path,
425
+ },
426
+ :report_configured_environmentpath => {
427
+ :type => :boolean,
428
+ :default => true,
429
+ :desc => <<-'EOT'
430
+ When versioned_environment_dirs is `true` Puppet will readlink the environmentpath
431
+ when constructing the environment's modulepath. The full readlinked path is referred
432
+ to as the "resolved path" and the configured path potentially containing symlinks is
433
+ the "configured path". When reporting where resources come from users may choose
434
+ between the configured or resolved path.
435
+
436
+ When set to false, the resolved paths are reported instead of the configured paths.
437
+ EOT
438
+ },
439
+ :use_last_environment => {
440
+ :type => :boolean,
441
+ :default => true,
442
+ :desc => <<-'EOT'
443
+ Puppet saves both the initial and converged environment in the last_run_summary file.
444
+ If they differ, and this setting is set to true, we will use the last converged
445
+ environment and skip the node request.
446
+
447
+ When set to false, we will do the node request and ignore the environment data from the last_run_summary file.
448
+ EOT
449
+ },
450
+ :always_retry_plugins => {
451
+ :type => :boolean,
452
+ :default => true,
453
+ :desc => <<-'EOT'
454
+ Affects how we cache attempts to load Puppet resource types and features. If
455
+ true, then calls to `Puppet.type.<type>?` `Puppet.feature.<feature>?`
456
+ will always attempt to load the type or feature (which can be an
457
+ expensive operation) unless it has already been loaded successfully.
458
+ This makes it possible for a single agent run to, e.g., install a
459
+ package that provides the underlying capabilities for a type or feature,
460
+ and then later load that type or feature during the same run (even if
461
+ the type or feature had been tested earlier and had not been available).
462
+
463
+ If this setting is set to false, then types and features will only be
464
+ checked once, and if they are not available, the negative result is
465
+ cached and returned for all subsequent attempts to load the type or
466
+ feature. This behavior is almost always appropriate for the server,
467
+ and can result in a significant performance improvement for types and
468
+ features that are checked frequently.
469
+ EOT
470
+ },
471
+ :diff_args => {
472
+ :default => lambda { default_diffargs },
473
+ :desc => "Which arguments to pass to the diff command when printing differences between
474
+ files. The command to use can be chosen with the `diff` setting.",
475
+ },
476
+ :diff => {
477
+ :default => (Puppet::Util::Platform.windows? ? "" : "diff"),
478
+ :desc => "Which diff command to use when printing differences between files. This setting
479
+ has no default value on Windows, as standard `diff` is not available, but Puppet can use many
480
+ third-party diff tools.",
481
+ },
482
+ :show_diff => {
483
+ :type => :boolean,
484
+ :default => false,
485
+ :desc => "Whether to log and report a contextual diff when files are being replaced.
486
+ This causes partial file contents to pass through Puppet's normal
487
+ logging and reporting system, so this setting should be used with
488
+ caution if you are sending Puppet's reports to an insecure
489
+ destination. This feature currently requires the `diff/lcs` Ruby
490
+ library.",
491
+ },
492
+ :daemonize => {
493
+ :type => :boolean,
494
+ :default => (Puppet::Util::Platform.windows? ? false : true),
495
+ :desc => "Whether to send the process into the background. This defaults
496
+ to true on POSIX systems, and to false on Windows (where Puppet
497
+ currently cannot daemonize).",
498
+ :short => "D",
499
+ :hook => proc do |value|
500
+ if value and Puppet::Util::Platform.windows?
501
+ raise "Cannot daemonize on Windows"
502
+ end
503
+ end
504
+ },
505
+ :maximum_uid => {
506
+ :default => 4294967290,
507
+ :type => :integer,
508
+ :desc => "The maximum allowed UID. Some platforms use negative UIDs
509
+ but then ship with tools that do not know how to handle signed ints,
510
+ so the UIDs show up as huge numbers that can then not be fed back into
511
+ the system. This is a hackish way to fail in a slightly more useful
512
+ way when that happens.",
513
+ },
514
+ :route_file => {
515
+ :default => "$confdir/routes.yaml",
516
+ :desc => "The YAML file containing indirector route configuration.",
517
+ },
518
+ :node_terminus => {
519
+ :type => :terminus,
520
+ :default => "plain",
521
+ :desc => <<-'EOT',
522
+ Which node data plugin to use when compiling node catalogs.
523
+
524
+ When Puppet compiles a catalog, it combines two primary sources of info: the main manifest,
525
+ and a node data plugin (often called a "node terminus," for historical reasons). Node data
526
+ plugins provide three things for a given node name:
527
+
528
+ 1. A list of classes to add to that node's catalog (and, optionally, values for their
529
+ parameters).
530
+ 2. Which Puppet environment the node should use.
531
+ 3. A list of additional top-scope variables to set.
532
+
533
+ The three main node data plugins are:
534
+
535
+ * `plain` --- Returns no data, so that the main manifest controls all node configuration.
536
+ * `exec` --- Uses an
537
+ [external node classifier (ENC)](https://puppet.com/docs/puppet/latest/nodes_external.html),
538
+ configured by the `external_nodes` setting. This lets you pull a list of Puppet classes
539
+ from any external system, using a small glue script to perform the request and format the
540
+ result as YAML.
541
+ * `classifier` (formerly `console`) --- Specific to Puppet Enterprise. Uses the PE console
542
+ for node data."
543
+ EOT
544
+ },
545
+ :node_cache_terminus => {
546
+ :type => :terminus,
547
+ :default => nil,
548
+ :desc => "How to store cached nodes.
549
+ Valid values are (none), 'json', 'msgpack', or 'yaml'.",
550
+ },
551
+ :data_binding_terminus => {
552
+ :type => :terminus,
553
+ :default => "hiera",
554
+ :desc =>
555
+ "This setting has been deprecated. Use of any value other than 'hiera' should instead be configured
556
+ in a version 5 hiera.yaml. Until this setting is removed, it controls which data binding terminus
557
+ to use for global automatic data binding (across all environments). By default this value is 'hiera'.
558
+ A value of 'none' turns off the global binding.",
559
+ :call_hook => :on_initialize_and_write,
560
+ :hook => proc do |value|
561
+ if Puppet[:strict] != :off
562
+ s_val = value.to_s # because sometimes the value is a symbol
563
+ unless s_val == 'hiera' || s_val == 'none' || value == '' || value.nil?
564
+ #TRANSLATORS 'data_binding_terminus' is a setting and should not be translated
565
+ message = _("Setting 'data_binding_terminus' is deprecated.")
566
+ #TRANSLATORS 'hiera' should not be translated
567
+ message += ' ' + _("Convert custom terminus to hiera 5 API.")
568
+ Puppet.deprecation_warning(message)
569
+ end
570
+ end
571
+ end
572
+ },
573
+ :hiera_config => {
574
+ :default => lambda do
575
+ config = nil
576
+ codedir = settings[:codedir]
577
+ if codedir.is_a?(String)
578
+ config = File.expand_path(File.join(codedir, 'hiera.yaml'))
579
+ config = nil unless Puppet::FileSystem.exist?(config)
580
+ end
581
+ config = File.expand_path(File.join(settings[:confdir], 'hiera.yaml')) if config.nil?
582
+ config
583
+ end,
584
+ :desc => "The hiera configuration file. Puppet only reads this file on startup, so you must restart the puppet server every time you edit it.",
585
+ :type => :file,
586
+ },
587
+ :binder_config => {
588
+ :default => nil,
589
+ :desc => "The binder configuration file. Puppet reads this file on each request to configure the bindings system.
590
+ If set to nil (the default), a $confdir/binder_config.yaml is optionally loaded. If it does not exists, a default configuration
591
+ is used. If the setting :binding_config is specified, it must reference a valid and existing yaml file.",
592
+ :type => :file,
593
+ },
594
+ :catalog_terminus => {
595
+ :type => :terminus,
596
+ :default => "compiler",
597
+ :desc => "Where to get node catalogs. This is useful to change if, for instance,
598
+ you'd like to pre-compile catalogs and store them in memcached or some other easily-accessed store.",
599
+ },
600
+ :catalog_cache_terminus => {
601
+ :type => :terminus,
602
+ :default => nil,
603
+ :desc => "How to store cached catalogs. Valid values are 'json', 'msgpack' and 'yaml'. The agent application defaults to 'json'."
604
+ },
605
+ :facts_terminus => {
606
+ :default => 'facter',
607
+ :desc => "The node facts terminus.",
608
+ },
609
+ :trusted_external_command => {
610
+ :default => nil,
611
+ :type => :file_or_directory,
612
+ :desc => "The external trusted facts script or directory to use.
613
+ This setting's value can be set to the path to an executable command that
614
+ can produce external trusted facts or to a directory containing those
615
+ executable commands. The command(s) must:
616
+
617
+ * Take the name of a node as a command-line argument.
618
+ * Return a JSON hash with the external trusted facts for this node.
619
+ * For unknown or invalid nodes, exit with a non-zero exit code.
620
+
621
+ If the setting points to an executable command, then the external trusted
622
+ facts will be stored in the 'external' key of the trusted facts hash. Otherwise
623
+ for each executable file in the directory, the external trusted facts will be
624
+ stored in the `<basename>` key of the `trusted['external']` hash. For example,
625
+ if the files foo.rb and bar.sh are in the directory, then `trusted['external']`
626
+ will be the hash `{ 'foo' => <foo.rb output>, 'bar' => <bar.sh output> }`.",
627
+ },
628
+ :default_file_terminus => {
629
+ :type => :terminus,
630
+ :default => "rest",
631
+ :desc => "The default source for files if no server is given in a
632
+ uri, e.g. puppet:///file. The default of `rest` causes the file to be
633
+ retrieved using the `server` setting. When running `apply` the default
634
+ is `file_server`, causing requests to be filled locally."
635
+ },
636
+ :http_proxy_host => {
637
+ :default => "none",
638
+ :desc => "The HTTP proxy host to use for outgoing connections. The proxy will be bypassed if
639
+ the server's hostname matches the NO_PROXY environment variable or `no_proxy` setting. Note: You
640
+ may need to use a FQDN for the server hostname when using a proxy. Environment variable
641
+ http_proxy or HTTP_PROXY will override this value. ",
642
+ },
643
+ :http_proxy_port => {
644
+ :default => 3128,
645
+ :type => :port,
646
+ :desc => "The HTTP proxy port to use for outgoing connections",
647
+ },
648
+ :http_proxy_user => {
649
+ :default => "none",
650
+ :desc => "The user name for an authenticated HTTP proxy. Requires the `http_proxy_host` setting.",
651
+ },
652
+ :http_proxy_password =>{
653
+ :default => "none",
654
+ :hook => proc do |value|
655
+ if value =~ /[@!# \/]/
656
+ raise "Passwords set in the http_proxy_password setting must be valid as part of a URL, and any reserved characters must be URL-encoded. We received: #{value}"
657
+ end
658
+ end,
659
+ :desc => "The password for the user of an authenticated HTTP proxy.
660
+ Requires the `http_proxy_user` setting.
661
+
662
+ Note that passwords must be valid when used as part of a URL. If a password
663
+ contains any characters with special meanings in URLs (as specified by RFC 3986
664
+ section 2.2), they must be URL-encoded. (For example, `#` would become `%23`.)",
665
+ },
666
+ :no_proxy => {
667
+ :default => "localhost, 127.0.0.1",
668
+ :desc => "List of host or domain names that should not go through `http_proxy_host`. Environment variable no_proxy or NO_PROXY will override this value. Names can be specified as an FQDN `host.example.com`, wildcard `*.example.com`, dotted domain `.example.com`, or suffix `example.com`.",
669
+ },
670
+ :http_keepalive_timeout => {
671
+ :default => "4s",
672
+ :type => :duration,
673
+ :desc => "The maximum amount of time a persistent HTTP connection can remain idle in the connection pool, before it is closed. This timeout should be shorter than the keepalive timeout used on the HTTP server, e.g. Apache KeepAliveTimeout directive.
674
+ #{AS_DURATION}"
675
+ },
676
+ :http_debug => {
677
+ :default => false,
678
+ :type => :boolean,
679
+ :desc => "Whether to write HTTP request and responses to stderr. This should never be used in a production environment."
680
+ },
681
+ :http_connect_timeout => {
682
+ :default => "2m",
683
+ :type => :duration,
684
+ :desc => "The maximum amount of time to wait when establishing an HTTP connection. The default
685
+ value is 2 minutes.
686
+ #{AS_DURATION}",
687
+ },
688
+ :http_read_timeout => {
689
+ :default => "10m",
690
+ :type => :duration,
691
+ :desc => "The time to wait for data to be read from an HTTP connection. If nothing is
692
+ read after the elapsed interval then the connection will be closed. The default value is 10 minutes.
693
+ #{AS_DURATION}",
694
+ },
695
+ :http_user_agent => {
696
+ :default => "Puppet/#{Puppet.version} Ruby/#{RUBY_VERSION}-p#{RUBY_PATCHLEVEL} (#{RUBY_PLATFORM})",
697
+ :desc => "The HTTP User-Agent string to send when making network requests."
698
+ },
699
+ :filetimeout => {
700
+ :default => "15s",
701
+ :type => :duration,
702
+ :desc => "The minimum time to wait between checking for updates in
703
+ configuration files. This timeout determines how quickly Puppet checks whether
704
+ a file (such as manifests or puppet.conf) has changed on disk. The default will
705
+ change in a future release to be 'unlimited', requiring a reload of the Puppet
706
+ service to pick up changes to its internal configuration. Currently we do not
707
+ accept a value of 'unlimited'. To reparse files within an environment in
708
+ Puppet Server please use the environment_cache endpoint",
709
+ :hook => proc do |val|
710
+ unless [0, 15, '15s'].include?(val)
711
+ Puppet.deprecation_warning(<<-WARNING)
712
+ Fine grained control of filetimeouts is deprecated. In future
713
+ releases this value will only determine if file content is cached.
714
+
715
+ Valid values are 0 (never cache) and 15 (15 second minimum wait time).
716
+ WARNING
717
+ end
718
+ end
719
+ },
720
+ :environment_timeout => {
721
+ :default => "0",
722
+ :type => :ttl,
723
+ :desc => "How long the Puppet server should cache data it loads from an
724
+ environment.
725
+
726
+ A value of `0` will disable caching. This setting can also be set to
727
+ `unlimited`, which will cache environments until the server is restarted
728
+ or told to refresh the cache. All other values will result in Puppet
729
+ server evicting environments that haven't been used within the last
730
+ `environment_timeout` seconds.
731
+
732
+ You should change this setting once your Puppet deployment is doing
733
+ non-trivial work. We chose the default value of `0` because it lets new
734
+ users update their code without any extra steps, but it lowers the
735
+ performance of your Puppet server. We recommend either:
736
+
737
+ * Setting this to `unlimited` and explicitly refreshing your Puppet server
738
+ as part of your code deployment process.
739
+
740
+ * Setting this to a number that will keep your most actively used
741
+ environments cached, but allow testing environments to fall out of the
742
+ cache and reduce memory usage. A value of 3 minutes (3m) is a reasonable
743
+ value.
744
+
745
+ Once you set `environment_timeout` to a non-zero value, you need to tell
746
+ Puppet server to read new code from disk using the `environment-cache` API
747
+ endpoint after you deploy new code. See the docs for the Puppet Server
748
+ [administrative API](https://puppet.com/docs/puppetserver/latest/admin-api/v1/environment-cache.html).
749
+ "
750
+ },
751
+ :environment_data_provider => {
752
+ :desc => "The name of a registered environment data provider used when obtaining environment
753
+ specific data. The three built in and registered providers are 'none' (no data), 'function' (data
754
+ obtained by calling the function 'environment::data()') and 'hiera' (data obtained using a data
755
+ provider configured using a hiera.yaml file in root of the environment).
756
+ Other environment data providers may be registered in modules on the module path. For such
757
+ custom data providers see the respective module documentation. This setting is deprecated.",
758
+ :hook => proc { |value|
759
+ unless value.nil? || Puppet[:strict] == :off
760
+ #TRANSLATORS 'environment_data_provider' is a setting and should not be translated
761
+ Puppet.deprecation_warning(_("Setting 'environment_data_provider' is deprecated."))
762
+ end
763
+ }
764
+ },
765
+ :prerun_command => {
766
+ :default => "",
767
+ :desc => "A command to run before every agent run. If this command returns a non-zero
768
+ return code, the entire Puppet run will fail.",
769
+ },
770
+ :postrun_command => {
771
+ :default => "",
772
+ :desc => "A command to run after every agent run. If this command returns a non-zero
773
+ return code, the entire Puppet run will be considered to have failed, even though it might have
774
+ performed work during the normal run.",
775
+ },
776
+ :freeze_main => {
777
+ :default => false,
778
+ :type => :boolean,
779
+ :desc => "Freezes the 'main' class, disallowing any code to be added to it. This
780
+ essentially means that you can't have any code outside of a node,
781
+ class, or definition other than in the site manifest.",
782
+ },
783
+ :preview_outputdir => {
784
+ :default => '$vardir/preview',
785
+ :type => :directory,
786
+ :mode => "0750",
787
+ :owner => "service",
788
+ :group => "service",
789
+ :desc => "The directory where catalog previews per node are generated."
790
+ },
791
+ :location_trusted => {
792
+ :default => false,
793
+ :type => :boolean,
794
+ :desc => "This will allow sending the name + password and the cookie header to all hosts that puppet may redirect to.
795
+ This may or may not introduce a security breach if puppet redirects you to a site to which you'll send your authentication info and cookies."
796
+ }
797
+ )
798
+
799
+ settings.define_settings(:module_tool,
800
+ :module_repository => {
801
+ :default => 'https://forgeapi.puppet.com',
802
+ :desc => "The module repository",
803
+ },
804
+ :module_working_dir => {
805
+ :default => (Puppet::Util::Platform.windows? ? Dir.tmpdir() : '$vardir/puppet-module'),
806
+ :desc => "The directory into which module tool data is stored",
807
+ },
808
+ :forge_authorization => {
809
+ :default => nil,
810
+ :desc => "The authorization key to connect to the Puppet Forge. Leave blank for unauthorized or license based connections",
811
+ },
812
+ :module_groups => {
813
+ :default => nil,
814
+ :desc => "Extra module groups to request from the Puppet Forge. This is an internal setting, and users should never change it.",
815
+ }
816
+ )
817
+
818
+ settings.define_settings(
819
+ :main,
820
+
821
+ # We have to downcase the fqdn, because the current ssl stuff (as opposed to in master) doesn't have good facilities for
822
+ # manipulating naming.
823
+ :certname => {
824
+ :default => lambda { Puppet::Settings.default_certname.downcase },
825
+ :desc => "The name to use when handling certificates. When a node
826
+ requests a certificate from the CA Puppet Server, it uses the value of the
827
+ `certname` setting as its requested Subject CN.
828
+
829
+ This is the name used when managing a node's permissions in
830
+ Puppet Server's [auth.conf](https://puppet.com/docs/puppetserver/latest/config_file_auth.html).
831
+ In most cases, it is also used as the node's name when matching
832
+ [node definitions](https://puppet.com/docs/puppet/latest/lang_node_definitions.html)
833
+ and requesting data from an ENC. (This can be changed with the `node_name_value`
834
+ and `node_name_fact` settings, although you should only do so if you have
835
+ a compelling reason.)
836
+
837
+ A node's certname is available in Puppet manifests as `$trusted['certname']`. (See
838
+ [Facts and Built-In Variables](https://puppet.com/docs/puppet/latest/lang_facts_and_builtin_vars.html)
839
+ for more details.)
840
+
841
+ * For best compatibility, you should limit the value of `certname` to
842
+ only use lowercase letters, numbers, periods, underscores, and dashes. (That is,
843
+ it should match `/\A[a-z0-9._-]+\Z/`.)
844
+ * The special value `ca` is reserved, and can't be used as the certname
845
+ for a normal node.
846
+
847
+ **Note:** You must set the certname in the main section of the puppet.conf file. Setting it in a different section causes errors.
848
+
849
+ Defaults to the node's fully qualified domain name.",
850
+ :call_hook => :on_initialize_and_write,
851
+ :hook => proc { |value|
852
+ raise(ArgumentError, _("Certificate names must be lower case")) unless value == value.downcase
853
+ }},
854
+ :dns_alt_names => {
855
+ :default => '',
856
+ :desc => <<EOT,
857
+ A comma-separated list of alternate DNS names for Puppet Server. These are extra
858
+ hostnames (in addition to its `certname`) that the server is allowed to use when
859
+ serving agents. Puppet checks this setting when automatically creating a
860
+ certificate for Puppet agent or Puppet Server. These can be either IP or DNS, and the type
861
+ should be specified and followed with a colon. Untyped inputs will default to DNS.
862
+
863
+ In order to handle agent requests at a given hostname (like
864
+ "puppet.example.com"), Puppet Server needs a certificate that proves it's
865
+ allowed to use that name; if a server shows a certificate that doesn't include
866
+ its hostname, Puppet agents will refuse to trust it. If you use a single
867
+ hostname for Puppet traffic but load-balance it to multiple Puppet Servers, each
868
+ of those servers needs to include the official hostname in its list of extra
869
+ names.
870
+
871
+ **Note:** The list of alternate names is locked in when the server's
872
+ certificate is signed. If you need to change the list later, you can't just
873
+ change this setting; you also need to regenerate the certificate. For more
874
+ information on that process, see the
875
+ [cert regen docs](https://puppet.com/docs/puppet/latest/ssl_regenerate_certificates.html).
876
+
877
+ To see all the alternate names your servers are using, log into your CA server
878
+ and run `puppetserver ca list --all`, then check the output for `(alt names: ...)`.
879
+ Most agent nodes should NOT have alternate names; the only certs that should
880
+ have them are Puppet Server nodes that you want other agents to trust.
881
+ EOT
882
+ },
883
+ :csr_attributes => {
884
+ :default => "$confdir/csr_attributes.yaml",
885
+ :type => :file,
886
+ :desc => <<EOT
887
+ An optional file containing custom attributes to add to certificate signing
888
+ requests (CSRs). You should ensure that this file does not exist on your CA
889
+ Puppet Server; if it does, unwanted certificate extensions may leak into
890
+ certificates created with the `puppetserver ca generate` command.
891
+
892
+ If present, this file must be a YAML hash containing a `custom_attributes` key
893
+ and/or an `extension_requests` key. The value of each key must be a hash, where
894
+ each key is a valid OID and each value is an object that can be cast to a string.
895
+
896
+ Custom attributes can be used by the CA when deciding whether to sign the
897
+ certificate, but are then discarded. Attribute OIDs can be any OID value except
898
+ the standard CSR attributes (i.e. attributes described in RFC 2985 section 5.4).
899
+ This is useful for embedding a pre-shared key for autosigning policy executables
900
+ (see the `autosign` setting), often by using the `1.2.840.113549.1.9.7`
901
+ ("challenge password") OID.
902
+
903
+ Extension requests will be permanently embedded in the final certificate.
904
+ Extension OIDs must be in the "ppRegCertExt" (`1.3.6.1.4.1.34380.1.1`),
905
+ "ppPrivCertExt" (`1.3.6.1.4.1.34380.1.2`), or
906
+ "ppAuthCertExt" (`1.3.6.1.4.1.34380.1.3`) OID arcs. The ppRegCertExt arc is
907
+ reserved for four of the most common pieces of data to embed: `pp_uuid` (`.1`),
908
+ `pp_instance_id` (`.2`), `pp_image_name` (`.3`), and `pp_preshared_key` (`.4`)
909
+ --- in the YAML file, these can be referred to by their short descriptive names
910
+ instead of their full OID. The ppPrivCertExt arc is unregulated, and can be used
911
+ for site-specific extensions. The ppAuthCert arc is reserved for two pieces of
912
+ data to embed: `pp_authorization` (`.1`) and `pp_auth_role` (`.13`). As with
913
+ ppRegCertExt, in the YAML file, these can be referred to by their short
914
+ descriptive name instead of their full OID.
915
+ EOT
916
+ },
917
+ :certdir => {
918
+ :default => "$ssldir/certs",
919
+ :type => :directory,
920
+ :mode => "0755",
921
+ :owner => "service",
922
+ :group => "service",
923
+ :desc => "The certificate directory."
924
+ },
925
+ :ssldir => {
926
+ :default => "$confdir/ssl",
927
+ :type => :directory,
928
+ :mode => "0771",
929
+ :owner => "service",
930
+ :group => "service",
931
+ :desc => "Where SSL certificates are kept."
932
+ },
933
+ :ssl_lockfile => {
934
+ :default => "$ssldir/ssl.lock",
935
+ :type => :string,
936
+ :desc => "A lock file to indicate that the ssl bootstrap process is currently in progress.",
937
+ },
938
+ :publickeydir => {
939
+ :default => "$ssldir/public_keys",
940
+ :type => :directory,
941
+ :mode => "0755",
942
+ :owner => "service",
943
+ :group => "service",
944
+ :desc => "The public key directory."
945
+ },
946
+ :requestdir => {
947
+ :default => "$ssldir/certificate_requests",
948
+ :type => :directory,
949
+ :mode => "0755",
950
+ :owner => "service",
951
+ :group => "service",
952
+ :desc => "Where host certificate requests are stored."
953
+ },
954
+ :privatekeydir => {
955
+ :default => "$ssldir/private_keys",
956
+ :type => :directory,
957
+ :mode => "0750",
958
+ :owner => "service",
959
+ :group => "service",
960
+ :desc => "The private key directory."
961
+ },
962
+ :privatedir => {
963
+ :default => "$ssldir/private",
964
+ :type => :directory,
965
+ :mode => "0750",
966
+ :owner => "service",
967
+ :group => "service",
968
+ :desc => "Where the client stores private certificate information."
969
+ },
970
+ :passfile => {
971
+ :default => "$privatedir/password",
972
+ :type => :file,
973
+ :mode => "0640",
974
+ :owner => "service",
975
+ :group => "service",
976
+ :desc => "Where puppet agent stores the password for its private key.
977
+ Generally unused."
978
+ },
979
+ :hostcsr => {
980
+ :default => "$requestdir/$certname.pem",
981
+ :type => :file,
982
+ :mode => "0644",
983
+ :owner => "service",
984
+ :group => "service",
985
+ :desc => "Where individual hosts store their certificate request (CSR)
986
+ while waiting for the CA to issue their certificate."
987
+ },
988
+ :hostcert => {
989
+ :default => "$certdir/$certname.pem",
990
+ :type => :file,
991
+ :mode => "0644",
992
+ :owner => "service",
993
+ :group => "service",
994
+ :desc => "Where individual hosts store and look for their certificates."
995
+ },
996
+ :hostprivkey => {
997
+ :default => "$privatekeydir/$certname.pem",
998
+ :type => :file,
999
+ :mode => "0640",
1000
+ :owner => "service",
1001
+ :group => "service",
1002
+ :desc => "Where individual hosts store and look for their private key."
1003
+ },
1004
+ :hostpubkey => {
1005
+ :default => "$publickeydir/$certname.pem",
1006
+ :type => :file,
1007
+ :mode => "0644",
1008
+ :owner => "service",
1009
+ :group => "service",
1010
+ :desc => "Where individual hosts store and look for their public key."
1011
+ },
1012
+ :localcacert => {
1013
+ :default => "$certdir/ca.pem",
1014
+ :type => :file,
1015
+ :mode => "0644",
1016
+ :owner => "service",
1017
+ :group => "service",
1018
+ :desc => "Where each client stores the CA certificate."
1019
+ },
1020
+ :ca_fingerprint => {
1021
+ :default => nil,
1022
+ :type => :string,
1023
+ :desc => "The expected fingerprint of the CA certificate. If specified, the agent
1024
+ will compare the CA certificate fingerprint that it downloads against this value
1025
+ and reject the CA certificate if the values do not match. This only applies
1026
+ during the first download of the CA certificate."
1027
+ },
1028
+ :ssl_trust_store => {
1029
+ :default => nil,
1030
+ :type => :file,
1031
+ :desc => "A file containing CA certificates in PEM format that puppet should trust
1032
+ when making HTTPS requests. This **only** applies to https requests to non-puppet
1033
+ infrastructure, such as retrieving file metadata and content from https file sources,
1034
+ puppet module tool and the 'http' report processor. This setting is ignored when
1035
+ making requests to puppet:// URLs such as catalog and report requests.",
1036
+ },
1037
+ :hostcrl => {
1038
+ :default => "$ssldir/crl.pem",
1039
+ :type => :file,
1040
+ :mode => "0644",
1041
+ :owner => "service",
1042
+ :group => "service",
1043
+ :desc => "Where the host's certificate revocation list can be found.
1044
+ This is distinct from the certificate authority's CRL."
1045
+ },
1046
+ :certificate_revocation => {
1047
+ :default => 'chain',
1048
+ :type => :certificate_revocation,
1049
+ :desc => <<-'EOT'
1050
+ Whether certificate revocation checking should be enabled, and what level of
1051
+ checking should be performed.
1052
+
1053
+ When certificate revocation is enabled, Puppet expects the contents of its CRL
1054
+ to be one or more PEM-encoded CRLs concatenated together. When using a cert
1055
+ bundle, CRLs for all CAs in the chain of trust must be included in the crl file.
1056
+ The chain should be ordered from least to most authoritative, with the first CRL
1057
+ listed being for the root of the chain and the last being for the leaf CA.
1058
+
1059
+ When certificate_revocation is set to 'true' or 'chain', Puppet ensures
1060
+ that each CA in the chain of trust has not been revoked by its issuing CA.
1061
+
1062
+ When certificate_revocation is set to 'leaf', Puppet verifies certs against
1063
+ the issuing CA's revocation list, but it does not verify the revocation status
1064
+ of the issuing CA or any CA above it within the chain of trust.
1065
+
1066
+ When certificate_revocation is set to 'false', Puppet disables all
1067
+ certificate revocation checking and does not attempt to download the CRL.
1068
+ EOT
1069
+ },
1070
+ :ciphers => {
1071
+ :default => 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256',
1072
+ :type => :string,
1073
+ :desc => "The list of ciphersuites for TLS connections initiated by puppet. The
1074
+ default value is chosen to support TLS 1.0 and up, but can be made
1075
+ more restrictive if needed. The ciphersuites must be specified in OpenSSL
1076
+ format, not IANA."
1077
+ },
1078
+ :key_type => {
1079
+ :default => 'rsa',
1080
+ :type => :enum,
1081
+ :values => %w[rsa ec],
1082
+ :desc => "The type of private key. Valid values are `rsa` and `ec`. Default is `rsa`."
1083
+ },
1084
+ :named_curve => {
1085
+ :default => 'prime256v1',
1086
+ :type => :string,
1087
+ :desc => "The short name for the EC curve used to generate the EC private key. Valid
1088
+ values must be one of the curves in `OpenSSL::PKey::EC.builtin_curves`.
1089
+ Default is `prime256v1`."
1090
+ },
1091
+ :digest_algorithm => {
1092
+ :default => lambda { default_digest_algorithm },
1093
+ :type => :enum,
1094
+ :values => valid_digest_algorithms,
1095
+ :desc => "Which digest algorithm to use for file resources and the filebucket.
1096
+ Valid values are #{valid_digest_algorithms.join(', ')}. Default is
1097
+ #{default_digest_algorithm}.",
1098
+ },
1099
+ :supported_checksum_types => {
1100
+ :default => lambda { default_file_checksum_types },
1101
+ :type => :array,
1102
+ :desc => "Checksum types supported by this agent for use in file resources of a
1103
+ static catalog. Values must be comma-separated. Valid types are
1104
+ #{valid_file_checksum_types.join(', ')}. Default is
1105
+ #{default_file_checksum_types.join(', ')}.",
1106
+ :hook => proc do |value|
1107
+ values = munge(value)
1108
+
1109
+ invalid = values - Puppet.valid_file_checksum_types
1110
+ if not invalid.empty?
1111
+ raise ArgumentError, _("Invalid value '%{value}' for parameter %{name}. Allowed values are '%{allowed_values}'") % {
1112
+ value: invalid.first, name: @name, allowed_values: Puppet.valid_file_checksum_types.join("', '")
1113
+ }
1114
+ end
1115
+ end
1116
+ },
1117
+ :logdest => {
1118
+ :type => :string,
1119
+ :desc => "Where to send log messages. Choose between 'syslog' (the POSIX syslog
1120
+ service), 'eventlog' (the Windows Event Log), 'console', or the path to a log
1121
+ file. Multiple destinations can be set using a comma separated list (eg: `/path/file1,console,/path/file2`)"
1122
+ # Sure would be nice to set the Puppet::Util::Log destination here in an :on_initialize_and_write hook,
1123
+ # unfortunately we have a large number of tests that rely on the logging not resetting itself when the
1124
+ # settings are initialized as they test what gets logged during settings initialization.
1125
+ }
1126
+ )
1127
+
1128
+ settings.define_settings(
1129
+ :ca,
1130
+ :ca_name => {
1131
+ :default => "Puppet CA: $certname",
1132
+ :desc => "The name to use the Certificate Authority certificate.",
1133
+ },
1134
+ :cadir => {
1135
+ :default => lambda { default_cadir },
1136
+ :type => :directory,
1137
+ :desc => "The root directory for the certificate authority.",
1138
+ },
1139
+ :cacert => {
1140
+ :default => "$cadir/ca_crt.pem",
1141
+ :type => :file,
1142
+ :desc => "The CA certificate.",
1143
+ },
1144
+ :cakey => {
1145
+ :default => "$cadir/ca_key.pem",
1146
+ :type => :file,
1147
+ :desc => "The CA private key.",
1148
+ },
1149
+ :capub => {
1150
+ :default => "$cadir/ca_pub.pem",
1151
+ :type => :file,
1152
+ :desc => "The CA public key.",
1153
+ },
1154
+ :cacrl => {
1155
+ :default => "$cadir/ca_crl.pem",
1156
+ :type => :file,
1157
+ :desc => "The certificate revocation list (CRL) for the CA.",
1158
+ },
1159
+ :csrdir => {
1160
+ :default => "$cadir/requests",
1161
+ :type => :directory,
1162
+ :desc => "Where the CA stores certificate requests.",
1163
+ },
1164
+ :signeddir => {
1165
+ :default => "$cadir/signed",
1166
+ :type => :directory,
1167
+ :desc => "Where the CA stores signed certificates.",
1168
+ },
1169
+ :serial => {
1170
+ :default => "$cadir/serial",
1171
+ :type => :file,
1172
+ :desc => "Where the serial number for certificates is stored.",
1173
+ },
1174
+ :autosign => {
1175
+ :default => "$confdir/autosign.conf",
1176
+ :type => :autosign,
1177
+ :desc => "Whether (and how) to autosign certificate requests. This setting
1178
+ is only relevant on a Puppet Server acting as a certificate authority (CA).
1179
+
1180
+ Valid values are true (autosigns all certificate requests; not recommended),
1181
+ false (disables autosigning certificates), or the absolute path to a file.
1182
+
1183
+ The file specified in this setting may be either a **configuration file**
1184
+ or a **custom policy executable.** Puppet will automatically determine
1185
+ what it is: If the Puppet user (see the `user` setting) can execute the
1186
+ file, it will be treated as a policy executable; otherwise, it will be
1187
+ treated as a config file.
1188
+
1189
+ If a custom policy executable is configured, the CA Puppet Server will run it
1190
+ every time it receives a CSR. The executable will be passed the subject CN of the
1191
+ request _as a command line argument,_ and the contents of the CSR in PEM format
1192
+ _on stdin._ It should exit with a status of 0 if the cert should be autosigned
1193
+ and non-zero if the cert should not be autosigned.
1194
+
1195
+ If a certificate request is not autosigned, it will persist for review. An admin
1196
+ user can use the `puppetserver ca sign` command to manually sign it, or can delete
1197
+ the request.
1198
+
1199
+ For info on autosign configuration files, see
1200
+ [the guide to Puppet's config files](https://puppet.com/docs/puppet/latest/config_file_autosign.html).",
1201
+ },
1202
+ :allow_duplicate_certs => {
1203
+ :default => false,
1204
+ :type => :boolean,
1205
+ :desc => "Whether to allow a new certificate request to overwrite an existing
1206
+ certificate request. If true, then the old certificate must be cleaned using
1207
+ `puppetserver ca clean`, and the new request signed using `puppetserver ca sign`."
1208
+ },
1209
+ :ca_ttl => {
1210
+ :default => "5y",
1211
+ :type => :duration,
1212
+ :desc => "The default TTL for new certificates.
1213
+ #{AS_DURATION}",
1214
+ },
1215
+ :crl_refresh_interval => {
1216
+ :type => :duration,
1217
+ :desc => "How often the Puppet agent refreshes its local CRL. By
1218
+ default the CRL is only downloaded once, and never refreshed. If a
1219
+ duration is specified, then the agent will refresh its CRL whenever it
1220
+ next runs and the elapsed time since the CRL was last refreshed exceeds
1221
+ the duration.
1222
+
1223
+ In general, the duration should be greater than the `runinterval`.
1224
+ Setting it to an equal or lesser value will cause the CRL to be
1225
+ refreshed on every run.
1226
+
1227
+ If the agent downloads a new CRL, the agent will use it for subsequent
1228
+ network requests. If the refresh request fails or if the CRL is
1229
+ unchanged on the server, then the agent run will continue using the
1230
+ local CRL it already has.#{AS_DURATION}",
1231
+ },
1232
+ :keylength => {
1233
+ :default => 4096,
1234
+ :type => :integer,
1235
+ :desc => "The bit length of keys.",
1236
+ },
1237
+ :cert_inventory => {
1238
+ :default => "$cadir/inventory.txt",
1239
+ :type => :file,
1240
+ :desc => "The inventory file. This is a text file to which the CA writes a
1241
+ complete listing of all certificates.",
1242
+ }
1243
+ )
1244
+
1245
+ # Define the config default.
1246
+
1247
+ settings.define_settings(:application,
1248
+ :config_file_name => {
1249
+ :type => :string,
1250
+ :default => Puppet::Settings.default_config_file_name,
1251
+ :desc => "The name of the puppet config file.",
1252
+ },
1253
+ :config => {
1254
+ :type => :file,
1255
+ :default => "$confdir/${config_file_name}",
1256
+ :desc => "The configuration file for the current puppet application.",
1257
+ },
1258
+ :pidfile => {
1259
+ :type => :file,
1260
+ :default => "$rundir/${run_mode}.pid",
1261
+ :desc => "The file containing the PID of a running process.
1262
+ This file is intended to be used by service management frameworks
1263
+ and monitoring systems to determine if a puppet process is still in
1264
+ the process table.",
1265
+ },
1266
+ :sourceaddress => {
1267
+ :default => nil,
1268
+ :desc => "The address the agent should use to initiate requests.",
1269
+ },
1270
+ )
1271
+
1272
+ settings.define_settings(:environment,
1273
+ :manifest => {
1274
+ :default => nil,
1275
+ :type => :file_or_directory,
1276
+ :desc => "The entry-point manifest for the primary server. This can be one file
1277
+ or a directory of manifests to be evaluated in alphabetical order. Puppet manages
1278
+ this path as a directory if one exists or if the path ends with a / or \\.
1279
+
1280
+ Setting a global value for `manifest` in puppet.conf is not allowed
1281
+ (but it can be overridden from the commandline). Please use
1282
+ directory environments instead. If you need to use something other than the
1283
+ environment's `manifests` directory as the main manifest, you can set
1284
+ `manifest` in environment.conf. For more info, see
1285
+ <https://puppet.com/docs/puppet/latest/environments_about.html>",
1286
+ },
1287
+ :modulepath => {
1288
+ :default => "",
1289
+ :type => :path,
1290
+ :desc => "The search path for modules, as a list of directories separated by the system
1291
+ path separator character. (The POSIX path separator is ':', and the
1292
+ Windows path separator is ';'.)
1293
+
1294
+ Setting a global value for `modulepath` in puppet.conf is not allowed
1295
+ (but it can be overridden from the commandline). Please use
1296
+ directory environments instead. If you need to use something other than the
1297
+ default modulepath of `<ACTIVE ENVIRONMENT'S MODULES DIR>:$basemodulepath`,
1298
+ you can set `modulepath` in environment.conf. For more info, see
1299
+ <https://puppet.com/docs/puppet/latest/environments_about.html>",
1300
+ },
1301
+ :config_version => {
1302
+ :default => "",
1303
+ :desc => "How to determine the configuration version. By default, it will be the
1304
+ time that the configuration is parsed, but you can provide a shell script to override how the
1305
+ version is determined. The output of this script will be added to every log message in the
1306
+ reports, allowing you to correlate changes on your hosts to the source version on the server.
1307
+
1308
+ Setting a global value for config_version in puppet.conf is not allowed
1309
+ (but it can be overridden from the commandline). Please set a
1310
+ per-environment value in environment.conf instead. For more info, see
1311
+ <https://puppet.com/docs/puppet/latest/environments_about.html>",
1312
+ }
1313
+ )
1314
+
1315
+ settings.define_settings(:server,
1316
+ :user => {
1317
+ :default => "puppet",
1318
+ :desc => "The user Puppet Server will run as. Used to ensure
1319
+ the agent side processes (agent, apply, etc) create files and
1320
+ directories readable by Puppet Server when necessary.",
1321
+ },
1322
+ :group => {
1323
+ :default => "puppet",
1324
+ :desc => "The group Puppet Server will run as. Used to ensure
1325
+ the agent side processes (agent, apply, etc) create files and
1326
+ directories readable by Puppet Server when necessary.",
1327
+ },
1328
+ :default_manifest => {
1329
+ :default => "./manifests",
1330
+ :type => :string,
1331
+ :desc => "The default main manifest for directory environments. Any environment that
1332
+ doesn't set the `manifest` setting in its `environment.conf` file will use
1333
+ this manifest.
1334
+
1335
+ This setting's value can be an absolute or relative path. An absolute path
1336
+ will make all environments default to the same main manifest; a relative
1337
+ path will allow each environment to use its own manifest, and Puppet will
1338
+ resolve the path relative to each environment's main directory.
1339
+
1340
+ In either case, the path can point to a single file or to a directory of
1341
+ manifests to be evaluated in alphabetical order.",
1342
+ },
1343
+ :disable_per_environment_manifest => {
1344
+ :default => false,
1345
+ :type => :boolean,
1346
+ :desc => "Whether to disallow an environment-specific main manifest. When set
1347
+ to `true`, Puppet will use the manifest specified in the `default_manifest` setting
1348
+ for all environments. If an environment specifies a different main manifest in its
1349
+ `environment.conf` file, catalog requests for that environment will fail with an error.
1350
+
1351
+ This setting requires `default_manifest` to be set to an absolute path.",
1352
+ :hook => proc do |value|
1353
+ if value && !Pathname.new(Puppet[:default_manifest]).absolute?
1354
+ raise(Puppet::Settings::ValidationError,
1355
+ "The 'default_manifest' setting must be set to an absolute path when 'disable_per_environment_manifest' is true")
1356
+ end
1357
+ end,
1358
+ },
1359
+ :code => {
1360
+ :default => "",
1361
+ :desc => "Code to parse directly. This is essentially only used
1362
+ by `puppet`, and should only be set if you're writing your own Puppet
1363
+ executable.",
1364
+ },
1365
+ :masterport => {
1366
+ :default => 8140,
1367
+ :type => :port,
1368
+ :desc => "The default port puppet subcommands use to communicate
1369
+ with Puppet Server. (eg `puppet facts upload`, `puppet agent`). May be
1370
+ overridden by more specific settings (see `ca_port`, `report_port`).",
1371
+ },
1372
+ :serverport => {
1373
+ :type => :alias,
1374
+ :alias_for => :masterport
1375
+ },
1376
+ :bucketdir => {
1377
+ :default => "$vardir/bucket",
1378
+ :type => :directory,
1379
+ :mode => "0750",
1380
+ :owner => "service",
1381
+ :group => "service",
1382
+ :desc => "Where FileBucket files are stored."
1383
+ },
1384
+ :trusted_oid_mapping_file => {
1385
+ :default => "$confdir/custom_trusted_oid_mapping.yaml",
1386
+ :type => :file,
1387
+ :desc => "File that provides mapping between custom SSL oids and user-friendly names"
1388
+ },
1389
+ :basemodulepath => {
1390
+ :default => lambda { default_basemodulepath },
1391
+ :type => :path,
1392
+ :desc => "The search path for **global** modules. Should be specified as a
1393
+ list of directories separated by the system path separator character. (The
1394
+ POSIX path separator is ':', and the Windows path separator is ';'.)
1395
+
1396
+ These are the modules that will be used by _all_ environments. Note that
1397
+ the `modules` directory of the active environment will have priority over
1398
+ any global directories. For more info, see
1399
+ <https://puppet.com/docs/puppet/latest/environments_about.html>",
1400
+ },
1401
+ :vendormoduledir => {
1402
+ :default => lambda { default_vendormoduledir },
1403
+ :type => :string,
1404
+ :desc => "The directory containing **vendored** modules. These modules will
1405
+ be used by _all_ environments like those in the `basemodulepath`. The only
1406
+ difference is that modules in the `basemodulepath` are pluginsynced, while
1407
+ vendored modules are not",
1408
+ },
1409
+ :ssl_client_header => {
1410
+ :default => "HTTP_X_CLIENT_DN",
1411
+ :desc => "The header containing an authenticated client's SSL DN.
1412
+ This header must be set by the proxy to the authenticated client's SSL
1413
+ DN (e.g., `/CN=puppet.puppetlabs.com`). Puppet will parse out the Common
1414
+ Name (CN) from the Distinguished Name (DN) and use the value of the CN
1415
+ field for authorization.
1416
+
1417
+ Note that the name of the HTTP header gets munged by the web server
1418
+ common gateway interface: an `HTTP_` prefix is added, dashes are converted
1419
+ to underscores, and all letters are uppercased. Thus, to use the
1420
+ `X-Client-DN` header, this setting should be `HTTP_X_CLIENT_DN`.",
1421
+ },
1422
+ :ssl_client_verify_header => {
1423
+ :default => "HTTP_X_CLIENT_VERIFY",
1424
+ :desc => "The header containing the status message of the client
1425
+ verification. This header must be set by the proxy to 'SUCCESS' if the
1426
+ client successfully authenticated, and anything else otherwise.
1427
+
1428
+ Note that the name of the HTTP header gets munged by the web server
1429
+ common gateway interface: an `HTTP_` prefix is added, dashes are converted
1430
+ to underscores, and all letters are uppercased. Thus, to use the
1431
+ `X-Client-Verify` header, this setting should be
1432
+ `HTTP_X_CLIENT_VERIFY`.",
1433
+ },
1434
+ # To make sure this directory is created before we try to use it on the server, we need
1435
+ # it to be in the server section (#1138).
1436
+ :yamldir => {
1437
+ :default => "$vardir/yaml",
1438
+ :type => :directory,
1439
+ :owner => "service",
1440
+ :group => "service",
1441
+ :mode => "0750",
1442
+ :desc => "The directory in which YAML data is stored, usually in a subdirectory."},
1443
+ :server_datadir => {
1444
+ :default => "$vardir/server_data",
1445
+ :type => :directory,
1446
+ :owner => "service",
1447
+ :group => "service",
1448
+ :mode => "0750",
1449
+ :desc => "The directory in which serialized data is stored, usually in a subdirectory."},
1450
+ :reports => {
1451
+ :default => "store",
1452
+ :desc => "The list of report handlers to use. When using multiple report handlers,
1453
+ their names should be comma-separated, with whitespace allowed. (For example,
1454
+ `reports = http, store`.)
1455
+
1456
+ This setting is relevant to puppet server and puppet apply. The primary Puppet
1457
+ server will call these report handlers with the reports it receives from
1458
+ agent nodes, and puppet apply will call them with its own report. (In
1459
+ all cases, the node applying the catalog must have `report = true`.)
1460
+
1461
+ See the report reference for information on the built-in report
1462
+ handlers; custom report handlers can also be loaded from modules.
1463
+ (Report handlers are loaded from the lib directory, at
1464
+ `puppet/reports/NAME.rb`.)
1465
+
1466
+ To turn off reports entirely, set this to `none`",
1467
+ },
1468
+ :exclude_unchanged_resources => {
1469
+ :default => false,
1470
+ :type => :boolean,
1471
+ :desc => 'When set to true, resources that have had no changes after catalog application
1472
+ will not have corresponding unchanged resource status updates listed in the report.'
1473
+ },
1474
+ :reportdir => {
1475
+ :default => "$vardir/reports",
1476
+ :type => :directory,
1477
+ :mode => "0750",
1478
+ :owner => "service",
1479
+ :group => "service",
1480
+ :desc => "The directory in which to store reports. Each node gets
1481
+ a separate subdirectory in this directory. This setting is only
1482
+ used when the `store` report processor is enabled (see the
1483
+ `reports` setting)."},
1484
+ :reporturl => {
1485
+ :default => "http://localhost:3000/reports/upload",
1486
+ :desc => "The URL that reports should be forwarded to. This setting
1487
+ is only used when the `http` report processor is enabled (see the
1488
+ `reports` setting).",
1489
+ },
1490
+ :fileserverconfig => {
1491
+ :default => "$confdir/fileserver.conf",
1492
+ :type => :file,
1493
+ :desc => "Where the fileserver configuration is stored.",
1494
+ })
1495
+
1496
+ settings.define_settings(:device,
1497
+ :devicedir => {
1498
+ :default => "$vardir/devices",
1499
+ :type => :directory,
1500
+ :mode => "0750",
1501
+ :owner => "service",
1502
+ :group => "service",
1503
+ :desc => "The root directory of devices' $vardir.",
1504
+ },
1505
+ :deviceconfig => {
1506
+ :default => "$confdir/device.conf",
1507
+ :desc => "Path to the device config file for puppet device.",
1508
+ }
1509
+ )
1510
+
1511
+ settings.define_settings(:agent,
1512
+ :node_name_value => {
1513
+ :default => "$certname",
1514
+ :desc => "The explicit value used for the node name for all requests the agent
1515
+ makes to the primary server. WARNING: This setting is mutually exclusive with
1516
+ node_name_fact. Changing this setting also requires changes to
1517
+ Puppet Server's default [auth.conf](https://puppet.com/docs/puppetserver/latest/config_file_auth.html)."
1518
+ },
1519
+ :node_name_fact => {
1520
+ :default => "",
1521
+ :desc => "The fact name used to determine the node name used for all requests the agent
1522
+ makes to the primary server. WARNING: This setting is mutually exclusive with
1523
+ node_name_value. Changing this setting also requires changes to
1524
+ Puppet Server's default [auth.conf](https://puppet.com/docs/puppetserver/latest/config_file_auth.html).",
1525
+ :hook => proc do |value|
1526
+ if !value.empty? and Puppet[:node_name_value] != Puppet[:certname]
1527
+ raise "Cannot specify both the node_name_value and node_name_fact settings"
1528
+ end
1529
+ end
1530
+ },
1531
+ :statefile => {
1532
+ :default => "$statedir/state.yaml",
1533
+ :type => :file,
1534
+ :mode => "0640",
1535
+ :desc => "Where Puppet agent and Puppet Server store state associated
1536
+ with the running configuration. In the case of Puppet Server,
1537
+ this file reflects the state discovered through interacting
1538
+ with clients."
1539
+ },
1540
+ :statettl => {
1541
+ :default => "32d",
1542
+ :type => :ttl,
1543
+ :desc => "How long the Puppet agent should cache when a resource was last checked or synced.
1544
+ #{AS_DURATION}
1545
+ A value of `0` or `unlimited` will disable cache pruning.
1546
+
1547
+ This setting affects the usage of `schedule` resources, as the information
1548
+ about when a resource was last checked (and therefore when it needs to be
1549
+ checked again) is stored in the `statefile`. The `statettl` needs to be
1550
+ large enough to ensure that a resource will not trigger multiple times
1551
+ during a schedule due to its entry expiring from the cache."
1552
+ },
1553
+ :transactionstorefile => {
1554
+ :default => "$statedir/transactionstore.yaml",
1555
+ :type => :file,
1556
+ :mode => "0640",
1557
+ :desc => "Transactional storage file for persisting data between
1558
+ transactions for the purposes of inferring information (such as
1559
+ corrective_change) on new data received."
1560
+ },
1561
+ :clientyamldir => {
1562
+ :default => "$vardir/client_yaml",
1563
+ :type => :directory,
1564
+ :mode => "0750",
1565
+ :desc => "The directory in which client-side YAML data is stored."
1566
+ },
1567
+ :client_datadir => {
1568
+ :default => "$vardir/client_data",
1569
+ :type => :directory,
1570
+ :mode => "0750",
1571
+ :desc => "The directory in which serialized data is stored on the client."
1572
+ },
1573
+ :write_catalog_summary => {
1574
+ :default => true,
1575
+ :type => :boolean,
1576
+ :desc => "Whether to write the `classfile` and `resourcefile` after applying
1577
+ the catalog. It is enabled by default, except when running `puppet apply`.",
1578
+ },
1579
+ :classfile => {
1580
+ :default => "$statedir/classes.txt",
1581
+ :type => :file,
1582
+ :owner => "root",
1583
+ :mode => "0640",
1584
+ :desc => "The file in which puppet agent stores a list of the classes
1585
+ associated with the retrieved configuration. Can be loaded in
1586
+ the separate `puppet` executable using the `--loadclasses`
1587
+ option."},
1588
+ :resourcefile => {
1589
+ :default => "$statedir/resources.txt",
1590
+ :type => :file,
1591
+ :owner => "root",
1592
+ :mode => "0640",
1593
+ :desc => "The file in which puppet agent stores a list of the resources
1594
+ associated with the retrieved configuration." },
1595
+ :puppetdlog => {
1596
+ :default => "$logdir/puppetd.log",
1597
+ :type => :file,
1598
+ :owner => "root",
1599
+ :mode => "0640",
1600
+ :desc => "The fallback log file. This is only used when the `--logdest` option
1601
+ is not specified AND Puppet is running on an operating system where both
1602
+ the POSIX syslog service and the Windows Event Log are unavailable. (Currently,
1603
+ no supported operating systems match that description.)
1604
+
1605
+ Despite the name, both puppet agent and puppet server will use this file
1606
+ as the fallback logging destination.
1607
+
1608
+ For control over logging destinations, see the `--logdest` command line
1609
+ option in the manual pages for puppet server, puppet agent, and puppet
1610
+ apply. You can see man pages by running `puppet <SUBCOMMAND> --help`,
1611
+ or read them online at https://puppet.com/docs/puppet/latest/man/."
1612
+ },
1613
+ :deviceconfdir => {
1614
+ :default => "$confdir/devices",
1615
+ :type => :directory,
1616
+ :mode => "0750",
1617
+ :owner => "service",
1618
+ :group => "service",
1619
+ :desc => "The root directory of devices' $confdir.",
1620
+ },
1621
+ :server => {
1622
+ :default => "puppet",
1623
+ :desc => "The primary Puppet server to which the Puppet agent should connect.",
1624
+ },
1625
+ :server_list => {
1626
+ :default => [],
1627
+ :type => :server_list,
1628
+ :desc => "The list of primary Puppet servers to which the Puppet agent should connect,
1629
+ in the order that they will be tried. Each value should be a fully qualified domain name, followed by an optional ':' and port number. If a port is omitted, Puppet uses masterport for that host.",
1630
+ },
1631
+ :use_srv_records => {
1632
+ :default => false,
1633
+ :type => :boolean,
1634
+ :desc => "Whether the server will search for SRV records in DNS for the current domain.",
1635
+ },
1636
+ :srv_domain => {
1637
+ :default => lambda { Puppet::Settings.domain_fact },
1638
+ :desc => "The domain which will be queried to find the SRV records of servers to use.",
1639
+ },
1640
+ :http_extra_headers => {
1641
+ :default => [],
1642
+ :type => :http_extra_headers,
1643
+ :desc => "The list of extra headers that will be sent with http requests to the primary server.
1644
+ The header definition consists of a name and a value separated by a colon."
1645
+ },
1646
+ :ignoreschedules => {
1647
+ :default => false,
1648
+ :type => :boolean,
1649
+ :desc => "Boolean; whether puppet agent should ignore schedules. This is useful
1650
+ for initial puppet agent runs.",
1651
+ },
1652
+ :default_schedules => {
1653
+ :default => true,
1654
+ :type => :boolean,
1655
+ :desc => "Boolean; whether to generate the default schedule resources. Setting this to
1656
+ false is useful for keeping external report processors clean of skipped schedule resources.",
1657
+ },
1658
+ :noop => {
1659
+ :default => false,
1660
+ :type => :boolean,
1661
+ :desc => "Whether to apply catalogs in noop mode, which allows Puppet to
1662
+ partially simulate a normal run. This setting affects puppet agent and
1663
+ puppet apply.
1664
+
1665
+ When running in noop mode, Puppet will check whether each resource is in sync,
1666
+ like it does when running normally. However, if a resource attribute is not in
1667
+ the desired state (as declared in the catalog), Puppet will take no
1668
+ action, and will instead report the changes it _would_ have made. These
1669
+ simulated changes will appear in the report sent to the primary Puppet server, or
1670
+ be shown on the console if running puppet agent or puppet apply in the
1671
+ foreground. The simulated changes will not send refresh events to any
1672
+ subscribing or notified resources, although Puppet will log that a refresh
1673
+ event _would_ have been sent.
1674
+
1675
+ **Important note:**
1676
+ [The `noop` metaparameter](https://puppet.com/docs/puppet/latest/metaparameter.html#noop)
1677
+ allows you to apply individual resources in noop mode, and will override
1678
+ the global value of the `noop` setting. This means a resource with
1679
+ `noop => false` _will_ be changed if necessary, even when running puppet
1680
+ agent with `noop = true` or `--noop`. (Conversely, a resource with
1681
+ `noop => true` will only be simulated, even when noop mode is globally disabled.)",
1682
+ },
1683
+ :runinterval => {
1684
+ :default => "30m",
1685
+ :type => :duration,
1686
+ :desc => "How often puppet agent applies the catalog.
1687
+ Note that a runinterval of 0 means \"run continuously\" rather than
1688
+ \"never run.\" #{AS_DURATION}",
1689
+ },
1690
+ :runtimeout => {
1691
+ :default => "1h",
1692
+ :type => :duration,
1693
+ :desc => "The maximum amount of time an agent run is allowed to take.
1694
+ A Puppet agent run that exceeds this timeout will be aborted. A value
1695
+ of 0 disables the timeout. Defaults to 1 hour. #{AS_DURATION}",
1696
+ },
1697
+ :ca_server => {
1698
+ :default => "$server",
1699
+ :desc => "The server to use for certificate
1700
+ authority requests. It's a separate server because it cannot
1701
+ and does not need to horizontally scale.",
1702
+ },
1703
+ :ca_port => {
1704
+ :default => "$serverport",
1705
+ :type => :port,
1706
+ :desc => "The port to use for the certificate authority.",
1707
+ },
1708
+ :preferred_serialization_format => {
1709
+ :default => "json",
1710
+ :desc => "The preferred means of serializing
1711
+ ruby instances for passing over the wire. This won't guarantee that all
1712
+ instances will be serialized using this method, since not all classes
1713
+ can be guaranteed to support this format, but it will be used for all
1714
+ classes that support it.",
1715
+ },
1716
+ :allow_pson_serialization => {
1717
+ :default => true,
1718
+ :type => :boolean,
1719
+ :desc => "Whether when unable to serialize to JSON or other formats,
1720
+ Puppet falls back to PSON. This option affects both puppetserver's
1721
+ configuration management service responses and when the agent saves its
1722
+ cached catalog. This option is useful in preventing the loss of data because
1723
+ rich data cannot be serialized via PSON.",
1724
+ },
1725
+ :agent_catalog_run_lockfile => {
1726
+ :default => "$statedir/agent_catalog_run.lock",
1727
+ :type => :string, # (#2888) Ensure this file is not added to the settings catalog.
1728
+ :desc => "A lock file to indicate that a puppet agent catalog run is currently in progress.
1729
+ The file contains the pid of the process that holds the lock on the catalog run.",
1730
+ },
1731
+ :agent_disabled_lockfile => {
1732
+ :default => "$statedir/agent_disabled.lock",
1733
+ :type => :string,
1734
+ :desc => "A lock file to indicate that puppet agent runs have been administratively
1735
+ disabled. File contains a JSON object with state information.",
1736
+ },
1737
+ :usecacheonfailure => {
1738
+ :default => true,
1739
+ :type => :boolean,
1740
+ :desc => "Whether to use the cached configuration when the remote
1741
+ configuration will not compile. This option is useful for testing
1742
+ new configurations, where you want to fix the broken configuration
1743
+ rather than reverting to a known-good one.",
1744
+ },
1745
+ :include_legacy_facts => {
1746
+ :type => :boolean,
1747
+ :default => true,
1748
+ :desc => "Whether to include legacy facts when requesting a catalog. This
1749
+ option can be set to false provided all puppet manifests, hiera.yaml and hiera
1750
+ configuration layers no longer access legacy facts, such as `$osfamily`, and
1751
+ instead access structured facts, such as `$facts['os']['family']`."
1752
+ },
1753
+ :fact_name_length_soft_limit => {
1754
+ :default => 2560,
1755
+ :type => :integer,
1756
+ :desc => "The soft limit for the length of a fact name.",
1757
+ },
1758
+ :fact_value_length_soft_limit => {
1759
+ :default => 4096,
1760
+ :type => :integer,
1761
+ :desc => "The soft limit for the length of a fact value.",
1762
+ },
1763
+ :top_level_facts_soft_limit => {
1764
+ :default => 512,
1765
+ :type => :integer,
1766
+ :desc => "The soft limit for the number of top level facts.",
1767
+ },
1768
+ :number_of_facts_soft_limit => {
1769
+ :default => 2048,
1770
+ :type => :integer,
1771
+ :desc => "The soft limit for the total number of fact values. This counts the
1772
+ child elements of all facts (e.g. all items of an array or a hash), not just top
1773
+ level facts.",
1774
+ },
1775
+ :payload_soft_limit => {
1776
+ :default => 16 * 1024 * 1024,
1777
+ :type => :integer,
1778
+ :desc => "The soft limit for the size of the payload.",
1779
+ },
1780
+ :use_cached_catalog => {
1781
+ :default => false,
1782
+ :type => :boolean,
1783
+ :desc => "Whether to only use the cached catalog rather than compiling a new catalog
1784
+ on every run. Puppet can be run with this enabled by default and then selectively
1785
+ disabled when a recompile is desired. Because a Puppet agent using cached catalogs
1786
+ does not contact the primary server for a new catalog, it also does not upload facts at
1787
+ the beginning of the Puppet run.",
1788
+ },
1789
+ :ignoremissingtypes => {
1790
+ :default => false,
1791
+ :type => :boolean,
1792
+ :desc => "Skip searching for classes and definitions that were missing during a
1793
+ prior compilation. The list of missing objects is maintained per-environment and
1794
+ persists until the environment is cleared or the primary server is restarted.",
1795
+ },
1796
+ :splaylimit => {
1797
+ :default => "$runinterval",
1798
+ :type => :duration,
1799
+ :desc => "The maximum time to delay before an agent's first run when
1800
+ `splay` is enabled. Defaults to the agent's `$runinterval`. The
1801
+ `splay` interval is random and recalculated each time the agent is started or
1802
+ restarted. #{AS_DURATION}",
1803
+ },
1804
+ :splay => {
1805
+ :default => false,
1806
+ :type => :boolean,
1807
+ :desc => "Whether to sleep for a random amount of time, ranging from
1808
+ immediately up to its `$splaylimit`, before performing its first agent run
1809
+ after a service restart. After this period, the agent runs periodically
1810
+ on its `$runinterval`.
1811
+
1812
+ For example, assume a default 30-minute `$runinterval`, `splay` set to its
1813
+ default of `false`, and an agent starting at :00 past the hour. The agent
1814
+ would check in every 30 minutes at :01 and :31 past the hour.
1815
+
1816
+ With `splay` enabled, it waits any amount of time up to its `$splaylimit`
1817
+ before its first run. For example, it might randomly wait 8 minutes,
1818
+ then start its first run at :08 past the hour. With the `$runinterval`
1819
+ at its default 30 minutes, its next run will be at :38 past the hour.
1820
+
1821
+ If you restart an agent's puppet service with `splay` enabled, it
1822
+ recalculates its splay period and delays its first agent run after
1823
+ restarting for this new period. If you simultaneously restart a group of
1824
+ puppet agents with `splay` enabled, their checkins to your primary servers
1825
+ can be distributed more evenly.",
1826
+ },
1827
+ :clientbucketdir => {
1828
+ :default => "$vardir/clientbucket",
1829
+ :type => :directory,
1830
+ :mode => "0750",
1831
+ :desc => "Where FileBucket files are stored locally."
1832
+ },
1833
+ :report_server => {
1834
+ :default => "$server",
1835
+ :desc => "The server to send transaction reports to.",
1836
+ },
1837
+ :report_port => {
1838
+ :default => "$serverport",
1839
+ :type => :port,
1840
+ :desc => "The port to communicate with the report_server.",
1841
+ },
1842
+ :report => {
1843
+ :default => true,
1844
+ :type => :boolean,
1845
+ :desc => "Whether to send reports after every transaction.",
1846
+ },
1847
+ :report_include_system_store => {
1848
+ :default => false,
1849
+ :type => :boolean,
1850
+ :desc => "Whether the 'http' report processor should include the system
1851
+ certificate store when submitting reports to HTTPS URLs. If false, then
1852
+ the 'http' processor will only trust HTTPS report servers whose certificates
1853
+ are issued by the puppet CA or one of its intermediate CAs. If true, the
1854
+ processor will additionally trust CA certificates in the system's
1855
+ certificate store."
1856
+ },
1857
+ :resubmit_facts => {
1858
+ :default => false,
1859
+ :type => :boolean,
1860
+ :desc => "Whether to send updated facts after every transaction. By default
1861
+ puppet only submits facts at the beginning of the transaction before applying a
1862
+ catalog. Since puppet can modify the state of the system, the value of the facts
1863
+ may change after puppet finishes. Therefore, any facts stored in puppetdb may not
1864
+ be consistent until the agent next runs, typically in 30 minutes. If this feature
1865
+ is enabled, puppet will resubmit facts after applying its catalog, ensuring facts
1866
+ for the node stored in puppetdb are current. However, this will double the fact
1867
+ submission load on puppetdb, so it is disabled by default.",
1868
+ },
1869
+ :publicdir => {
1870
+ :default => nil,
1871
+ :type => :directory,
1872
+ :mode => "0755",
1873
+ :desc => "Where Puppet stores public files."
1874
+ },
1875
+ :lastrunfile => {
1876
+ :default => "$publicdir/last_run_summary.yaml",
1877
+ :type => :file,
1878
+ :mode => "0640",
1879
+ :desc => "Where puppet agent stores the last run report summary in yaml format."
1880
+ },
1881
+ :lastrunreport => {
1882
+ :default => "$statedir/last_run_report.yaml",
1883
+ :type => :file,
1884
+ :mode => "0640",
1885
+ :desc => "Where Puppet Agent stores the last run report, by default, in yaml format.
1886
+ The format of the report can be changed by setting the `cache` key of the `report` terminus
1887
+ in the [routes.yaml](https://puppet.com/docs/puppet/latest/config_file_routes.html) file.
1888
+ To avoid mismatches between content and file extension, this setting needs to be
1889
+ manually updated to reflect the terminus changes."
1890
+ },
1891
+ :graph => {
1892
+ :default => false,
1893
+ :type => :boolean,
1894
+ :desc => "Whether to create .dot graph files, which let you visualize the
1895
+ dependency and containment relationships in Puppet's catalog. You
1896
+ can load and view these files with tools like
1897
+ [OmniGraffle](http://www.omnigroup.com/applications/omnigraffle/) (OS X)
1898
+ or [graphviz](http://www.graphviz.org/) (multi-platform).
1899
+
1900
+ Graph files are created when _applying_ a catalog, so this setting
1901
+ should be used on nodes running `puppet agent` or `puppet apply`.
1902
+
1903
+ The `graphdir` setting determines where Puppet will save graphs. Note
1904
+ that we don't save graphs for historical runs; Puppet will replace the
1905
+ previous .dot files with new ones every time it applies a catalog.
1906
+
1907
+ See your graphing software's documentation for details on opening .dot
1908
+ files. If you're using GraphViz's `dot` command, you can do a quick PNG
1909
+ render with `dot -Tpng <DOT FILE> -o <OUTPUT FILE>`.",
1910
+ },
1911
+ :graphdir => {
1912
+ :default => "$statedir/graphs",
1913
+ :type => :directory,
1914
+ :desc => "Where to save .dot-format graphs (when the `graph` setting is enabled).",
1915
+ },
1916
+ :waitforcert => {
1917
+ :default => "2m",
1918
+ :type => :duration,
1919
+ :desc => "How frequently puppet agent should ask for a signed certificate.
1920
+
1921
+ When starting for the first time, puppet agent will submit a certificate
1922
+ signing request (CSR) to the server named in the `ca_server` setting
1923
+ (usually the primary Puppet server); this may be autosigned, or may need to be
1924
+ approved by a human, depending on the CA server's configuration.
1925
+
1926
+ Puppet agent cannot apply configurations until its approved certificate is
1927
+ available. Since the certificate may or may not be available immediately,
1928
+ puppet agent will repeatedly try to fetch it at this interval. You can
1929
+ turn off waiting for certificates by specifying a time of 0, or a maximum
1930
+ amount of time to wait in the `maxwaitforcert` setting, in which case
1931
+ puppet agent will exit if it cannot get a cert.
1932
+ #{AS_DURATION}",
1933
+ },
1934
+ :maxwaitforcert => {
1935
+ :default => "unlimited",
1936
+ :type => :ttl,
1937
+ :desc => "The maximum amount of time the Puppet agent should wait for its
1938
+ certificate request to be signed. A value of `unlimited` will cause puppet agent
1939
+ to ask for a signed certificate indefinitely.
1940
+ #{AS_DURATION}",
1941
+ },
1942
+ :waitforlock => {
1943
+ :default => "0",
1944
+ :type => :duration,
1945
+ :desc => "How frequently puppet agent should try running when there is an
1946
+ already ongoing puppet agent instance.
1947
+
1948
+ This argument is by default disabled (value set to 0). In this case puppet agent will
1949
+ immediately exit if it cannot run at that moment. When a value other than 0 is set, this
1950
+ can also be used in combination with the `maxwaitforlock` argument.
1951
+ #{AS_DURATION}",
1952
+ },
1953
+ :maxwaitforlock => {
1954
+ :default => "1m",
1955
+ :type => :ttl,
1956
+ :desc => "The maximum amount of time the puppet agent should wait for an
1957
+ already running puppet agent to finish before starting a new one. This is set by default to 1 minute.
1958
+ A value of `unlimited` will cause puppet agent to wait indefinitely.
1959
+ #{AS_DURATION}",
1960
+ }
1961
+ )
1962
+
1963
+ # Plugin information.
1964
+
1965
+ settings.define_settings(
1966
+ :main,
1967
+ :plugindest => {
1968
+ :type => :directory,
1969
+ :default => "$libdir",
1970
+ :desc => "Where Puppet should store plugins that it pulls down from the central
1971
+ server.",
1972
+ },
1973
+ :pluginsource => {
1974
+ :default => "puppet:///plugins",
1975
+ :desc => "From where to retrieve plugins. The standard Puppet `file` type
1976
+ is used for retrieval, so anything that is a valid file source can
1977
+ be used here.",
1978
+ },
1979
+ :pluginfactdest => {
1980
+ :type => :directory,
1981
+ :default => "$vardir/facts.d",
1982
+ :desc => "Where Puppet should store external facts that are being handled by pluginsync",
1983
+ },
1984
+ :pluginfactsource => {
1985
+ :default => "puppet:///pluginfacts",
1986
+ :desc => "Where to retrieve external facts for pluginsync",
1987
+ },
1988
+ :localedest => {
1989
+ :type => :directory,
1990
+ :default => "$vardir/locales",
1991
+ :desc => "Where Puppet should store translation files that it pulls down from the central
1992
+ server.",
1993
+ },
1994
+ :localesource => {
1995
+ :default => "puppet:///locales",
1996
+ :desc => "From where to retrieve translation files. The standard Puppet `file` type
1997
+ is used for retrieval, so anything that is a valid file source can
1998
+ be used here.",
1999
+ },
2000
+ :pluginsync => {
2001
+ :default => true,
2002
+ :type => :boolean,
2003
+ :desc => "Whether plugins should be synced with the central server. This setting is
2004
+ deprecated.",
2005
+ :hook => proc { |value|
2006
+ #TRANSLATORS 'pluginsync' is a setting and should not be translated
2007
+ Puppet.deprecation_warning(_("Setting 'pluginsync' is deprecated."))
2008
+ }
2009
+ },
2010
+ :pluginsignore => {
2011
+ :default => ".svn CVS .git .hg",
2012
+ :desc => "What files to ignore when pulling down plugins.",
2013
+ },
2014
+ :ignore_plugin_errors => {
2015
+ :default => false,
2016
+ :type => :boolean,
2017
+ :desc => "Whether the puppet run should ignore errors during pluginsync. If the setting
2018
+ is false and there are errors during pluginsync, then the agent will abort the run and
2019
+ submit a report containing information about the failed run."
2020
+ }
2021
+ )
2022
+
2023
+ # Central fact information.
2024
+
2025
+ settings.define_settings(
2026
+ :main,
2027
+ :factpath => {
2028
+ :type => :path,
2029
+ :default => "$vardir/lib/facter#{File::PATH_SEPARATOR}$vardir/facts",
2030
+ :desc => "Where Puppet should look for facts. Multiple directories should
2031
+ be separated by the system path separator character. (The POSIX path
2032
+ separator is ':', and the Windows path separator is ';'.)",
2033
+
2034
+ :call_hook => :on_initialize_and_write, # Call our hook with the default value, so we always get the value added to facter.
2035
+ :hook => proc do |value|
2036
+ paths = value.split(File::PATH_SEPARATOR)
2037
+ facter = Puppet.runtime[:facter]
2038
+ facter.search(*paths)
2039
+ end
2040
+ }
2041
+ )
2042
+
2043
+ settings.define_settings(
2044
+ :transaction,
2045
+ :tags => {
2046
+ :default => "",
2047
+ :desc => "Tags to use to find resources. If this is set, then
2048
+ only resources tagged with the specified tags will be applied.
2049
+ Values must be comma-separated.",
2050
+ },
2051
+ :skip_tags => {
2052
+ :default => "",
2053
+ :desc => "Tags to use to filter resources. If this is set, then
2054
+ only resources not tagged with the specified tags will be applied.
2055
+ Values must be comma-separated.",
2056
+ },
2057
+ :evaltrace => {
2058
+ :default => false,
2059
+ :type => :boolean,
2060
+ :desc => "Whether each resource should log when it is
2061
+ being evaluated. This allows you to interactively see exactly
2062
+ what is being done.",
2063
+ },
2064
+ :preprocess_deferred => {
2065
+ :default => true,
2066
+ :type => :boolean,
2067
+ :desc => "Whether puppet should call deferred functions before applying
2068
+ the catalog. If set to `true`, then all prerequisites needed for the
2069
+ deferred function must be satified prior to puppet running. If set to
2070
+ `false`, then deferred functions will follow puppet relationships and
2071
+ ordering. This allows puppet to install prerequisites needed for a
2072
+ deferred function and call the deferred function in the same run."
2073
+ },
2074
+ :summarize => {
2075
+ :default => false,
2076
+ :type => :boolean,
2077
+ :desc => "Whether to print a transaction summary.",
2078
+ }
2079
+ )
2080
+
2081
+ settings.define_settings(
2082
+ :main,
2083
+ :external_nodes => {
2084
+ :default => "none",
2085
+ :desc => "The external node classifier (ENC) script to use for node data.
2086
+ Puppet combines this data with the main manifest to produce node catalogs.
2087
+
2088
+ To enable this setting, set the `node_terminus` setting to `exec`.
2089
+
2090
+ This setting's value must be the path to an executable command that
2091
+ can produce node information. The command must:
2092
+
2093
+ * Take the name of a node as a command-line argument.
2094
+ * Return a YAML hash with up to three keys:
2095
+ * `classes` --- A list of classes, as an array or hash.
2096
+ * `environment` --- A string.
2097
+ * `parameters` --- A list of top-scope variables to set, as a hash.
2098
+ * For unknown nodes, exit with a non-zero exit code.
2099
+
2100
+ Generally, an ENC script makes requests to an external data source.
2101
+
2102
+ For more info, see [the ENC documentation](https://puppet.com/docs/puppet/latest/nodes_external.html).",
2103
+ }
2104
+ )
2105
+
2106
+ settings.define_settings(
2107
+ :ldap,
2108
+ :ldapssl => {
2109
+ :default => false,
2110
+ :type => :boolean,
2111
+ :desc => "Whether SSL should be used when searching for nodes.
2112
+ Defaults to false because SSL usually requires certificates
2113
+ to be set up on the client side.",
2114
+ },
2115
+ :ldaptls => {
2116
+ :default => false,
2117
+ :type => :boolean,
2118
+ :desc => "Whether TLS should be used when searching for nodes.
2119
+ Defaults to false because TLS usually requires certificates
2120
+ to be set up on the client side.",
2121
+ },
2122
+ :ldapserver => {
2123
+ :default => "ldap",
2124
+ :desc => "The LDAP server.",
2125
+ },
2126
+ :ldapport => {
2127
+ :default => 389,
2128
+ :type => :port,
2129
+ :desc => "The LDAP port.",
2130
+ },
2131
+
2132
+ :ldapstring => {
2133
+ :default => "(&(objectclass=puppetClient)(cn=%s))",
2134
+ :desc => "The search string used to find an LDAP node.",
2135
+ },
2136
+ :ldapclassattrs => {
2137
+ :default => "puppetclass",
2138
+ :desc => "The LDAP attributes to use to define Puppet classes. Values
2139
+ should be comma-separated.",
2140
+ },
2141
+ :ldapstackedattrs => {
2142
+ :default => "puppetvar",
2143
+ :desc => "The LDAP attributes that should be stacked to arrays by adding
2144
+ the values in all hierarchy elements of the tree. Values
2145
+ should be comma-separated.",
2146
+ },
2147
+ :ldapattrs => {
2148
+ :default => "all",
2149
+ :desc => "The LDAP attributes to include when querying LDAP for nodes. All
2150
+ returned attributes are set as variables in the top-level scope.
2151
+ Multiple values should be comma-separated. The value 'all' returns
2152
+ all attributes.",
2153
+ },
2154
+ :ldapparentattr => {
2155
+ :default => "parentnode",
2156
+ :desc => "The attribute to use to define the parent node.",
2157
+ },
2158
+ :ldapuser => {
2159
+ :default => "",
2160
+ :desc => "The user to use to connect to LDAP. Must be specified as a
2161
+ full DN.",
2162
+ },
2163
+ :ldappassword => {
2164
+ :default => "",
2165
+ :desc => "The password to use to connect to LDAP.",
2166
+ },
2167
+ :ldapbase => {
2168
+ :default => "",
2169
+ :desc => "The search base for LDAP searches. It's impossible to provide
2170
+ a meaningful default here, although the LDAP libraries might
2171
+ have one already set. Generally, it should be the 'ou=Hosts'
2172
+ branch under your main directory.",
2173
+ }
2174
+ )
2175
+
2176
+ settings.define_settings(:server,
2177
+ :storeconfigs => {
2178
+ :default => false,
2179
+ :type => :boolean,
2180
+ :desc => "Whether to store each client's configuration, including catalogs, facts,
2181
+ and related data. This also enables the import and export of resources in
2182
+ the Puppet language - a mechanism for exchange resources between nodes.
2183
+
2184
+ By default this uses the 'puppetdb' backend.
2185
+
2186
+ You can adjust the backend using the storeconfigs_backend setting.",
2187
+ # Call our hook with the default value, so we always get the libdir set.
2188
+ :call_hook => :on_initialize_and_write,
2189
+ :hook => proc do |value|
2190
+ require_relative '../puppet/node'
2191
+ require_relative '../puppet/node/facts'
2192
+ if value
2193
+ Puppet::Resource::Catalog.indirection.set_global_setting(:cache_class, :store_configs)
2194
+ settings.override_default(:catalog_cache_terminus, :store_configs)
2195
+ Puppet::Node::Facts.indirection.set_global_setting(:cache_class, :store_configs)
2196
+ Puppet::Resource.indirection.set_global_setting(:terminus_class, :store_configs)
2197
+ end
2198
+ end
2199
+ },
2200
+ :storeconfigs_backend => {
2201
+ :type => :terminus,
2202
+ :default => "puppetdb",
2203
+ :desc => "Configure the backend terminus used for StoreConfigs.
2204
+ By default, this uses the PuppetDB store, which must be installed
2205
+ and configured before turning on StoreConfigs."
2206
+ }
2207
+ )
2208
+
2209
+ settings.define_settings(:parser,
2210
+ :max_errors => {
2211
+ :default => 10,
2212
+ :type => :integer,
2213
+ :desc => <<-'EOT'
2214
+ Sets the max number of logged/displayed parser validation errors in case
2215
+ multiple errors have been detected. A value of 0 is the same as a value of 1; a
2216
+ minimum of one error is always raised. The count is per manifest.
2217
+ EOT
2218
+ },
2219
+ :max_warnings => {
2220
+ :default => 10,
2221
+ :type => :integer,
2222
+ :desc => <<-'EOT'
2223
+ Sets the max number of logged/displayed parser validation warnings in
2224
+ case multiple warnings have been detected. A value of 0 blocks logging of
2225
+ warnings. The count is per manifest.
2226
+ EOT
2227
+ },
2228
+ :max_deprecations => {
2229
+ :default => 10,
2230
+ :type => :integer,
2231
+ :desc => <<-'EOT'
2232
+ Sets the max number of logged/displayed parser validation deprecation
2233
+ warnings in case multiple deprecation warnings have been detected. A value of 0
2234
+ blocks the logging of deprecation warnings. The count is per manifest.
2235
+ EOT
2236
+ },
2237
+ :strict_variables => {
2238
+ :default => false,
2239
+ :type => :boolean,
2240
+ :desc => <<-'EOT'
2241
+ Causes an evaluation error when referencing unknown variables. (This does not affect
2242
+ referencing variables that are explicitly set to undef).
2243
+ EOT
2244
+ },
2245
+ :tasks => {
2246
+ :default => false,
2247
+ :type => :boolean,
2248
+ :desc => <<-'EOT'
2249
+ Turns on experimental support for tasks and plans in the puppet language. This is for internal API use only.
2250
+ Do not change this setting.
2251
+ EOT
2252
+ }
2253
+ )
2254
+ settings.define_settings(:puppetdoc,
2255
+ :document_all => {
2256
+ :default => false,
2257
+ :type => :boolean,
2258
+ :desc => "Whether to document all resources when using `puppet doc` to
2259
+ generate manifest documentation.",
2260
+ }
2261
+ )
2262
+
2263
+ settings.define_settings(
2264
+ :main,
2265
+ :rich_data => {
2266
+ :default => true,
2267
+ :type => :boolean,
2268
+ :desc => <<-'EOT'
2269
+ Enables having extended data in the catalog by storing them as a hash with the special key
2270
+ `__ptype`. When enabled, resource containing values of the data types `Binary`, `Regexp`,
2271
+ `SemVer`, `SemVerRange`, `Timespan` and `Timestamp`, as well as instances of types derived
2272
+ from `Object` retain their data type.
2273
+ EOT
2274
+ }
2275
+ )
2276
+ end
2277
+ end