openvox 8.19.0

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