puppet 6.23.0-universal-darwin → 6.26.0-universal-darwin

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

Potentially problematic release.


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

Files changed (397) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +5 -5
  3. data/Gemfile +4 -4
  4. data/Gemfile.lock +32 -25
  5. data/README.md +4 -4
  6. data/{ext → examples/enc}/regexp_nodes/classes/databases +0 -0
  7. data/{ext → examples/enc}/regexp_nodes/classes/webservers +0 -0
  8. data/{ext → examples/enc}/regexp_nodes/environment/development +0 -0
  9. data/{ext → examples/enc}/regexp_nodes/parameters/service/prod +0 -0
  10. data/{ext → examples/enc}/regexp_nodes/parameters/service/qa +0 -0
  11. data/{ext → examples/enc}/regexp_nodes/parameters/service/sandbox +0 -0
  12. data/{ext → examples/enc}/regexp_nodes/regexp_nodes.rb +0 -0
  13. data/{ext → examples}/nagios/check_puppet.rb +2 -2
  14. data/ext/README.md +13 -0
  15. data/ext/project_data.yaml +1 -0
  16. data/lib/puppet/application/agent.rb +4 -0
  17. data/lib/puppet/application/apply.rb +20 -2
  18. data/lib/puppet/application/filebucket.rb +1 -0
  19. data/lib/puppet/application/lookup.rb +78 -24
  20. data/lib/puppet/application/resource.rb +30 -15
  21. data/lib/puppet/application/ssl.rb +1 -0
  22. data/lib/puppet/concurrent/thread_local_singleton.rb +6 -3
  23. data/lib/puppet/configurer.rb +134 -56
  24. data/lib/puppet/confine/variable.rb +1 -1
  25. data/lib/puppet/defaults.rb +55 -32
  26. data/lib/puppet/environments.rb +75 -25
  27. data/lib/puppet/face/facts.rb +1 -1
  28. data/lib/puppet/face/generate.rb +2 -0
  29. data/lib/puppet/face/help/action.erb +1 -0
  30. data/lib/puppet/face/help/face.erb +1 -0
  31. data/lib/puppet/face/node/clean.rb +11 -0
  32. data/lib/puppet/facter_impl.rb +96 -0
  33. data/lib/puppet/file_serving/configuration/parser.rb +2 -0
  34. data/lib/puppet/file_serving/configuration.rb +3 -0
  35. data/lib/puppet/file_serving/metadata.rb +3 -0
  36. data/lib/puppet/file_serving/mount/file.rb +4 -4
  37. data/lib/puppet/file_serving/mount/scripts.rb +24 -0
  38. data/lib/puppet/file_system/file_impl.rb +10 -8
  39. data/lib/puppet/file_system/jruby.rb +1 -1
  40. data/lib/puppet/file_system/windows.rb +6 -6
  41. data/lib/puppet/file_system.rb +1 -1
  42. data/lib/puppet/forge.rb +4 -4
  43. data/lib/puppet/functions/empty.rb +8 -0
  44. data/lib/puppet/functions/find_template.rb +2 -2
  45. data/lib/puppet/functions/strftime.rb +1 -0
  46. data/lib/puppet/functions/unwrap.rb +17 -2
  47. data/lib/puppet/functions/versioncmp.rb +6 -2
  48. data/lib/puppet/generate/type.rb +9 -0
  49. data/lib/puppet/http/client.rb +1 -1
  50. data/lib/puppet/http/redirector.rb +5 -0
  51. data/lib/puppet/http/service/compiler.rb +6 -1
  52. data/lib/puppet/indirector/catalog/compiler.rb +24 -6
  53. data/lib/puppet/indirector/catalog/rest.rb +1 -0
  54. data/lib/puppet/indirector/facts/facter.rb +6 -6
  55. data/lib/puppet/indirector/indirection.rb +1 -1
  56. data/lib/puppet/indirector/resource/ral.rb +6 -1
  57. data/lib/puppet/indirector/terminus.rb +4 -0
  58. data/lib/puppet/interface/documentation.rb +1 -0
  59. data/lib/puppet/module/plan.rb +0 -1
  60. data/lib/puppet/module/task.rb +1 -1
  61. data/lib/puppet/module.rb +1 -0
  62. data/lib/puppet/module_tool/applications/installer.rb +12 -4
  63. data/lib/puppet/module_tool/applications/uninstaller.rb +1 -1
  64. data/lib/puppet/module_tool/applications/upgrader.rb +1 -1
  65. data/lib/puppet/module_tool/errors/shared.rb +17 -0
  66. data/lib/puppet/network/http/api/indirected_routes.rb +1 -1
  67. data/lib/puppet/node/environment.rb +10 -11
  68. data/lib/puppet/node.rb +1 -1
  69. data/lib/puppet/pal/pal_impl.rb +1 -1
  70. data/lib/puppet/parser/resource.rb +1 -1
  71. data/lib/puppet/parser/scope.rb +1 -0
  72. data/lib/puppet/parser/templatewrapper.rb +1 -0
  73. data/lib/puppet/pops/evaluator/closure.rb +7 -5
  74. data/lib/puppet/pops/evaluator/runtime3_resource_support.rb +1 -0
  75. data/lib/puppet/pops/lookup/lookup_adapter.rb +3 -2
  76. data/lib/puppet/pops/model/ast.rb +1 -0
  77. data/lib/puppet/pops/model/factory.rb +2 -1
  78. data/lib/puppet/pops/parser/code_merger.rb +4 -4
  79. data/lib/puppet/pops/parser/egrammar.ra +2 -0
  80. data/lib/puppet/pops/parser/eparser.rb +1014 -995
  81. data/lib/puppet/pops/parser/lexer2.rb +92 -91
  82. data/lib/puppet/pops/parser/slurp_support.rb +1 -0
  83. data/lib/puppet/pops/serialization/to_stringified_converter.rb +1 -1
  84. data/lib/puppet/pops/types/type_formatter.rb +4 -3
  85. data/lib/puppet/pops/types/type_mismatch_describer.rb +1 -1
  86. data/lib/puppet/pops/types/types.rb +1 -1
  87. data/lib/puppet/provider/aix_object.rb +1 -1
  88. data/lib/puppet/provider/exec/posix.rb +16 -4
  89. data/lib/puppet/provider/group/groupadd.rb +5 -2
  90. data/lib/puppet/provider/package/pip.rb +15 -3
  91. data/lib/puppet/provider/package/pkg.rb +19 -2
  92. data/lib/puppet/provider/package/puppetserver_gem.rb +1 -1
  93. data/lib/puppet/provider/package/yum.rb +1 -1
  94. data/lib/puppet/provider/parsedfile.rb +3 -0
  95. data/lib/puppet/provider/service/base.rb +1 -1
  96. data/lib/puppet/provider/service/init.rb +10 -9
  97. data/lib/puppet/provider/service/launchd.rb +2 -2
  98. data/lib/puppet/provider/service/redhat.rb +1 -1
  99. data/lib/puppet/provider/service/smf.rb +3 -3
  100. data/lib/puppet/provider/service/systemd.rb +2 -2
  101. data/lib/puppet/provider/service/upstart.rb +5 -5
  102. data/lib/puppet/provider/user/aix.rb +44 -1
  103. data/lib/puppet/provider/user/directoryservice.rb +1 -1
  104. data/lib/puppet/provider/user/useradd.rb +72 -16
  105. data/lib/puppet/provider.rb +1 -1
  106. data/lib/puppet/reference/providers.rb +2 -2
  107. data/lib/puppet/resource/catalog.rb +1 -1
  108. data/lib/puppet/resource/type_collection.rb +1 -0
  109. data/lib/puppet/resource.rb +38 -5
  110. data/lib/puppet/runtime.rb +11 -1
  111. data/lib/puppet/settings.rb +32 -9
  112. data/lib/puppet/ssl/verifier.rb +6 -0
  113. data/lib/puppet/test/test_helper.rb +4 -1
  114. data/lib/puppet/transaction/persistence.rb +21 -1
  115. data/lib/puppet/transaction/report.rb +15 -1
  116. data/lib/puppet/type/exec.rb +35 -5
  117. data/lib/puppet/type/file/data_sync.rb +1 -1
  118. data/lib/puppet/type/file/mode.rb +6 -0
  119. data/lib/puppet/type/file.rb +6 -6
  120. data/lib/puppet/type/filebucket.rb +3 -3
  121. data/lib/puppet/type/group.rb +0 -1
  122. data/lib/puppet/type/resources.rb +1 -1
  123. data/lib/puppet/type/service.rb +8 -3
  124. data/lib/puppet/type/tidy.rb +1 -1
  125. data/lib/puppet/type/user.rb +40 -39
  126. data/lib/puppet/type.rb +1 -1
  127. data/lib/puppet/util/command_line.rb +1 -1
  128. data/lib/puppet/util/filetype.rb +2 -2
  129. data/lib/puppet/util/json.rb +20 -0
  130. data/lib/puppet/util/log.rb +8 -4
  131. data/lib/puppet/util/logging.rb +1 -25
  132. data/lib/puppet/util/monkey_patches.rb +6 -0
  133. data/lib/puppet/util/package.rb +25 -16
  134. data/lib/puppet/util/pidlock.rb +1 -1
  135. data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +1 -1
  136. data/lib/puppet/util/suidmanager.rb +1 -2
  137. data/lib/puppet/util/symbolic_file_mode.rb +29 -17
  138. data/lib/puppet/util/tagging.rb +1 -0
  139. data/lib/puppet/util/windows/service.rb +0 -5
  140. data/lib/puppet/util/windows/sid.rb +3 -1
  141. data/lib/puppet/util/windows/user.rb +0 -2
  142. data/lib/puppet/util/windows.rb +3 -0
  143. data/lib/puppet/util/yaml.rb +21 -2
  144. data/lib/puppet/util.rb +4 -3
  145. data/lib/puppet/version.rb +1 -1
  146. data/lib/puppet.rb +6 -9
  147. data/locales/puppet.pot +5 -10418
  148. data/man/man5/puppet.conf.5 +52 -25
  149. data/man/man8/puppet-agent.8 +4 -1
  150. data/man/man8/puppet-apply.8 +1 -1
  151. data/man/man8/puppet-catalog.8 +9 -9
  152. data/man/man8/puppet-config.8 +1 -1
  153. data/man/man8/puppet-describe.8 +1 -1
  154. data/man/man8/puppet-device.8 +1 -1
  155. data/man/man8/puppet-doc.8 +1 -1
  156. data/man/man8/puppet-epp.8 +1 -1
  157. data/man/man8/puppet-facts.8 +8 -8
  158. data/man/man8/puppet-filebucket.8 +1 -1
  159. data/man/man8/puppet-generate.8 +1 -1
  160. data/man/man8/puppet-help.8 +1 -1
  161. data/man/man8/puppet-key.8 +7 -7
  162. data/man/man8/puppet-lookup.8 +9 -6
  163. data/man/man8/puppet-man.8 +1 -1
  164. data/man/man8/puppet-module.8 +3 -3
  165. data/man/man8/puppet-node.8 +5 -5
  166. data/man/man8/puppet-parser.8 +1 -1
  167. data/man/man8/puppet-plugin.8 +1 -1
  168. data/man/man8/puppet-report.8 +5 -5
  169. data/man/man8/puppet-resource.8 +1 -1
  170. data/man/man8/puppet-script.8 +1 -1
  171. data/man/man8/puppet-ssl.8 +1 -1
  172. data/man/man8/puppet-status.8 +4 -4
  173. data/man/man8/puppet.8 +2 -2
  174. data/spec/fixtures/integration/application/agent/cached_deferred_catalog.json +2 -1
  175. data/spec/fixtures/integration/application/agent/lib/facter/agent_spec_role.rb +3 -0
  176. data/spec/fixtures/integration/l10n/envs/prod/modules/demo/Gemfile +4 -0
  177. data/spec/fixtures/integration/l10n/envs/prod/modules/demo/Rakefile +3 -0
  178. data/spec/fixtures/integration/l10n/envs/prod/modules/demo/lib/puppet/functions/l10n.rb +8 -0
  179. data/spec/fixtures/integration/l10n/envs/prod/modules/demo/locales/config.yaml +25 -0
  180. data/spec/fixtures/integration/l10n/envs/prod/modules/demo/locales/ja/puppet-l10n.po +19 -0
  181. data/spec/fixtures/integration/l10n/envs/prod/modules/demo/locales/puppet-l10n.pot +20 -0
  182. data/spec/fixtures/integration/l10n/envs/prod/modules/demo/metadata.json +8 -0
  183. data/spec/fixtures/ssl/127.0.0.1-key.pem +106 -106
  184. data/spec/fixtures/ssl/127.0.0.1.pem +48 -48
  185. data/spec/fixtures/ssl/bad-basic-constraints.pem +54 -54
  186. data/spec/fixtures/ssl/bad-int-basic-constraints.pem +51 -51
  187. data/spec/fixtures/ssl/ca.pem +52 -52
  188. data/spec/fixtures/ssl/crl.pem +25 -25
  189. data/spec/fixtures/ssl/ec-key.pem +11 -11
  190. data/spec/fixtures/ssl/ec.pem +32 -32
  191. data/spec/fixtures/ssl/encrypted-ec-key.pem +12 -12
  192. data/spec/fixtures/ssl/encrypted-key.pem +107 -107
  193. data/spec/fixtures/ssl/intermediate-agent-crl.pem +25 -25
  194. data/spec/fixtures/ssl/intermediate-agent.pem +54 -54
  195. data/spec/fixtures/ssl/intermediate-crl.pem +28 -28
  196. data/spec/fixtures/ssl/intermediate.pem +51 -51
  197. data/spec/fixtures/ssl/oid-key.pem +117 -0
  198. data/spec/fixtures/ssl/oid.pem +69 -0
  199. data/spec/fixtures/ssl/pluto-key.pem +106 -106
  200. data/spec/fixtures/ssl/pluto.pem +50 -50
  201. data/spec/fixtures/ssl/request-key.pem +106 -106
  202. data/spec/fixtures/ssl/request.pem +45 -45
  203. data/spec/fixtures/ssl/revoked-key.pem +106 -106
  204. data/spec/fixtures/ssl/revoked.pem +49 -49
  205. data/spec/fixtures/ssl/signed-key.pem +106 -106
  206. data/spec/fixtures/ssl/signed.pem +47 -47
  207. data/spec/fixtures/ssl/tampered-cert.pem +49 -49
  208. data/spec/fixtures/ssl/tampered-csr.pem +45 -45
  209. data/spec/fixtures/ssl/trusted_oid_mapping.yaml +5 -0
  210. data/spec/fixtures/ssl/unknown-127.0.0.1-key.pem +106 -106
  211. data/spec/fixtures/ssl/unknown-127.0.0.1.pem +48 -48
  212. data/spec/fixtures/ssl/unknown-ca-key.pem +106 -106
  213. data/spec/fixtures/ssl/unknown-ca.pem +52 -52
  214. data/spec/fixtures/unit/forge/bacula.json +1 -1
  215. data/spec/integration/application/agent_spec.rb +141 -37
  216. data/spec/integration/application/filebucket_spec.rb +16 -0
  217. data/spec/integration/application/lookup_spec.rb +32 -6
  218. data/spec/integration/application/module_spec.rb +21 -0
  219. data/spec/integration/application/resource_spec.rb +35 -1
  220. data/spec/integration/application/ssl_spec.rb +20 -0
  221. data/spec/integration/configurer_spec.rb +18 -2
  222. data/spec/integration/environments/settings_interpolation_spec.rb +0 -4
  223. data/spec/integration/indirector/facts/facter_spec.rb +93 -39
  224. data/spec/integration/l10n/compiler_spec.rb +37 -0
  225. data/spec/integration/parser/pcore_resource_spec.rb +10 -0
  226. data/spec/integration/transaction/report_spec.rb +1 -1
  227. data/spec/integration/type/exec_spec.rb +70 -45
  228. data/spec/integration/type/file_spec.rb +2 -2
  229. data/spec/integration/type/package_spec.rb +6 -6
  230. data/spec/integration/util/rdoc/parser_spec.rb +1 -1
  231. data/spec/integration/util/windows/process_spec.rb +1 -9
  232. data/spec/lib/puppet/test_ca.rb +5 -0
  233. data/spec/lib/puppet_spec/modules.rb +13 -2
  234. data/spec/lib/puppet_spec/puppetserver.rb +15 -0
  235. data/spec/lib/puppet_spec/settings.rb +1 -0
  236. data/spec/shared_behaviours/documentation_on_faces.rb +0 -2
  237. data/spec/shared_contexts/l10n.rb +32 -0
  238. data/spec/spec_helper.rb +1 -10
  239. data/spec/unit/application/apply_spec.rb +76 -56
  240. data/spec/unit/application/lookup_spec.rb +131 -10
  241. data/spec/unit/application/resource_spec.rb +29 -0
  242. data/spec/unit/concurrent/thread_local_singleton_spec.rb +39 -0
  243. data/spec/unit/configurer_spec.rb +265 -57
  244. data/spec/unit/defaults_spec.rb +1 -0
  245. data/spec/unit/environments_spec.rb +184 -0
  246. data/spec/unit/face/generate_spec.rb +64 -0
  247. data/spec/unit/facter_impl_spec.rb +31 -0
  248. data/spec/unit/file_bucket/dipper_spec.rb +2 -2
  249. data/spec/unit/file_serving/configuration/parser_spec.rb +23 -0
  250. data/spec/unit/file_serving/configuration_spec.rb +14 -4
  251. data/spec/unit/file_serving/mount/scripts_spec.rb +69 -0
  252. data/spec/unit/file_system_spec.rb +47 -4
  253. data/spec/unit/forge/module_release_spec.rb +3 -3
  254. data/spec/unit/functions/assert_type_spec.rb +1 -1
  255. data/spec/unit/functions/empty_spec.rb +10 -0
  256. data/spec/unit/functions/logging_spec.rb +1 -0
  257. data/spec/unit/functions/lookup_spec.rb +64 -0
  258. data/spec/unit/functions/unwrap_spec.rb +8 -0
  259. data/spec/unit/functions/versioncmp_spec.rb +40 -4
  260. data/spec/unit/functions4_spec.rb +2 -2
  261. data/spec/unit/http/client_spec.rb +58 -1
  262. data/spec/unit/http/service/compiler_spec.rb +8 -0
  263. data/spec/unit/indirector/catalog/compiler_spec.rb +87 -0
  264. data/spec/unit/indirector/catalog/rest_spec.rb +8 -0
  265. data/spec/unit/indirector/indirection_spec.rb +10 -3
  266. data/spec/unit/indirector/resource/ral_spec.rb +40 -75
  267. data/spec/unit/interface/action_spec.rb +0 -9
  268. data/spec/unit/module_spec.rb +15 -1
  269. data/spec/unit/module_tool/applications/installer_spec.rb +51 -12
  270. data/spec/unit/network/authstore_spec.rb +0 -15
  271. data/spec/unit/network/formats_spec.rb +6 -0
  272. data/spec/unit/node_spec.rb +6 -0
  273. data/spec/unit/parser/templatewrapper_spec.rb +12 -2
  274. data/spec/unit/pops/parser/parse_containers_spec.rb +2 -13
  275. data/spec/unit/pops/serialization/to_stringified_spec.rb +5 -0
  276. data/spec/unit/pops/types/type_calculator_spec.rb +6 -0
  277. data/spec/unit/pops/validator/validator_spec.rb +5 -0
  278. data/spec/unit/provider/package/gem_spec.rb +1 -1
  279. data/spec/unit/provider/package/pip2_spec.rb +1 -1
  280. data/spec/unit/provider/package/pip3_spec.rb +1 -1
  281. data/spec/unit/provider/package/pip_spec.rb +38 -1
  282. data/spec/unit/provider/package/pkg_spec.rb +29 -4
  283. data/spec/unit/provider/package/puppet_gem_spec.rb +1 -1
  284. data/spec/unit/provider/package/puppetserver_gem_spec.rb +1 -1
  285. data/spec/unit/provider/parsedfile_spec.rb +10 -0
  286. data/spec/unit/provider/service/gentoo_spec.rb +6 -5
  287. data/spec/unit/provider/service/init_spec.rb +15 -9
  288. data/spec/unit/provider/service/launchd_spec.rb +11 -0
  289. data/spec/unit/provider/service/openwrt_spec.rb +21 -29
  290. data/spec/unit/provider/service/redhat_spec.rb +3 -2
  291. data/spec/unit/provider/service/systemd_spec.rb +1 -1
  292. data/spec/unit/provider/user/aix_spec.rb +100 -0
  293. data/spec/unit/provider/user/directoryservice_spec.rb +1 -1
  294. data/spec/unit/provider/user/useradd_spec.rb +43 -2
  295. data/spec/unit/provider_spec.rb +4 -4
  296. data/spec/unit/puppet_spec.rb +12 -4
  297. data/spec/unit/resource/catalog_spec.rb +14 -1
  298. data/spec/unit/resource_spec.rb +58 -2
  299. data/spec/unit/settings_spec.rb +97 -56
  300. data/spec/unit/ssl/certificate_request_spec.rb +8 -14
  301. data/spec/unit/transaction/persistence_spec.rb +51 -0
  302. data/spec/unit/type/exec_spec.rb +76 -29
  303. data/spec/unit/type/file/source_spec.rb +4 -4
  304. data/spec/unit/type/service_spec.rb +27 -0
  305. data/spec/unit/type/tidy_spec.rb +7 -0
  306. data/spec/unit/type/user_spec.rb +0 -45
  307. data/spec/unit/type_spec.rb +2 -2
  308. data/spec/unit/util/json_spec.rb +126 -0
  309. data/spec/unit/util/logging_spec.rb +2 -0
  310. data/spec/unit/util/windows/sid_spec.rb +39 -4
  311. data/spec/unit/util/yaml_spec.rb +54 -29
  312. data/tasks/generate_cert_fixtures.rake +10 -1
  313. data/tasks/parallel.rake +3 -3
  314. metadata +52 -96
  315. data/ext/README.environment +0 -8
  316. data/ext/dbfix.sql +0 -132
  317. data/ext/debian/README.Debian +0 -8
  318. data/ext/debian/README.source +0 -2
  319. data/ext/debian/TODO.Debian +0 -1
  320. data/ext/debian/changelog.erb +0 -1122
  321. data/ext/debian/compat +0 -1
  322. data/ext/debian/control +0 -144
  323. data/ext/debian/copyright +0 -339
  324. data/ext/debian/docs +0 -1
  325. data/ext/debian/fileserver.conf +0 -41
  326. data/ext/debian/puppet-common.dirs +0 -13
  327. data/ext/debian/puppet-common.install +0 -3
  328. data/ext/debian/puppet-common.lintian-overrides +0 -5
  329. data/ext/debian/puppet-common.manpages +0 -28
  330. data/ext/debian/puppet-common.postinst +0 -35
  331. data/ext/debian/puppet-common.postrm +0 -33
  332. data/ext/debian/puppet-el.dirs +0 -1
  333. data/ext/debian/puppet-el.emacsen-install +0 -25
  334. data/ext/debian/puppet-el.emacsen-remove +0 -11
  335. data/ext/debian/puppet-el.emacsen-startup +0 -9
  336. data/ext/debian/puppet-el.install +0 -1
  337. data/ext/debian/puppet-testsuite.install +0 -2
  338. data/ext/debian/puppet-testsuite.lintian-overrides +0 -4
  339. data/ext/debian/puppet.lintian-overrides +0 -3
  340. data/ext/debian/puppet.logrotate +0 -20
  341. data/ext/debian/puppet.postinst +0 -20
  342. data/ext/debian/puppet.postrm +0 -20
  343. data/ext/debian/puppet.preinst +0 -20
  344. data/ext/debian/puppetmaster-common.install +0 -2
  345. data/ext/debian/puppetmaster-common.manpages +0 -2
  346. data/ext/debian/puppetmaster-common.postinst +0 -6
  347. data/ext/debian/puppetmaster-passenger.dirs +0 -4
  348. data/ext/debian/puppetmaster-passenger.postinst +0 -162
  349. data/ext/debian/puppetmaster-passenger.postrm +0 -61
  350. data/ext/debian/puppetmaster.README.debian +0 -17
  351. data/ext/debian/puppetmaster.default +0 -14
  352. data/ext/debian/puppetmaster.init +0 -137
  353. data/ext/debian/puppetmaster.lintian-overrides +0 -3
  354. data/ext/debian/puppetmaster.postinst +0 -20
  355. data/ext/debian/puppetmaster.postrm +0 -5
  356. data/ext/debian/puppetmaster.preinst +0 -22
  357. data/ext/debian/rules +0 -132
  358. data/ext/debian/source/format +0 -1
  359. data/ext/debian/source/options +0 -1
  360. data/ext/debian/vim-puppet.README.Debian +0 -13
  361. data/ext/debian/vim-puppet.dirs +0 -5
  362. data/ext/debian/vim-puppet.yaml +0 -7
  363. data/ext/debian/watch +0 -2
  364. data/ext/freebsd/puppetd +0 -26
  365. data/ext/freebsd/puppetmasterd +0 -26
  366. data/ext/gentoo/conf.d/puppet +0 -5
  367. data/ext/gentoo/conf.d/puppetmaster +0 -12
  368. data/ext/gentoo/init.d/puppet +0 -38
  369. data/ext/gentoo/init.d/puppetmaster +0 -51
  370. data/ext/gentoo/puppet/fileserver.conf +0 -41
  371. data/ext/ips/puppet-agent +0 -44
  372. data/ext/ips/puppet-master +0 -44
  373. data/ext/ips/puppet.p5m.erb +0 -12
  374. data/ext/ips/puppetagent.xml +0 -42
  375. data/ext/ips/puppetmaster.xml +0 -42
  376. data/ext/ips/rules +0 -19
  377. data/ext/ips/transforms +0 -34
  378. data/ext/ldap/puppet.schema +0 -24
  379. data/ext/logcheck/puppet +0 -23
  380. data/ext/osx/file_mapping.yaml +0 -33
  381. data/ext/osx/postflight.erb +0 -109
  382. data/ext/osx/preflight.erb +0 -52
  383. data/ext/osx/prototype.plist.erb +0 -38
  384. data/ext/redhat/fileserver.conf +0 -41
  385. data/ext/redhat/logrotate +0 -21
  386. data/ext/redhat/puppet.spec.erb +0 -842
  387. data/ext/redhat/server.init +0 -128
  388. data/ext/redhat/server.sysconfig +0 -13
  389. data/ext/solaris/pkginfo +0 -6
  390. data/ext/solaris/smf/puppetd.xml +0 -77
  391. data/ext/solaris/smf/puppetmasterd.xml +0 -77
  392. data/ext/solaris/smf/svc-puppetd +0 -71
  393. data/ext/solaris/smf/svc-puppetmasterd +0 -67
  394. data/ext/suse/puppet.spec +0 -310
  395. data/ext/suse/server.init +0 -173
  396. data/ext/yaml_nodes.rb +0 -105
  397. data/spec/unit/indirector/store_configs_spec.rb +0 -7
@@ -91,7 +91,7 @@ class Puppet::Configurer
91
91
 
92
92
  if result
93
93
  # don't use use cached catalog if it doesn't match server specified environment
94
- if @node_environment && result.environment != @environment
94
+ if result.environment != @environment
95
95
  Puppet.err _("Not using cached catalog because its environment '%{catalog_env}' does not match '%{local_env}'") % { catalog_env: result.environment, local_env: @environment }
96
96
  return nil
97
97
  end
@@ -118,8 +118,11 @@ class Puppet::Configurer
118
118
  catalog = result.to_ral
119
119
  catalog.finalize
120
120
  catalog.retrieval_duration = duration
121
- catalog.write_class_file
122
- catalog.write_resource_file
121
+
122
+ if Puppet[:write_catalog_summary]
123
+ catalog.write_class_file
124
+ catalog.write_resource_file
125
+ end
123
126
  end
124
127
  options[:report].add_times(:convert_catalog, catalog_conversion_time) if options[:report]
125
128
 
@@ -257,6 +260,7 @@ class Puppet::Configurer
257
260
 
258
261
  def run_internal(options)
259
262
  report = options[:report]
263
+ report.initial_environment = Puppet[:environment]
260
264
 
261
265
  if options[:start_time]
262
266
  startup_time = Time.now - options[:start_time]
@@ -296,69 +300,42 @@ class Puppet::Configurer
296
300
  configured_environment = Puppet[:environment] if Puppet.settings.set_by_config?(:environment)
297
301
 
298
302
  # We only need to find out the environment to run in if we don't already have a catalog
299
- unless (cached_catalog || options[:catalog] || Puppet[:strict_environment_mode])
300
- begin
301
- node = nil
302
- node_retr_time = thinmark do
303
- node = Puppet::Node.indirection.find(Puppet[:node_name_value],
304
- :environment => Puppet::Node::Environment.remote(@environment),
305
- :configured_environment => configured_environment,
306
- :ignore_cache => true,
307
- :transaction_uuid => @transaction_uuid,
308
- :fail_on_404 => true)
309
- end
310
- options[:report].add_times(:node_retrieval, node_retr_time)
303
+ unless (cached_catalog || options[:catalog] || Puppet.settings.set_by_cli?(:environment) || Puppet[:strict_environment_mode])
304
+ Puppet.debug(_("Environment not passed via CLI and no catalog was given, attempting to find out the last server-specified environment"))
305
+ initial_environment, loaded_last_environment = last_server_specified_environment
311
306
 
312
- if node
313
- # If we have deserialized a node from a rest call, we want to set
314
- # an environment instance as a simple 'remote' environment reference.
315
- if !node.has_environment_instance? && node.environment_name
316
- node.environment = Puppet::Node::Environment.remote(node.environment_name)
317
- end
307
+ unless Puppet[:use_last_environment] && loaded_last_environment
308
+ Puppet.debug(_("Requesting environment from the server"))
309
+ initial_environment = current_server_specified_environment(@environment, configured_environment, options)
310
+ end
318
311
 
319
- @node_environment = node.environment.to_s
320
-
321
- if node.environment.to_s != @environment
322
- Puppet.notice _("Local environment: '%{local_env}' doesn't match server specified node environment '%{node_env}', switching agent to '%{node_env}'.") % { local_env: @environment, node_env: node.environment }
323
- @environment = node.environment.to_s
324
- report.environment = @environment
325
- query_options = nil
326
- facts = nil
327
-
328
- new_env = Puppet::Node::Environment.remote(@environment)
329
- Puppet.push_context(
330
- {
331
- current_environment: new_env,
332
- loaders: Puppet::Pops::Loaders.new(new_env, true)
333
- },
334
- "Local node environment #{@environment} for configurer transaction"
335
- )
336
- else
337
- Puppet.info _("Using configured environment '%{env}'") % { env: @environment }
338
- end
339
- end
340
- rescue StandardError => detail
341
- Puppet.warning(_("Unable to fetch my node definition, but the agent run will continue:"))
342
- Puppet.warning(detail)
312
+ if initial_environment
313
+ @environment = initial_environment
314
+ report.environment = initial_environment
315
+
316
+ push_current_environment_and_loaders
317
+ else
318
+ Puppet.debug(_("Could not find a usable environment in the lastrunfile. Either the file does not exist, does not have the required keys, or the values of 'initial_environment' and 'converged_environment' are identical."))
343
319
  end
344
320
  end
345
321
 
322
+ Puppet.info _("Using environment '%{env}'") % { env: @environment }
323
+
346
324
  # This is to maintain compatibility with anyone using this class
347
325
  # aside from agent, apply, device.
348
326
  unless Puppet.lookup(:loaders) { nil }
349
- new_env = Puppet::Node::Environment.remote(@environment)
350
- Puppet.push_context(
351
- {
352
- current_environment: new_env,
353
- loaders: Puppet::Pops::Loaders.new(new_env, true)
354
- },
355
- "Local node environment #{@environment} for configurer transaction"
356
- )
327
+ push_current_environment_and_loaders
357
328
  end
358
329
 
330
+ temp_value = options[:pluginsync]
331
+
332
+ # only validate server environment if pluginsync is requested
333
+ options[:pluginsync] = valid_server_environment? if options[:pluginsync] == true
334
+
359
335
  query_options, facts = get_facts(options) unless query_options
336
+ options[:pluginsync] = temp_value
337
+
360
338
  query_options[:configured_environment] = configured_environment
361
- options[:convert_for_node] = node
362
339
 
363
340
  catalog = prepare_and_retrieve_catalog(cached_catalog, facts, options, query_options)
364
341
  unless catalog
@@ -383,6 +360,8 @@ class Puppet::Configurer
383
360
  @environment = catalog.environment
384
361
  report.environment = @environment
385
362
 
363
+ push_current_environment_and_loaders
364
+
386
365
  query_options, facts = get_facts(options)
387
366
  query_options[:configured_environment] = configured_environment
388
367
 
@@ -456,6 +435,25 @@ class Puppet::Configurer
456
435
  end
457
436
  private :run_internal
458
437
 
438
+ def valid_server_environment?
439
+ session = Puppet.lookup(:http_session)
440
+ begin
441
+ fs = session.route_to(:fileserver)
442
+ fs.get_file_metadatas(path: URI(Puppet[:pluginsource]).path, recurse: :false, environment: @environment)
443
+ true
444
+ rescue Puppet::HTTP::ResponseError => detail
445
+ if detail.response.code == 404
446
+ Puppet.notice(_("Environment '%{environment}' not found on server, skipping initial pluginsync.") % { environment: @environment })
447
+ else
448
+ Puppet.log_exception(detail, detail.message)
449
+ end
450
+ false
451
+ rescue => detail
452
+ Puppet.log_exception(detail, detail.message)
453
+ false
454
+ end
455
+ end
456
+
459
457
  def find_functional_server
460
458
  begin
461
459
  session = Puppet.lookup(:http_session)
@@ -472,10 +470,78 @@ class Puppet::Configurer
472
470
  end
473
471
  private :find_functional_server
474
472
 
473
+ #
474
+ # @api private
475
+ #
476
+ # Read the last server-specified environment from the lastrunfile. The
477
+ # environment is considered to be server-specified if the values of
478
+ # `initial_environment` and `converged_environment` are different.
479
+ #
480
+ # @return [String, Boolean] An array containing a string with the environment
481
+ # read from the lastrunfile in case the server is authoritative, and a
482
+ # boolean marking whether the last environment was correctly loaded.
483
+ def last_server_specified_environment
484
+ return @last_server_specified_environment, @loaded_last_environment if @last_server_specified_environment
485
+
486
+ if Puppet::FileSystem.exist?(Puppet[:lastrunfile])
487
+ summary = Puppet::Util::Yaml.safe_load_file(Puppet[:lastrunfile])
488
+ return [nil, nil] unless summary['application']['run_mode'] == 'agent'
489
+ initial_environment = summary['application']['initial_environment']
490
+ converged_environment = summary['application']['converged_environment']
491
+ @last_server_specified_environment = converged_environment if initial_environment != converged_environment
492
+ Puppet.debug(_("Successfully loaded last environment from the lastrunfile"))
493
+ @loaded_last_environment = true
494
+ end
495
+
496
+ Puppet.debug(_("Found last server-specified environment: %{environment}") % { environment: @last_server_specified_environment }) if @last_server_specified_environment
497
+ [@last_server_specified_environment, @loaded_last_environment]
498
+ rescue => detail
499
+ Puppet.debug(_("Could not find last server-specified environment: %{detail}") % { detail: detail })
500
+ [nil, nil]
501
+ end
502
+ private :last_server_specified_environment
503
+
504
+ def current_server_specified_environment(current_environment, configured_environment, options)
505
+ return @server_specified_environment if @server_specified_environment
506
+
507
+ begin
508
+ node_retr_time = thinmark do
509
+ node = Puppet::Node.indirection.find(Puppet[:node_name_value],
510
+ :environment => Puppet::Node::Environment.remote(current_environment),
511
+ :configured_environment => configured_environment,
512
+ :ignore_cache => true,
513
+ :transaction_uuid => @transaction_uuid,
514
+ :fail_on_404 => true)
515
+
516
+ @server_specified_environment = node.environment_name.to_s
517
+
518
+ if @server_specified_environment != @environment
519
+ Puppet.notice _("Local environment: '%{local_env}' doesn't match server specified node environment '%{node_env}', switching agent to '%{node_env}'.") % { local_env: @environment, node_env: @server_specified_environment }
520
+ end
521
+ end
522
+
523
+ options[:report].add_times(:node_retrieval, node_retr_time)
524
+
525
+ @server_specified_environment
526
+ rescue => detail
527
+ Puppet.warning(_("Unable to fetch my node definition, but the agent run will continue:"))
528
+ Puppet.warning(detail)
529
+ nil
530
+ end
531
+ end
532
+ private :current_server_specified_environment
533
+
475
534
  def send_report(report)
476
535
  puts report.summary if Puppet[:summarize]
477
536
  save_last_run_summary(report)
478
- Puppet::Transaction::Report.indirection.save(report, nil, :environment => Puppet::Node::Environment.remote(@environment)) if Puppet[:report]
537
+ if Puppet[:report]
538
+ remote = Puppet::Node::Environment.remote(@environment)
539
+ begin
540
+ Puppet::Transaction::Report.indirection.save(report, nil, ignore_cache: true, environment: remote)
541
+ ensure
542
+ Puppet::Transaction::Report.indirection.save(report, nil, ignore_terminus: true, environment: remote)
543
+ end
544
+ end
479
545
  rescue => detail
480
546
  Puppet.log_exception(detail, _("Could not send report: %{detail}") % { detail: detail })
481
547
  end
@@ -498,7 +564,7 @@ class Puppet::Configurer
498
564
  # @return [false] If an exception is raised during fact generation or
499
565
  # submission.
500
566
  def resubmit_facts
501
- ::Facter.clear
567
+ Puppet.runtime[:facter].clear
502
568
  facts = find_facts
503
569
 
504
570
  client = Puppet.runtime[:http]
@@ -533,6 +599,17 @@ class Puppet::Configurer
533
599
  end
534
600
  end
535
601
 
602
+ def push_current_environment_and_loaders
603
+ new_env = Puppet::Node::Environment.remote(@environment)
604
+ Puppet.push_context(
605
+ {
606
+ :current_environment => new_env,
607
+ :loaders => Puppet::Pops::Loaders.new(new_env, true)
608
+ },
609
+ "Local node environment #{@environment} for configurer transaction"
610
+ )
611
+ end
612
+
536
613
  def retrieve_catalog_from_cache(query_options)
537
614
  result = nil
538
615
  @duration = thinmark do
@@ -560,6 +637,7 @@ class Puppet::Configurer
560
637
  # don't update cache until after environment converges
561
638
  :ignore_cache_save => true,
562
639
  :environment => Puppet::Node::Environment.remote(@environment),
640
+ :check_environment => true,
563
641
  :fail_on_404 => true,
564
642
  :facts_for_catalog => facts
565
643
  )
@@ -18,7 +18,7 @@ class Puppet::Confine::Variable < Puppet::Confine
18
18
 
19
19
  # Retrieve the value from facter
20
20
  def facter_value
21
- @facter_value ||= ::Facter.value(name).to_s.downcase
21
+ @facter_value ||= Puppet.runtime[:facter].value(name).to_s.downcase
22
22
  end
23
23
 
24
24
  def initialize(values)
@@ -3,7 +3,7 @@ require 'puppet/util/platform'
3
3
  module Puppet
4
4
 
5
5
  def self.default_diffargs
6
- if (Facter.value(:kernel) == "AIX" && Facter.value(:kernelmajversion) == "5300")
6
+ if (Puppet.runtime[:facter].value(:kernel) == "AIX" && Puppet.runtime[:facter].value(:kernelmajversion) == "5300")
7
7
  ""
8
8
  else
9
9
  "-u"
@@ -90,7 +90,7 @@ module Puppet
90
90
  This setting is still experimental.',
91
91
  :hook => proc do |value|
92
92
  value = munge(value)
93
- if value && Puppet::Util::Package.versioncmp(Facter.value('facterversion'), '4.0.0') < 0
93
+ if value && Puppet::Util::Package.versioncmp(Puppet.runtime[:facter].value('facterversion'), '4.0.0') < 0
94
94
  begin
95
95
  original_facter = Object.const_get(:Facter)
96
96
  Object.send(:remove_const, :Facter)
@@ -218,7 +218,7 @@ module Puppet
218
218
 
219
219
  The strictness level is for both language semantics and runtime
220
220
  evaluation validation. In addition to controlling the behavior with
221
- this master switch some individual warnings may also be controlled
221
+ this primary server switch some individual warnings may also be controlled
222
222
  by the disable_warnings setting.
223
223
 
224
224
  No new validations will be added to a micro (x.y.z) release,
@@ -262,7 +262,7 @@ module Puppet
262
262
  internal Ruby stack trace interleaved with Puppet function frames.",
263
263
  :hook => proc do |value|
264
264
  # Enable or disable Facter's trace option too
265
- Facter.trace(value) if Facter.respond_to? :trace
265
+ Puppet.runtime[:facter].trace(value)
266
266
  end
267
267
  },
268
268
  :puppet_trace => {
@@ -294,7 +294,7 @@ module Puppet
294
294
  :default => true,
295
295
  :type => :boolean,
296
296
  :desc => "Whether to compile a [static catalog](https://puppet.com/docs/puppet/latest/static_catalogs.html#enabling-or-disabling-static-catalogs),
297
- which occurs only on a Puppet Server master when the `code-id-command` and
297
+ which occurs only on Puppet Server when the `code-id-command` and
298
298
  `code-content-command` settings are configured in its `puppetserver.conf` file.",
299
299
  },
300
300
  :strict_environment_mode => {
@@ -412,13 +412,13 @@ module Puppet
412
412
  :default => "production",
413
413
  :desc => "The environment in which Puppet is running. For clients,
414
414
  such as `puppet agent`, this determines the environment itself, which
415
- Puppet uses to find modules and much more. For servers, such as `puppet master`,
415
+ Puppet uses to find modules and much more. For servers, such as `puppet server`,
416
416
  this provides the default environment for nodes that Puppet knows nothing about.
417
417
 
418
418
  When defining an environment in the `[agent]` section, this refers to the
419
- environment that the agent requests from the master. The environment doesn't
419
+ environment that the agent requests from the primary server. The environment doesn't
420
420
  have to exist on the local filesystem because the agent fetches it from the
421
- master. This definition is used when running `puppet agent`.
421
+ primary server. This definition is used when running `puppet agent`.
422
422
 
423
423
  When defined in the `[user]` section, the environment refers to the path that
424
424
  Puppet uses to search for code and modules related to its execution. This
@@ -442,6 +442,17 @@ module Puppet
442
442
  <https://puppet.com/docs/puppet/latest/environments_about.html>",
443
443
  :type => :path,
444
444
  },
445
+ :use_last_environment => {
446
+ :type => :boolean,
447
+ :default => true,
448
+ :desc => <<-'EOT'
449
+ Puppet saves both the initial and converged environment in the last_run_summary file.
450
+ If they differ, and this setting is set to true, we will use the last converged
451
+ environment and skip the node request.
452
+
453
+ When set to false, we will do the node request and ignore the environment data from the last_run_summary file.
454
+ EOT
455
+ },
445
456
  :always_retry_plugins => {
446
457
  :type => :boolean,
447
458
  :default => true,
@@ -800,6 +811,12 @@ Valid values are 0 (never cache) and 15 (15 second minimum wait time).
800
811
  :owner => "service",
801
812
  :group => "service",
802
813
  :desc => "The directory where catalog previews per node are generated."
814
+ },
815
+ :location_trusted => {
816
+ :default => false,
817
+ :type => :boolean,
818
+ :desc => "This will allow sending the name + password and the cookie header to all hosts that puppet may redirect to.
819
+ 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."
803
820
  }
804
821
  )
805
822
 
@@ -830,7 +847,7 @@ Valid values are 0 (never cache) and 15 (15 second minimum wait time).
830
847
  :certname => {
831
848
  :default => lambda { Puppet::Settings.default_certname.downcase },
832
849
  :desc => "The name to use when handling certificates. When a node
833
- requests a certificate from the CA puppet master, it uses the value of the
850
+ requests a certificate from the CA Puppet Server, it uses the value of the
834
851
  `certname` setting as its requested Subject CN.
835
852
 
836
853
  This is the name used when managing a node's permissions in
@@ -893,7 +910,7 @@ EOT
893
910
  :desc => <<EOT
894
911
  An optional file containing custom attributes to add to certificate signing
895
912
  requests (CSRs). You should ensure that this file does not exist on your CA
896
- puppet master; if it does, unwanted certificate extensions may leak into
913
+ Puppet Server; if it does, unwanted certificate extensions may leak into
897
914
  certificates created with the `puppetserver ca generate` command.
898
915
 
899
916
  If present, this file must be a YAML hash containing a `custom_attributes` key
@@ -1205,7 +1222,7 @@ EOT
1205
1222
  :default => "$confdir/autosign.conf",
1206
1223
  :type => :autosign,
1207
1224
  :desc => "Whether (and how) to autosign certificate requests. This setting
1208
- is only relevant on a puppet master acting as a certificate authority (CA).
1225
+ is only relevant on a Puppet Server acting as a certificate authority (CA).
1209
1226
 
1210
1227
  Valid values are true (autosigns all certificate requests; not recommended),
1211
1228
  false (disables autosigning certificates), or the absolute path to a file.
@@ -1216,7 +1233,7 @@ EOT
1216
1233
  file, it will be treated as a policy executable; otherwise, it will be
1217
1234
  treated as a config file.
1218
1235
 
1219
- If a custom policy executable is configured, the CA puppet master will run it
1236
+ If a custom policy executable is configured, the CA Puppet Server will run it
1220
1237
  every time it receives a CSR. The executable will be passed the subject CN of the
1221
1238
  request _as a command line argument,_ and the contents of the CSR in PEM format
1222
1239
  _on stdin._ It should exit with a status of 0 if the cert should be autosigned
@@ -1302,7 +1319,7 @@ EOT
1302
1319
  :manifest => {
1303
1320
  :default => nil,
1304
1321
  :type => :file_or_directory,
1305
- :desc => "The entry-point manifest for puppet master. This can be one file
1322
+ :desc => "The entry-point manifest for the primary server. This can be one file
1306
1323
  or a directory of manifests to be evaluated in alphabetical order. Puppet manages
1307
1324
  this path as a directory if one exists or if the path ends with a / or \\.
1308
1325
 
@@ -1509,8 +1526,8 @@ EOT
1509
1526
  their names should be comma-separated, with whitespace allowed. (For example,
1510
1527
  `reports = http, store`.)
1511
1528
 
1512
- This setting is relevant to puppet master and puppet apply. The puppet
1513
- master will call these report handlers with the reports it receives from
1529
+ This setting is relevant to puppet server and puppet apply. The primary Puppet
1530
+ server will call these report handlers with the reports it receives from
1514
1531
  agent nodes, and puppet apply will call them with its own report. (In
1515
1532
  all cases, the node applying the catalog must have `report = true`.)
1516
1533
 
@@ -1578,7 +1595,7 @@ EOT
1578
1595
  :node_name_value => {
1579
1596
  :default => "$certname",
1580
1597
  :desc => "The explicit value used for the node name for all requests the agent
1581
- makes to the master. WARNING: This setting is mutually exclusive with
1598
+ makes to the primary server. WARNING: This setting is mutually exclusive with
1582
1599
  node_name_fact. Changing this setting also requires changes to the default
1583
1600
  auth.conf configuration on the Puppet Master. Please see
1584
1601
  http://links.puppet.com/node_name_value for more information."
@@ -1586,7 +1603,7 @@ EOT
1586
1603
  :node_name_fact => {
1587
1604
  :default => "",
1588
1605
  :desc => "The fact name used to determine the node name used for all requests the agent
1589
- makes to the master. WARNING: This setting is mutually exclusive with
1606
+ makes to the primary server. WARNING: This setting is mutually exclusive with
1590
1607
  node_name_value. Changing this setting also requires changes to the default
1591
1608
  auth.conf configuration on the Puppet Master. Please see
1592
1609
  http://links.puppet.com/node_name_fact for more information.",
@@ -1600,8 +1617,8 @@ EOT
1600
1617
  :default => "$statedir/state.yaml",
1601
1618
  :type => :file,
1602
1619
  :mode => "0640",
1603
- :desc => "Where puppet agent and puppet master store state associated
1604
- with the running configuration. In the case of puppet master,
1620
+ :desc => "Where Puppet agent and Puppet Server store state associated
1621
+ with the running configuration. In the case of Puppet Server,
1605
1622
  this file reflects the state discovered through interacting
1606
1623
  with clients."
1607
1624
  },
@@ -1638,6 +1655,12 @@ EOT
1638
1655
  :mode => "0750",
1639
1656
  :desc => "The directory in which serialized data is stored on the client."
1640
1657
  },
1658
+ :write_catalog_summary => {
1659
+ :default => true,
1660
+ :type => :boolean,
1661
+ :desc => "Whether to write the `classfile` and `resourcefile` after applying
1662
+ the catalog. It is enabled by default, except when running `puppet apply`.",
1663
+ },
1641
1664
  :classfile => {
1642
1665
  :default => "$statedir/classes.txt",
1643
1666
  :type => :file,
@@ -1664,11 +1687,11 @@ EOT
1664
1687
  the POSIX syslog service and the Windows Event Log are unavailable. (Currently,
1665
1688
  no supported operating systems match that description.)
1666
1689
 
1667
- Despite the name, both puppet agent and puppet master will use this file
1690
+ Despite the name, both puppet agent and puppet server will use this file
1668
1691
  as the fallback logging destination.
1669
1692
 
1670
1693
  For control over logging destinations, see the `--logdest` command line
1671
- option in the manual pages for puppet master, puppet agent, and puppet
1694
+ option in the manual pages for puppet server, puppet agent, and puppet
1672
1695
  apply. You can see man pages by running `puppet <SUBCOMMAND> --help`,
1673
1696
  or read them online at https://puppet.com/docs/puppet/latest/man/."
1674
1697
  },
@@ -1682,12 +1705,12 @@ EOT
1682
1705
  },
1683
1706
  :server => {
1684
1707
  :default => "puppet",
1685
- :desc => "The puppet master server to which the puppet agent should connect.",
1708
+ :desc => "The primary Puppet server to which the Puppet agent should connect.",
1686
1709
  },
1687
1710
  :server_list => {
1688
1711
  :default => [],
1689
1712
  :type => :server_list,
1690
- :desc => "The list of puppet master servers to which the puppet agent should connect,
1713
+ :desc => "The list of primary Puppet servers to which the Puppet agent should connect,
1691
1714
  in the order that they will be tried.",
1692
1715
  },
1693
1716
  :use_srv_records => {
@@ -1702,7 +1725,7 @@ EOT
1702
1725
  :http_extra_headers => {
1703
1726
  :default => [],
1704
1727
  :type => :http_extra_headers,
1705
- :desc => "The list of extra headers that will be sent with http requests to the master.
1728
+ :desc => "The list of extra headers that will be sent with http requests to the primary server.
1706
1729
  The header definition consists of a name and a value separated by a colon."
1707
1730
  },
1708
1731
  :ignoreschedules => {
@@ -1728,7 +1751,7 @@ EOT
1728
1751
  like it does when running normally. However, if a resource attribute is not in
1729
1752
  the desired state (as declared in the catalog), Puppet will take no
1730
1753
  action, and will instead report the changes it _would_ have made. These
1731
- simulated changes will appear in the report sent to the puppet master, or
1754
+ simulated changes will appear in the report sent to the primary Puppet server, or
1732
1755
  be shown on the console if running puppet agent or puppet apply in the
1733
1756
  foreground. The simulated changes will not send refresh events to any
1734
1757
  subscribing or notified resources, although Puppet will log that a refresh
@@ -1800,7 +1823,7 @@ EOT
1800
1823
  :desc => "Whether to only use the cached catalog rather than compiling a new catalog
1801
1824
  on every run. Puppet can be run with this enabled by default and then selectively
1802
1825
  disabled when a recompile is desired. Because a Puppet agent using cached catalogs
1803
- does not contact the master for a new catalog, it also does not upload facts at
1826
+ does not contact the primary server for a new catalog, it also does not upload facts at
1804
1827
  the beginning of the Puppet run.",
1805
1828
  },
1806
1829
  :ignoremissingtypes => {
@@ -1808,7 +1831,7 @@ EOT
1808
1831
  :type => :boolean,
1809
1832
  :desc => "Skip searching for classes and definitions that were missing during a
1810
1833
  prior compilation. The list of missing objects is maintained per-environment and
1811
- persists until the environment is cleared or the master is restarted.",
1834
+ persists until the environment is cleared or the primary server is restarted.",
1812
1835
  },
1813
1836
  :splaylimit => {
1814
1837
  :default => "$runinterval",
@@ -1838,7 +1861,7 @@ EOT
1838
1861
  If you restart an agent's puppet service with `splay` enabled, it
1839
1862
  recalculates its splay period and delays its first agent run after
1840
1863
  restarting for this new period. If you simultaneously restart a group of
1841
- puppet agents with `splay` enabled, their checkins to your puppet masters
1864
+ puppet agents with `splay` enabled, their checkins to your primary servers
1842
1865
  can be distributed more evenly.",
1843
1866
  },
1844
1867
  :clientbucketdir => {
@@ -1930,7 +1953,7 @@ EOT
1930
1953
 
1931
1954
  When starting for the first time, puppet agent will submit a certificate
1932
1955
  signing request (CSR) to the server named in the `ca_server` setting
1933
- (usually the puppet master); this may be autosigned, or may need to be
1956
+ (usually the primary Puppet server); this may be autosigned, or may need to be
1934
1957
  approved by a human, depending on the CA server's configuration.
1935
1958
 
1936
1959
  Puppet agent cannot apply configurations until its approved certificate is
@@ -2044,7 +2067,9 @@ EOT
2044
2067
  :call_hook => :on_initialize_and_write, # Call our hook with the default value, so we always get the value added to facter.
2045
2068
  :hook => proc do |value|
2046
2069
  paths = value.split(File::PATH_SEPARATOR)
2047
- Facter.search(*paths)
2070
+ facter = Puppet.runtime[:facter]
2071
+ facter.reset
2072
+ facter.search(*paths)
2048
2073
  end
2049
2074
  }
2050
2075
  )
@@ -2185,8 +2210,6 @@ EOT
2185
2210
  # Call our hook with the default value, so we always get the libdir set.
2186
2211
  :call_hook => :on_initialize_and_write,
2187
2212
  :hook => proc do |value|
2188
- require 'puppet/node'
2189
- require 'puppet/node/facts'
2190
2213
  if value
2191
2214
  Puppet::Resource::Catalog.indirection.set_global_setting(:cache_class, :store_configs)
2192
2215
  settings.override_default(:catalog_cache_terminus, :store_configs)