puppet 6.11.1-x86-mingw32 → 6.16.0-x86-mingw32
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.
- checksums.yaml +4 -4
- data/CODEOWNERS +3 -8
- data/CONTRIBUTING.md +7 -13
- data/Gemfile +1 -0
- data/Gemfile.lock +39 -36
- data/README.md +17 -24
- data/ext/build_defaults.yaml +1 -0
- data/ext/project_data.yaml +1 -1
- data/ext/windows/service/daemon.rb +25 -20
- data/lib/puppet.rb +52 -13
- data/lib/puppet/agent.rb +20 -14
- data/lib/puppet/application/agent.rb +12 -14
- data/lib/puppet/application/describe.rb +7 -5
- data/lib/puppet/application/device.rb +2 -2
- data/lib/puppet/application/filebucket.rb +19 -15
- data/lib/puppet/application/plugin.rb +1 -0
- data/lib/puppet/application/resource.rb +1 -1
- data/lib/puppet/application/ssl.rb +4 -4
- data/lib/puppet/concurrent.rb +2 -0
- data/lib/puppet/concurrent/lock.rb +16 -0
- data/lib/puppet/concurrent/synchronized.rb +15 -0
- data/lib/puppet/concurrent/thread_local_singleton.rb +14 -0
- data/lib/puppet/configurer.rb +85 -83
- data/lib/puppet/configurer/plugin_handler.rb +10 -1
- data/lib/puppet/context/trusted_information.rb +14 -8
- data/lib/puppet/daemon.rb +13 -27
- data/lib/puppet/defaults.rb +158 -40
- data/lib/puppet/environments.rb +30 -20
- data/lib/puppet/error.rb +9 -1
- data/lib/puppet/face/facts.rb +8 -5
- data/lib/puppet/face/help.rb +29 -3
- data/lib/puppet/face/module/search.rb +5 -0
- data/lib/puppet/face/plugin.rb +2 -2
- data/lib/puppet/file_serving/http_metadata.rb +1 -1
- data/lib/puppet/file_system/file_impl.rb +13 -9
- data/lib/puppet/file_system/memory_file.rb +6 -0
- data/lib/puppet/file_system/memory_impl.rb +13 -0
- data/lib/puppet/file_system/uniquefile.rb +4 -0
- data/lib/puppet/file_system/windows.rb +7 -10
- data/lib/puppet/forge.rb +3 -3
- data/lib/puppet/forge/errors.rb +2 -2
- data/lib/puppet/forge/repository.rb +31 -86
- data/lib/puppet/functions/call.rb +1 -1
- data/lib/puppet/functions/camelcase.rb +2 -2
- data/lib/puppet/functions/epp.rb +4 -4
- data/lib/puppet/functions/eyaml_lookup_key.rb +13 -8
- data/lib/puppet/functions/filter.rb +1 -0
- data/lib/puppet/functions/find_file.rb +9 -9
- data/lib/puppet/functions/find_template.rb +63 -0
- data/lib/puppet/functions/inline_epp.rb +5 -5
- data/lib/puppet/functions/reduce.rb +2 -4
- data/lib/puppet/http.rb +7 -0
- data/lib/puppet/http/client.rb +341 -54
- data/lib/puppet/http/errors.rb +2 -0
- data/lib/puppet/http/external_client.rb +90 -0
- data/lib/puppet/http/redirector.rb +34 -0
- data/lib/puppet/http/resolver.rb +57 -1
- data/lib/puppet/http/resolver/server_list.rb +98 -0
- data/lib/puppet/http/resolver/settings.rb +23 -2
- data/lib/puppet/http/resolver/srv.rb +36 -4
- data/lib/puppet/http/response.rb +68 -1
- data/lib/puppet/http/retry_after_handler.rb +39 -0
- data/lib/puppet/http/service.rb +179 -3
- data/lib/puppet/http/service/ca.rb +84 -21
- data/lib/puppet/http/service/compiler.rb +319 -0
- data/lib/puppet/http/service/file_server.rb +206 -0
- data/lib/puppet/http/service/report.rb +66 -0
- data/lib/puppet/http/session.rb +106 -31
- data/lib/puppet/indirector/catalog/compiler.rb +10 -0
- data/lib/puppet/indirector/catalog/rest.rb +34 -0
- data/lib/puppet/indirector/facts/rest.rb +42 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +1 -1
- data/lib/puppet/indirector/file_bucket_file/rest.rb +48 -0
- data/lib/puppet/indirector/file_content/http.rb +5 -0
- data/lib/puppet/indirector/file_content/rest.rb +30 -0
- data/lib/puppet/indirector/file_metadata/http.rb +4 -4
- data/lib/puppet/indirector/file_metadata/rest.rb +52 -0
- data/lib/puppet/indirector/json.rb +1 -1
- data/lib/puppet/indirector/msgpack.rb +1 -1
- data/lib/puppet/indirector/node/rest.rb +24 -0
- data/lib/puppet/indirector/report/rest.rb +19 -0
- data/lib/puppet/indirector/report/yaml.rb +23 -0
- data/lib/puppet/indirector/rest.rb +12 -0
- data/lib/puppet/indirector/status/rest.rb +18 -0
- data/lib/puppet/loaders.rb +6 -0
- data/lib/puppet/metatype/manager.rb +80 -80
- data/lib/puppet/network/http/base_pool.rb +19 -1
- data/lib/puppet/network/http/compression.rb +7 -0
- data/lib/puppet/network/http/connection.rb +6 -0
- data/lib/puppet/network/http/connection_adapter.rb +182 -0
- data/lib/puppet/network/http/nocache_pool.rb +2 -0
- data/lib/puppet/network/http/pool.rb +13 -6
- data/lib/puppet/network/http_pool.rb +2 -1
- data/lib/puppet/node/environment.rb +24 -8
- data/lib/puppet/pal/catalog_compiler.rb +5 -0
- data/lib/puppet/pal/pal_impl.rb +9 -29
- data/lib/puppet/parser/ast/pops_bridge.rb +6 -11
- data/lib/puppet/parser/compiler.rb +42 -32
- data/lib/puppet/parser/functions.rb +18 -13
- data/lib/puppet/parser/functions/epp.rb +3 -3
- data/lib/puppet/parser/functions/filter.rb +1 -0
- data/lib/puppet/parser/functions/inline_epp.rb +5 -5
- data/lib/puppet/pops/evaluator/access_operator.rb +2 -2
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_support.rb +1 -1
- data/lib/puppet/pops/loader/puppet_plan_instantiator.rb +12 -3
- data/lib/puppet/pops/loaders.rb +7 -5
- data/lib/puppet/pops/lookup/invocation.rb +10 -3
- data/lib/puppet/pops/model/pn_transformer.rb +5 -9
- data/lib/puppet/pops/parser/evaluating_parser.rb +8 -11
- data/lib/puppet/pops/serialization/json_path.rb +3 -3
- data/lib/puppet/pops/time/timespan.rb +3 -5
- data/lib/puppet/pops/types/p_object_type_extension.rb +10 -0
- data/lib/puppet/pops/types/string_converter.rb +6 -9
- data/lib/puppet/pops/types/type_calculator.rb +30 -10
- data/lib/puppet/pops/types/type_formatter.rb +9 -11
- data/lib/puppet/pops/types/type_parser.rb +3 -3
- data/lib/puppet/pops/validation/checker4_0.rb +1 -1
- data/lib/puppet/pops/validation/tasks_checker.rb +5 -1
- data/lib/puppet/provider/aix_object.rb +4 -2
- data/lib/puppet/provider/group/aix.rb +1 -0
- data/lib/puppet/provider/group/groupadd.rb +57 -24
- data/lib/puppet/provider/group/windows_adsi.rb +3 -3
- data/lib/puppet/provider/package/aix.rb +17 -2
- data/lib/puppet/provider/package/apt.rb +78 -4
- data/lib/puppet/provider/package/dnfmodule.rb +69 -15
- data/lib/puppet/provider/package/dpkg.rb +14 -7
- data/lib/puppet/provider/package/fink.rb +20 -3
- data/lib/puppet/provider/package/gem.rb +41 -7
- data/lib/puppet/provider/package/openbsd.rb +13 -1
- data/lib/puppet/provider/package/pacman.rb +2 -5
- data/lib/puppet/provider/package/pip.rb +143 -48
- data/lib/puppet/provider/package/pip3.rb +0 -2
- data/lib/puppet/provider/package/pkg.rb +18 -5
- data/lib/puppet/provider/package/pkgdmg.rb +1 -1
- data/lib/puppet/provider/package/pkgng.rb +16 -4
- data/lib/puppet/provider/package/portage.rb +5 -5
- data/lib/puppet/provider/package/puppet_gem.rb +6 -2
- data/lib/puppet/provider/package/rpm.rb +6 -213
- data/lib/puppet/provider/package/yum.rb +108 -24
- data/lib/puppet/provider/package/zypper.rb +59 -1
- data/lib/puppet/provider/package_targetable.rb +5 -4
- data/lib/puppet/provider/service/systemd.rb +23 -5
- data/lib/puppet/provider/user/aix.rb +1 -0
- data/lib/puppet/provider/user/directoryservice.rb +30 -5
- data/lib/puppet/provider/user/hpux.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +11 -8
- data/lib/puppet/reports/http.rb +13 -9
- data/lib/puppet/reports/store.rb +1 -1
- data/lib/puppet/resource/type_collection.rb +20 -16
- data/lib/puppet/runtime.rb +32 -1
- data/lib/puppet/settings.rb +4 -0
- data/lib/puppet/settings/http_extra_headers_setting.rb +25 -0
- data/lib/puppet/ssl.rb +1 -0
- data/lib/puppet/ssl/certificate.rb +2 -1
- data/lib/puppet/ssl/host.rb +4 -4
- data/lib/puppet/ssl/oids.rb +1 -0
- data/lib/puppet/ssl/ssl_provider.rb +20 -0
- data/lib/puppet/ssl/state_machine.rb +81 -35
- data/lib/puppet/ssl/verifier_adapter.rb +9 -1
- data/lib/puppet/test/test_helper.rb +7 -1
- data/lib/puppet/transaction.rb +33 -11
- data/lib/puppet/transaction/report.rb +2 -2
- data/lib/puppet/transaction/resource_harness.rb +1 -1
- data/lib/puppet/type.rb +7 -2
- data/lib/puppet/type/file.rb +13 -0
- data/lib/puppet/type/file/data_sync.rb +5 -1
- data/lib/puppet/type/file/source.rb +49 -58
- data/lib/puppet/type/group.rb +5 -4
- data/lib/puppet/type/package.rb +102 -10
- data/lib/puppet/type/service.rb +6 -8
- data/lib/puppet/type/user.rb +6 -30
- data/lib/puppet/util.rb +34 -11
- data/lib/puppet/util/at_fork.rb +1 -1
- data/lib/puppet/util/autoload.rb +4 -18
- data/lib/puppet/util/instance_loader.rb +14 -10
- data/lib/puppet/util/log/destinations.rb +2 -11
- data/lib/puppet/util/logging.rb +30 -18
- data/lib/puppet/util/package/version/debian.rb +175 -0
- data/lib/puppet/util/package/version/gem.rb +15 -0
- data/lib/puppet/util/package/version/pip.rb +167 -0
- data/lib/puppet/util/package/version/range.rb +53 -0
- data/lib/puppet/util/package/version/range/eq.rb +14 -0
- data/lib/puppet/util/package/version/range/gt.rb +14 -0
- data/lib/puppet/util/package/version/range/gt_eq.rb +14 -0
- data/lib/puppet/util/package/version/range/lt.rb +14 -0
- data/lib/puppet/util/package/version/range/lt_eq.rb +14 -0
- data/lib/puppet/util/package/version/range/min_max.rb +21 -0
- data/lib/puppet/util/package/version/range/simple.rb +11 -0
- data/lib/puppet/util/package/version/rpm.rb +73 -0
- data/lib/puppet/util/pidlock.rb +36 -10
- data/lib/puppet/util/platform.rb +5 -0
- data/lib/puppet/util/plist.rb +6 -0
- data/lib/puppet/util/rpm_compare.rb +193 -0
- data/lib/puppet/util/storage.rb +0 -1
- data/lib/puppet/util/windows/adsi.rb +50 -20
- data/lib/puppet/util/windows/process.rb +15 -14
- data/lib/puppet/util/windows/security.rb +1 -0
- data/lib/puppet/util/windows/sid.rb +3 -3
- data/lib/puppet/util/yaml.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet/x509/cert_provider.rb +9 -5
- data/locales/puppet.pot +640 -521
- data/man/man5/puppet.conf.5 +88 -9
- data/man/man8/puppet-agent.8 +6 -6
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +2 -2
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +17 -2
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +6 -3
- data/man/man8/puppet-key.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-man.8 +1 -1
- data/man/man8/puppet-module.8 +4 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +2 -2
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/ssl/unknown-127.0.0.1-key.pem +67 -0
- data/spec/fixtures/ssl/unknown-127.0.0.1.pem +48 -0
- data/spec/fixtures/ssl/unknown-ca-key.pem +67 -0
- data/spec/fixtures/ssl/unknown-ca.pem +59 -0
- data/spec/fixtures/unit/forge/bacula.json +76 -0
- data/spec/fixtures/unit/provider/package/dnfmodule/{dnf-module-list-installed.txt → dnf-module-list.txt} +8 -0
- data/spec/fixtures/unit/provider/package/pkgng/pkg.version +2 -0
- data/spec/fixtures/unit/provider/package/yum/yum-check-update-subscription-manager.txt +9 -0
- data/spec/fixtures/unit/provider/package/zypper/zypper-search-uninstalled.out +13 -0
- data/spec/fixtures/unit/provider/service/systemd/list_unit_files_services +9 -0
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_md5/should_fetch_if_not_on_the_local_disk.yml +1 -102
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_md5/should_not_update_if_content_on_disk_is_up-to-date.yml +1 -106
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_md5/should_update_if_content_differs_on_disk.yml +1 -106
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_fetch_if_mtime_is_older_on_disk.yml +1 -102
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_fetch_if_no_header_specified.yml +1 -98
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_fetch_if_not_on_the_local_disk.yml +1 -102
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_not_update_if_mtime_is_newer_on_disk.yml +1 -102
- data/spec/integration/application/agent_spec.rb +394 -0
- data/spec/integration/application/apply_spec.rb +132 -3
- data/spec/integration/application/filebucket_spec.rb +190 -0
- data/spec/integration/application/plugin_spec.rb +73 -0
- data/spec/integration/configurer_spec.rb +26 -7
- data/spec/integration/http/client_spec.rb +154 -0
- data/spec/integration/indirector/facts/facter_spec.rb +4 -0
- data/spec/integration/indirector/report/yaml.rb +83 -0
- data/spec/integration/module_tool/forge_spec.rb +51 -0
- data/spec/integration/network/http_pool_spec.rb +76 -20
- data/spec/integration/node/environment_spec.rb +15 -0
- data/spec/integration/util/windows/adsi_spec.rb +6 -1
- data/spec/lib/puppet/test_ca.rb +2 -2
- data/spec/lib/puppet_spec/https.rb +20 -9
- data/spec/lib/puppet_spec/puppetserver.rb +119 -0
- data/spec/shared_contexts/https.rb +29 -0
- data/spec/spec_helper.rb +6 -2
- data/spec/unit/agent_spec.rb +80 -26
- data/spec/unit/application/agent_spec.rb +9 -5
- data/spec/unit/application/apply_spec.rb +2 -12
- data/spec/unit/application/describe_spec.rb +88 -50
- data/spec/unit/application/device_spec.rb +2 -2
- data/spec/unit/application/filebucket_spec.rb +22 -2
- data/spec/unit/application/resource_spec.rb +2 -2
- data/spec/unit/concurrent/lock_spec.rb +29 -0
- data/spec/unit/configurer/fact_handler_spec.rb +0 -4
- data/spec/unit/configurer/plugin_handler_spec.rb +36 -19
- data/spec/unit/configurer_spec.rb +400 -406
- data/spec/unit/context/trusted_information_spec.rb +17 -0
- data/spec/unit/daemon_spec.rb +5 -64
- data/spec/unit/defaults_spec.rb +38 -4
- data/spec/unit/environments_spec.rb +65 -28
- data/spec/unit/face/facts_spec.rb +24 -20
- data/spec/unit/face/module/search_spec.rb +17 -0
- data/spec/unit/face/plugin_spec.rb +12 -10
- data/spec/unit/file_system/uniquefile_spec.rb +11 -0
- data/spec/unit/file_system_spec.rb +26 -2
- data/spec/unit/forge/errors_spec.rb +1 -1
- data/spec/unit/forge/forge_spec.rb +12 -54
- data/spec/unit/forge/module_release_spec.rb +19 -6
- data/spec/unit/forge/repository_spec.rb +63 -157
- data/spec/unit/forge_spec.rb +46 -116
- data/spec/unit/functions/find_template_spec.rb +69 -0
- data/spec/unit/functions/lookup_spec.rb +13 -0
- data/spec/unit/http/client_spec.rb +395 -27
- data/spec/unit/http/external_client_spec.rb +201 -0
- data/spec/unit/http/resolver_spec.rb +81 -12
- data/spec/unit/http/response_spec.rb +69 -0
- data/spec/unit/http/service/ca_spec.rb +100 -7
- data/spec/unit/http/service/compiler_spec.rb +627 -0
- data/spec/unit/http/service/file_server_spec.rb +308 -0
- data/spec/unit/http/service/report_spec.rb +118 -0
- data/spec/unit/http/service_spec.rb +117 -4
- data/spec/unit/http/session_spec.rb +237 -19
- data/spec/unit/indirector/catalog/compiler_spec.rb +47 -29
- data/spec/unit/indirector/catalog/rest_spec.rb +59 -2
- data/spec/unit/indirector/facts/rest_spec.rb +79 -24
- data/spec/unit/indirector/file_bucket_file/rest_spec.rb +82 -2
- data/spec/unit/indirector/file_content/rest_spec.rb +53 -2
- data/spec/unit/indirector/file_metadata/http_spec.rb +167 -0
- data/spec/unit/indirector/file_metadata/rest_spec.rb +110 -2
- data/spec/unit/indirector/node/rest_spec.rb +57 -2
- data/spec/unit/indirector/report/rest_spec.rb +58 -51
- data/spec/unit/indirector/resource/ral_spec.rb +7 -8
- data/spec/unit/indirector/rest_spec.rb +13 -0
- data/spec/unit/indirector/status/rest_spec.rb +43 -2
- data/spec/unit/network/http/connection_spec.rb +549 -176
- data/spec/unit/network/http/nocache_pool_spec.rb +25 -3
- data/spec/unit/network/http/pool_spec.rb +89 -11
- data/spec/unit/network/http_pool_spec.rb +63 -57
- data/spec/unit/network/http_spec.rb +1 -1
- data/spec/unit/node/environment_spec.rb +16 -0
- data/spec/unit/node/facts_spec.rb +2 -1
- data/spec/unit/node_spec.rb +7 -4
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +8 -3
- data/spec/unit/pops/serialization/to_from_hr_spec.rb +6 -1
- data/spec/unit/pops/validator/validator_spec.rb +7 -2
- data/spec/unit/provider/aix_object_spec.rb +16 -2
- data/spec/unit/provider/group/groupadd_spec.rb +181 -56
- data/spec/unit/provider/group/windows_adsi_spec.rb +43 -10
- data/spec/unit/provider/package/aix_spec.rb +29 -0
- data/spec/unit/provider/package/apt_spec.rb +43 -2
- data/spec/unit/provider/package/aptitude_spec.rb +1 -0
- data/spec/unit/provider/package/dnfmodule_spec.rb +76 -15
- data/spec/unit/provider/package/dpkg_spec.rb +28 -6
- data/spec/unit/provider/package/gem_spec.rb +40 -0
- data/spec/unit/provider/package/openbsd_spec.rb +17 -0
- data/spec/unit/provider/package/pacman_spec.rb +6 -21
- data/spec/unit/provider/package/pip_spec.rb +68 -19
- data/spec/unit/provider/package/pkg_spec.rb +15 -1
- data/spec/unit/provider/package/pkgdmg_spec.rb +1 -1
- data/spec/unit/provider/package/pkgng_spec.rb +38 -0
- data/spec/unit/provider/package/portage_spec.rb +9 -4
- data/spec/unit/provider/package/puppet_gem_spec.rb +8 -0
- data/spec/unit/provider/package/rpm_spec.rb +0 -212
- data/spec/unit/provider/package/yum_spec.rb +292 -0
- data/spec/unit/provider/package/zypper_spec.rb +84 -0
- data/spec/unit/provider/package_targetable_spec.rb +60 -0
- data/spec/unit/provider/service/init_spec.rb +1 -0
- data/spec/unit/provider/service/openbsd_spec.rb +9 -0
- data/spec/unit/provider/service/openwrt_spec.rb +1 -0
- data/spec/unit/provider/service/redhat_spec.rb +9 -0
- data/spec/unit/provider/service/systemd_spec.rb +92 -12
- data/spec/unit/provider/user/directoryservice_spec.rb +41 -0
- data/spec/unit/provider/user/hpux_spec.rb +2 -2
- data/spec/unit/provider/user/useradd_spec.rb +21 -8
- data/spec/unit/provider/user/windows_adsi_spec.rb +3 -3
- data/spec/unit/puppet_pal_2pec.rb +0 -26
- data/spec/unit/puppet_pal_catalog_spec.rb +46 -0
- data/spec/unit/puppet_spec.rb +47 -0
- data/spec/unit/reports/http_spec.rb +70 -52
- data/spec/unit/settings/autosign_setting_spec.rb +1 -1
- data/spec/unit/settings/http_extra_headers_spec.rb +64 -0
- data/spec/unit/ssl/certificate_spec.rb +7 -0
- data/spec/unit/ssl/host_spec.rb +4 -2
- data/spec/unit/ssl/oids_spec.rb +1 -0
- data/spec/unit/ssl/ssl_provider_spec.rb +71 -0
- data/spec/unit/ssl/state_machine_spec.rb +99 -13
- data/spec/unit/transaction/persistence_spec.rb +1 -10
- data/spec/unit/transaction/report_spec.rb +4 -0
- data/spec/unit/transaction_spec.rb +45 -1
- data/spec/unit/type/file/content_spec.rb +9 -3
- data/spec/unit/type/file/ensure_spec.rb +1 -2
- data/spec/unit/type/file/source_spec.rb +86 -35
- data/spec/unit/type/package_spec.rb +8 -0
- data/spec/unit/type/service_spec.rb +9 -8
- data/spec/unit/type/user_spec.rb +1 -2
- data/spec/unit/util/at_fork_spec.rb +3 -2
- data/spec/unit/util/autoload_spec.rb +2 -1
- data/spec/unit/util/log/destinations_spec.rb +1 -29
- data/spec/unit/util/log_spec.rb +0 -138
- data/spec/unit/util/logging_spec.rb +200 -0
- data/spec/unit/util/package/version/debian_spec.rb +83 -0
- data/spec/unit/util/package/version/pip_spec.rb +464 -0
- data/spec/unit/util/package/version/range_spec.rb +175 -0
- data/spec/unit/util/package/version/rpm_spec.rb +121 -0
- data/spec/unit/util/pidlock_spec.rb +112 -42
- data/spec/unit/util/plist_spec.rb +20 -0
- data/spec/unit/util/rpm_compare_spec.rb +196 -0
- data/spec/unit/util/storage_spec.rb +1 -8
- data/spec/unit/util/windows/adsi_spec.rb +55 -4
- data/spec/unit/util/windows/sid_spec.rb +2 -2
- data/spec/unit/x509/cert_provider_spec.rb +24 -4
- data/tasks/generate_cert_fixtures.rake +15 -1
- data/tasks/manpages.rake +6 -35
- metadata +92 -12
- data/COMMITTERS.md +0 -244
- data/spec/integration/faces/plugin_spec.rb +0 -61
- data/spec/lib/puppet_spec/validators.rb +0 -37
@@ -29,8 +29,17 @@ class Puppet::Configurer::PluginHandler
|
|
29
29
|
result += plugin_fact_downloader.evaluate
|
30
30
|
result += plugin_downloader.evaluate
|
31
31
|
|
32
|
+
# until file metadata/content are using the rest client, we need to check
|
33
|
+
# both :server_agent_version and the session to see if the server supports
|
34
|
+
# the "locales" mount
|
32
35
|
server_agent_version = Puppet.lookup(:server_agent_version) { "0.0" }
|
33
|
-
|
36
|
+
locales = Gem::Version.new(server_agent_version) >= SUPPORTED_LOCALES_MOUNT_AGENT_VERSION
|
37
|
+
unless locales
|
38
|
+
session = Puppet.lookup(:http_session)
|
39
|
+
locales = session.supports?(:fileserver, 'locales') || session.supports?(:puppet, 'locales')
|
40
|
+
end
|
41
|
+
|
42
|
+
if locales
|
34
43
|
locales_downloader = Puppet::Configurer::Downloader.new(
|
35
44
|
"locales",
|
36
45
|
Puppet[:localedest],
|
@@ -29,11 +29,6 @@ class Puppet::Context::TrustedInformation
|
|
29
29
|
# @return [String]
|
30
30
|
attr_reader :hostname
|
31
31
|
|
32
|
-
# Additional external facts loaded through `trusted_external_command`.
|
33
|
-
#
|
34
|
-
# @return [Hash]
|
35
|
-
attr_reader :external
|
36
|
-
|
37
32
|
def initialize(authenticated, certname, extensions, external = {})
|
38
33
|
@authenticated = authenticated.freeze
|
39
34
|
@certname = certname.freeze
|
@@ -46,11 +41,11 @@ class Puppet::Context::TrustedInformation
|
|
46
41
|
end
|
47
42
|
@hostname = hostname.freeze
|
48
43
|
@domain = domain.freeze
|
49
|
-
@external = external.freeze
|
44
|
+
@external = external.is_a?(Proc) ? external : external.freeze
|
50
45
|
end
|
51
46
|
|
52
47
|
def self.remote(authenticated, node_name, certificate)
|
53
|
-
external = retrieve_trusted_external(node_name)
|
48
|
+
external = proc { retrieve_trusted_external(node_name) }
|
54
49
|
|
55
50
|
if authenticated
|
56
51
|
extensions = {}
|
@@ -70,8 +65,19 @@ class Puppet::Context::TrustedInformation
|
|
70
65
|
def self.local(node)
|
71
66
|
# Always trust local data by picking up the available parameters.
|
72
67
|
client_cert = node ? node.parameters['clientcert'] : nil
|
68
|
+
external = proc { retrieve_trusted_external(client_cert) }
|
69
|
+
|
70
|
+
new('local', client_cert, {}, external)
|
71
|
+
end
|
73
72
|
|
74
|
-
|
73
|
+
# Additional external facts loaded through `trusted_external_command`.
|
74
|
+
#
|
75
|
+
# @return [Hash]
|
76
|
+
def external
|
77
|
+
if @external.is_a?(Proc)
|
78
|
+
@external = @external.call.freeze
|
79
|
+
end
|
80
|
+
@external
|
75
81
|
end
|
76
82
|
|
77
83
|
def self.retrieve_trusted_external(certname)
|
data/lib/puppet/daemon.rb
CHANGED
@@ -1,19 +1,15 @@
|
|
1
1
|
require 'puppet/application'
|
2
2
|
require 'puppet/scheduler'
|
3
3
|
|
4
|
-
# Run periodic actions
|
4
|
+
# Run periodic actions in a daemonized process.
|
5
5
|
#
|
6
|
-
# A Daemon has
|
6
|
+
# A Daemon has 2 parts:
|
7
7
|
# * config reparse
|
8
|
-
# *
|
9
|
-
# * (optional) a server that response to #stop, #start, and #wait_for_shutdown
|
8
|
+
# * an agent that responds to #run
|
10
9
|
#
|
11
|
-
# The config reparse will occur periodically based on Settings. The
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# #wait_for_shutdown method. The agent is run periodically and a time interval
|
15
|
-
# based on Settings. The config reparse will update this time interval when
|
16
|
-
# needed.
|
10
|
+
# The config reparse will occur periodically based on Settings. The agent
|
11
|
+
# is run periodically and a time interval based on Settings. The config
|
12
|
+
# reparse will update this time interval when needed.
|
17
13
|
#
|
18
14
|
# The Daemon is also responsible for signal handling, starting, stopping,
|
19
15
|
# running the agent on demand, and reloading the entire process. It ensures
|
@@ -23,12 +19,14 @@ require 'puppet/scheduler'
|
|
23
19
|
class Puppet::Daemon
|
24
20
|
SIGNAL_CHECK_INTERVAL = 5
|
25
21
|
|
26
|
-
attr_accessor :
|
27
|
-
attr_reader :signals
|
22
|
+
attr_accessor :argv
|
23
|
+
attr_reader :signals, :agent
|
28
24
|
|
29
|
-
def initialize(pidfile, scheduler = Puppet::Scheduler::Scheduler.new())
|
25
|
+
def initialize(agent, pidfile, scheduler = Puppet::Scheduler::Scheduler.new())
|
26
|
+
raise Puppet::DevError, _("Daemons must have an agent") unless agent
|
30
27
|
@scheduler = scheduler
|
31
28
|
@pidfile = pidfile
|
29
|
+
@agent = agent
|
32
30
|
@signals = []
|
33
31
|
end
|
34
32
|
|
@@ -88,7 +86,6 @@ class Puppet::Daemon
|
|
88
86
|
end
|
89
87
|
|
90
88
|
def reload
|
91
|
-
return unless agent
|
92
89
|
agent.run({:splay => false})
|
93
90
|
rescue Puppet::LockError
|
94
91
|
Puppet.notice "Not triggering already-running agent"
|
@@ -96,7 +93,7 @@ class Puppet::Daemon
|
|
96
93
|
|
97
94
|
def restart
|
98
95
|
Puppet::Application.restart!
|
99
|
-
reexec
|
96
|
+
reexec
|
100
97
|
end
|
101
98
|
|
102
99
|
def reopen_logs
|
@@ -129,8 +126,6 @@ class Puppet::Daemon
|
|
129
126
|
def stop(args = {:exit => true})
|
130
127
|
Puppet::Application.stop!
|
131
128
|
|
132
|
-
server.stop if server
|
133
|
-
|
134
129
|
remove_pidfile
|
135
130
|
|
136
131
|
Puppet::Util::Log.close_all
|
@@ -140,16 +135,7 @@ class Puppet::Daemon
|
|
140
135
|
|
141
136
|
def start
|
142
137
|
create_pidfile
|
143
|
-
|
144
|
-
raise Puppet::DevError, _("Daemons must have an agent, server, or both") unless agent or server
|
145
|
-
|
146
|
-
# Start the listening server, if required.
|
147
|
-
server.start if server
|
148
|
-
|
149
|
-
# Finally, loop forever running events - or, at least, until we exit.
|
150
138
|
run_event_loop
|
151
|
-
|
152
|
-
server.wait_for_shutdown if server
|
153
139
|
end
|
154
140
|
|
155
141
|
private
|
@@ -165,6 +151,7 @@ class Puppet::Daemon
|
|
165
151
|
@pidfile.unlock
|
166
152
|
end
|
167
153
|
|
154
|
+
# Loop forever running events - or, at least, until we exit.
|
168
155
|
def run_event_loop
|
169
156
|
agent_run = Puppet::Scheduler.create_job(Puppet[:runinterval], Puppet[:splay], Puppet[:splaylimit]) do
|
170
157
|
# Splay for the daemon is handled in the scheduler
|
@@ -189,7 +176,6 @@ class Puppet::Daemon
|
|
189
176
|
end
|
190
177
|
|
191
178
|
reparse_run.disable if Puppet[:filetimeout] == 0
|
192
|
-
agent_run.disable unless agent
|
193
179
|
|
194
180
|
@scheduler.run_loop([reparse_run, agent_run, signal_loop])
|
195
181
|
end
|
data/lib/puppet/defaults.rb
CHANGED
@@ -35,7 +35,7 @@ module Puppet
|
|
35
35
|
def self.default_basemodulepath
|
36
36
|
if Puppet::Util::Platform.windows?
|
37
37
|
path = ['$codedir/modules']
|
38
|
-
installdir =
|
38
|
+
installdir = ENV["FACTER_env_windows_installdir"]
|
39
39
|
if installdir
|
40
40
|
path << "#{installdir}/puppet/modules"
|
41
41
|
end
|
@@ -47,7 +47,7 @@ module Puppet
|
|
47
47
|
|
48
48
|
def self.default_vendormoduledir
|
49
49
|
if Puppet::Util::Platform.windows?
|
50
|
-
installdir =
|
50
|
+
installdir = ENV["FACTER_env_windows_installdir"]
|
51
51
|
if installdir
|
52
52
|
"#{installdir}\\puppet\\vendor_modules"
|
53
53
|
else
|
@@ -65,7 +65,33 @@ module Puppet
|
|
65
65
|
|
66
66
|
AS_DURATION = %q{This setting can be a time interval in seconds (30 or 30s), minutes (30m), hours (6h), days (2d), or years (5y).}
|
67
67
|
|
68
|
-
|
68
|
+
# @api public
|
69
|
+
# @param args [Puppet::Settings] the settings object to define default settings for
|
70
|
+
# @return void
|
71
|
+
def self.initialize_default_settings!(settings)
|
72
|
+
settings.define_settings(:main,
|
73
|
+
:facterng => {
|
74
|
+
:default => false,
|
75
|
+
:type => :boolean,
|
76
|
+
:desc => 'Whether to enable a pre-Facter 4.0 release of Facter (distributed as
|
77
|
+
the "facter-ng" gem). This is not necessary if Facter 3.x or later is installed.
|
78
|
+
This setting is still experimental.',
|
79
|
+
:hook => proc do |value|
|
80
|
+
if value
|
81
|
+
begin
|
82
|
+
original_facter = Object.const_get(:Facter)
|
83
|
+
Object.send(:remove_const, :Facter)
|
84
|
+
|
85
|
+
require 'facter-ng'
|
86
|
+
# It is required to re-setup logger for facter-ng
|
87
|
+
Puppet::Util::Logging.setup_facter_logging!
|
88
|
+
rescue LoadError
|
89
|
+
Object.const_set(:Facter, original_facter)
|
90
|
+
raise ArgumentError, 'facter-ng could not be loaded'
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
},
|
69
95
|
:confdir => {
|
70
96
|
:default => nil,
|
71
97
|
:type => :directory,
|
@@ -102,7 +128,7 @@ module Puppet
|
|
102
128
|
}
|
103
129
|
)
|
104
130
|
|
105
|
-
define_settings(:main,
|
131
|
+
settings.define_settings(:main,
|
106
132
|
:logdir => {
|
107
133
|
:default => nil,
|
108
134
|
:type => :directory,
|
@@ -149,11 +175,24 @@ module Puppet
|
|
149
175
|
valid = %w[deprecations undefined_variables undefined_resources]
|
150
176
|
invalid = values - (values & valid)
|
151
177
|
if not invalid.empty?
|
152
|
-
raise ArgumentError, _("Cannot disable unrecognized warning types %{invalid}.") % { invalid: invalid.
|
153
|
-
' ' + _("Valid values are %{values}.") % { values: valid.
|
178
|
+
raise ArgumentError, _("Cannot disable unrecognized warning types '%{invalid}'.") % { invalid: invalid.join(',') } +
|
179
|
+
' ' + _("Valid values are '%{values}'.") % { values: valid.join(', ') }
|
154
180
|
end
|
155
181
|
end
|
156
182
|
},
|
183
|
+
:merge_dependency_warnings => {
|
184
|
+
:default => false,
|
185
|
+
:type => :boolean,
|
186
|
+
:desc => "Whether to merge class-level dependency failure warnings.
|
187
|
+
|
188
|
+
When a class has a failed dependency, every resource in the class
|
189
|
+
generates a notice level message about the dependency failure,
|
190
|
+
and a warning level message about skipping the resource.
|
191
|
+
|
192
|
+
If true, all messages caused by a class dependency failure are merged
|
193
|
+
into one message associated with the class.
|
194
|
+
",
|
195
|
+
},
|
157
196
|
:strict => {
|
158
197
|
:default => :warning,
|
159
198
|
:type => :symbolic_enum,
|
@@ -193,7 +232,7 @@ module Puppet
|
|
193
232
|
}
|
194
233
|
)
|
195
234
|
|
196
|
-
define_settings(:main,
|
235
|
+
settings.define_settings(:main,
|
197
236
|
:priority => {
|
198
237
|
:default => nil,
|
199
238
|
:type => :priority,
|
@@ -206,12 +245,19 @@ module Puppet
|
|
206
245
|
:trace => {
|
207
246
|
:default => false,
|
208
247
|
:type => :boolean,
|
209
|
-
:desc => "Whether to print stack traces on some errors
|
248
|
+
:desc => "Whether to print stack traces on some errors. Will print
|
249
|
+
internal Ruby stack trace interleaved with Puppet function frames.",
|
210
250
|
:hook => proc do |value|
|
211
251
|
# Enable or disable Facter's trace option too
|
212
252
|
Facter.trace(value) if Facter.respond_to? :trace
|
213
253
|
end
|
214
254
|
},
|
255
|
+
:puppet_trace => {
|
256
|
+
:default => false,
|
257
|
+
:type => :boolean,
|
258
|
+
:desc => "Whether to print the Puppet stack trace on some errors.
|
259
|
+
This is a noop if `trace` is also set.",
|
260
|
+
},
|
215
261
|
:profile => {
|
216
262
|
:default => false,
|
217
263
|
:type => :boolean,
|
@@ -224,6 +270,13 @@ module Puppet
|
|
224
270
|
major releases of Puppet. Should be used with caution, as in development
|
225
271
|
features are experimental and can have unexpected effects."
|
226
272
|
},
|
273
|
+
:versioned_environment_dirs => {
|
274
|
+
:default => false,
|
275
|
+
:type => :boolean,
|
276
|
+
:desc => "Whether or not to look for versioned environment directories,
|
277
|
+
symlinked from `$environmentpath/<environment>`. This is an experimental
|
278
|
+
feature and should be used with caution."
|
279
|
+
},
|
227
280
|
:static_catalogs => {
|
228
281
|
:default => true,
|
229
282
|
:type => :boolean,
|
@@ -502,12 +555,12 @@ module Puppet
|
|
502
555
|
:hiera_config => {
|
503
556
|
:default => lambda do
|
504
557
|
config = nil
|
505
|
-
codedir =
|
558
|
+
codedir = settings[:codedir]
|
506
559
|
if codedir.is_a?(String)
|
507
560
|
config = File.expand_path(File.join(codedir, 'hiera.yaml'))
|
508
561
|
config = nil unless Puppet::FileSystem.exist?(config)
|
509
562
|
end
|
510
|
-
config = File.expand_path(File.join(
|
563
|
+
config = File.expand_path(File.join(settings[:confdir], 'hiera.yaml')) if config.nil?
|
511
564
|
config
|
512
565
|
end,
|
513
566
|
:desc => "The hiera configuration file. Puppet only reads this file on startup, so you must restart the puppet master every time you edit it.",
|
@@ -571,7 +624,7 @@ module Puppet
|
|
571
624
|
:http_proxy_password =>{
|
572
625
|
:default => "none",
|
573
626
|
:hook => proc do |value|
|
574
|
-
if
|
627
|
+
if settings[:http_proxy_password] =~ /[@!# \/]/
|
575
628
|
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}"
|
576
629
|
end
|
577
630
|
end,
|
@@ -715,7 +768,7 @@ API to expire the cache as needed
|
|
715
768
|
}
|
716
769
|
)
|
717
770
|
|
718
|
-
|
771
|
+
settings.define_settings(:module_tool,
|
719
772
|
:module_repository => {
|
720
773
|
:default => 'https://forgeapi.puppet.com',
|
721
774
|
:desc => "The module repository",
|
@@ -734,7 +787,7 @@ API to expire the cache as needed
|
|
734
787
|
}
|
735
788
|
)
|
736
789
|
|
737
|
-
|
790
|
+
settings.define_settings(
|
738
791
|
:main,
|
739
792
|
|
740
793
|
# We have to downcase the fqdn, because the current ssl stuff (as opposed to in master) doesn't have good facilities for
|
@@ -815,13 +868,17 @@ This is useful for embedding a pre-shared key for autosigning policy executables
|
|
815
868
|
("challenge password") OID.
|
816
869
|
|
817
870
|
Extension requests will be permanently embedded in the final certificate.
|
818
|
-
Extension OIDs must be in the "ppRegCertExt" (`1.3.6.1.4.1.34380.1.1`)
|
819
|
-
"ppPrivCertExt" (`1.3.6.1.4.1.34380.1.2`)
|
871
|
+
Extension OIDs must be in the "ppRegCertExt" (`1.3.6.1.4.1.34380.1.1`),
|
872
|
+
"ppPrivCertExt" (`1.3.6.1.4.1.34380.1.2`), or
|
873
|
+
"ppAuthCertExt" (`1.3.6.1.4.1.34380.1.3`) OID arcs. The ppRegCertExt arc is
|
820
874
|
reserved for four of the most common pieces of data to embed: `pp_uuid` (`.1`),
|
821
875
|
`pp_instance_id` (`.2`), `pp_image_name` (`.3`), and `pp_preshared_key` (`.4`)
|
822
876
|
--- in the YAML file, these can be referred to by their short descriptive names
|
823
877
|
instead of their full OID. The ppPrivCertExt arc is unregulated, and can be used
|
824
|
-
for site-specific extensions.
|
878
|
+
for site-specific extensions. The ppAuthCert arc is reserved for two pieces of
|
879
|
+
data to embed: `pp_authorization` (`.1`) and `pp_auth_role` (`.13`). As with
|
880
|
+
ppRegCertExt, in the YAML file, these can be referred to by their short
|
881
|
+
descriptive name instead of their full OID.
|
825
882
|
EOT
|
826
883
|
},
|
827
884
|
:certdir => {
|
@@ -1041,7 +1098,7 @@ EOT
|
|
1041
1098
|
}
|
1042
1099
|
)
|
1043
1100
|
|
1044
|
-
define_settings(
|
1101
|
+
settings.define_settings(
|
1045
1102
|
:ca,
|
1046
1103
|
:ca_name => {
|
1047
1104
|
:default => "Puppet CA: $certname",
|
@@ -1113,7 +1170,7 @@ EOT
|
|
1113
1170
|
the request.
|
1114
1171
|
|
1115
1172
|
For info on autosign configuration files, see
|
1116
|
-
[the guide to Puppet's config files](https://puppet.com/docs/puppet/latest/
|
1173
|
+
[the guide to Puppet's config files](https://puppet.com/docs/puppet/latest/config_file_autosign.html).",
|
1117
1174
|
},
|
1118
1175
|
:allow_duplicate_certs => {
|
1119
1176
|
:default => false,
|
@@ -1159,7 +1216,7 @@ EOT
|
|
1159
1216
|
|
1160
1217
|
# Define the config default.
|
1161
1218
|
|
1162
|
-
define_settings(:application,
|
1219
|
+
settings.define_settings(:application,
|
1163
1220
|
:config_file_name => {
|
1164
1221
|
:type => :string,
|
1165
1222
|
:default => Puppet::Settings.default_config_file_name,
|
@@ -1184,7 +1241,7 @@ EOT
|
|
1184
1241
|
},
|
1185
1242
|
)
|
1186
1243
|
|
1187
|
-
define_settings(:environment,
|
1244
|
+
settings.define_settings(:environment,
|
1188
1245
|
:manifest => {
|
1189
1246
|
:default => nil,
|
1190
1247
|
:type => :file_or_directory,
|
@@ -1227,7 +1284,7 @@ EOT
|
|
1227
1284
|
}
|
1228
1285
|
)
|
1229
1286
|
|
1230
|
-
define_settings(:master,
|
1287
|
+
settings.define_settings(:master,
|
1231
1288
|
:user => {
|
1232
1289
|
:default => "puppet",
|
1233
1290
|
:desc => "The user Puppet Server will run as. Used to ensure
|
@@ -1284,13 +1341,23 @@ EOT
|
|
1284
1341
|
overridden by more specific settings (see `ca_port`, `report_port`).",
|
1285
1342
|
},
|
1286
1343
|
:node_name => {
|
1287
|
-
:default =>
|
1344
|
+
:default => 'cert',
|
1345
|
+
:type => :enum,
|
1346
|
+
:values => ['cert', 'facter'],
|
1347
|
+
:deprecated => :completely,
|
1348
|
+
:hook => proc { |val|
|
1349
|
+
if val != 'cert'
|
1350
|
+
Puppet.deprecation_warning("The node_name setting is deprecated and will be removed in a future release.")
|
1351
|
+
end
|
1352
|
+
},
|
1288
1353
|
:desc => "How the puppet master determines the client's identity
|
1289
1354
|
and sets the 'hostname', 'fqdn' and 'domain' facts for use in the manifest,
|
1290
1355
|
in particular for determining which 'node' statement applies to the client.
|
1291
1356
|
Possible values are 'cert' (use the subject's CN in the client's
|
1292
1357
|
certificate) and 'facter' (use the hostname that the client
|
1293
|
-
reported in its facts)
|
1358
|
+
reported in its facts).
|
1359
|
+
|
1360
|
+
This setting is deprecated, please use explicit fact matching for classification.",
|
1294
1361
|
},
|
1295
1362
|
:bucketdir => {
|
1296
1363
|
:default => "$vardir/bucket",
|
@@ -1413,14 +1480,23 @@ EOT
|
|
1413
1480
|
:desc => "Where the fileserver configuration is stored.",
|
1414
1481
|
},
|
1415
1482
|
:strict_hostname_checking => {
|
1416
|
-
:default =>
|
1483
|
+
:default => true,
|
1484
|
+
:type => :boolean,
|
1417
1485
|
:desc => "Whether to only search for the complete
|
1418
|
-
|
1419
|
-
|
1486
|
+
hostname as it is in the certificate when searching for node information
|
1487
|
+
in the catalogs or to match dot delimited segments of the cert's certname
|
1488
|
+
and the hostname, fqdn, and/or domain facts.
|
1489
|
+
|
1490
|
+
This setting is deprecated and will be removed in a future release.",
|
1491
|
+
:hook => proc { |val|
|
1492
|
+
if val != true
|
1493
|
+
Puppet.deprecation_warning("Setting strict_hostname_checking to false is deprecated and will be removed in a future release. Please use regular expressions in your node declarations or explicit fact matching for classification (though be warned that fact based classification may be considered insecure).")
|
1494
|
+
end
|
1495
|
+
}
|
1420
1496
|
}
|
1421
1497
|
)
|
1422
1498
|
|
1423
|
-
define_settings(:device,
|
1499
|
+
settings.define_settings(:device,
|
1424
1500
|
:devicedir => {
|
1425
1501
|
:default => "$vardir/devices",
|
1426
1502
|
:type => :directory,
|
@@ -1435,7 +1511,7 @@ EOT
|
|
1435
1511
|
}
|
1436
1512
|
)
|
1437
1513
|
|
1438
|
-
define_settings(:agent,
|
1514
|
+
settings.define_settings(:agent,
|
1439
1515
|
:node_name_value => {
|
1440
1516
|
:default => "$certname",
|
1441
1517
|
:desc => "The explicit value used for the node name for all requests the agent
|
@@ -1560,6 +1636,12 @@ EOT
|
|
1560
1636
|
:default => lambda { Puppet::Settings.domain_fact },
|
1561
1637
|
:desc => "The domain which will be queried to find the SRV records of servers to use.",
|
1562
1638
|
},
|
1639
|
+
:http_extra_headers => {
|
1640
|
+
:default => [],
|
1641
|
+
:type => :http_extra_headers,
|
1642
|
+
:desc => "The list of extra headers that will be sent with http requests to the master.
|
1643
|
+
The header definition consists of a name and a value separated by a colon."
|
1644
|
+
},
|
1563
1645
|
:ignoreschedules => {
|
1564
1646
|
:default => false,
|
1565
1647
|
:type => :boolean,
|
@@ -1716,10 +1798,27 @@ EOT
|
|
1716
1798
|
:type => :boolean,
|
1717
1799
|
:desc => "Whether to send reports after every transaction.",
|
1718
1800
|
},
|
1801
|
+
:report_include_system_store => {
|
1802
|
+
:default => false,
|
1803
|
+
:type => :boolean,
|
1804
|
+
:desc => "Whether the 'http' report processor should include the system
|
1805
|
+
certificate store when submitting reports to HTTPS URLs. If false, then
|
1806
|
+
the 'http' processor will only trust HTTPS report servers whose certificates
|
1807
|
+
are issued by the puppet CA or one of its intermediate CAs. If true, the
|
1808
|
+
processor will additionally trust CA certificates in the system's
|
1809
|
+
certificate store."
|
1810
|
+
},
|
1719
1811
|
:resubmit_facts => {
|
1720
1812
|
:default => false,
|
1721
1813
|
:type => :boolean,
|
1722
|
-
:desc => "Whether to send updated facts after every transaction.
|
1814
|
+
:desc => "Whether to send updated facts after every transaction. By default
|
1815
|
+
puppet only submits facts at the beginning of the transaction before applying a
|
1816
|
+
catalog. Since puppet can modify the state of the system, the value of the facts
|
1817
|
+
may change after puppet finishes. Therefore, any facts stored in puppetdb may not
|
1818
|
+
be consistent until the agent next runs, typically in 30 minutes. If this feature
|
1819
|
+
is enabled, puppet will resubmit facts after applying its catalog, ensuring facts
|
1820
|
+
for the node stored in puppetdb are current. However, this will double the fact
|
1821
|
+
submission load on puppetdb, so it is disabled by default.",
|
1723
1822
|
},
|
1724
1823
|
:lastrunfile => {
|
1725
1824
|
:default => "$statedir/last_run_summary.yaml",
|
@@ -1783,12 +1882,31 @@ EOT
|
|
1783
1882
|
certificate request to be signed. A value of `unlimited` will cause puppet agent
|
1784
1883
|
to ask for a signed certificate indefinitely.
|
1785
1884
|
#{AS_DURATION}",
|
1885
|
+
},
|
1886
|
+
:waitforlock => {
|
1887
|
+
:default => "0",
|
1888
|
+
:type => :duration,
|
1889
|
+
:desc => "How frequently puppet agent should try running when there is an
|
1890
|
+
already ongoing puppet agent instance.
|
1891
|
+
|
1892
|
+
This argument is by default disabled (value set to 0). In this case puppet agent will
|
1893
|
+
immediatly exit if it cannot run at that moment. When a value other than 0 is set, this
|
1894
|
+
can also be used in combination with the `maxwaitforlock` argument.
|
1895
|
+
#{AS_DURATION}",
|
1896
|
+
},
|
1897
|
+
:maxwaitforlock => {
|
1898
|
+
:default => "1m",
|
1899
|
+
:type => :ttl,
|
1900
|
+
:desc => "The maximum amount of time the puppet agent should wait for an
|
1901
|
+
already running puppet agent to finish before starting a new one. This is set by default to 1 minute.
|
1902
|
+
A value of `unlimited` will cause puppet agent to wait indefinitely.
|
1903
|
+
#{AS_DURATION}",
|
1786
1904
|
}
|
1787
1905
|
)
|
1788
1906
|
|
1789
1907
|
# Plugin information.
|
1790
1908
|
|
1791
|
-
define_settings(
|
1909
|
+
settings.define_settings(
|
1792
1910
|
:main,
|
1793
1911
|
:plugindest => {
|
1794
1912
|
:type => :directory,
|
@@ -1831,7 +1949,7 @@ EOT
|
|
1831
1949
|
|
1832
1950
|
# Central fact information.
|
1833
1951
|
|
1834
|
-
define_settings(
|
1952
|
+
settings.define_settings(
|
1835
1953
|
:main,
|
1836
1954
|
:factpath => {
|
1837
1955
|
:type => :path,
|
@@ -1848,7 +1966,7 @@ EOT
|
|
1848
1966
|
}
|
1849
1967
|
)
|
1850
1968
|
|
1851
|
-
define_settings(
|
1969
|
+
settings.define_settings(
|
1852
1970
|
:transaction,
|
1853
1971
|
:tags => {
|
1854
1972
|
:default => "",
|
@@ -1876,7 +1994,7 @@ EOT
|
|
1876
1994
|
}
|
1877
1995
|
)
|
1878
1996
|
|
1879
|
-
define_settings(
|
1997
|
+
settings.define_settings(
|
1880
1998
|
:main,
|
1881
1999
|
:external_nodes => {
|
1882
2000
|
:default => "none",
|
@@ -1901,7 +2019,7 @@ EOT
|
|
1901
2019
|
}
|
1902
2020
|
)
|
1903
2021
|
|
1904
|
-
define_settings(
|
2022
|
+
settings.define_settings(
|
1905
2023
|
:ldap,
|
1906
2024
|
:ldapssl => {
|
1907
2025
|
:default => false,
|
@@ -1970,7 +2088,7 @@ EOT
|
|
1970
2088
|
}
|
1971
2089
|
)
|
1972
2090
|
|
1973
|
-
define_settings(:master,
|
2091
|
+
settings.define_settings(:master,
|
1974
2092
|
:storeconfigs => {
|
1975
2093
|
:default => false,
|
1976
2094
|
:type => :boolean,
|
@@ -1988,7 +2106,7 @@ EOT
|
|
1988
2106
|
require 'puppet/node/facts'
|
1989
2107
|
if value
|
1990
2108
|
Puppet::Resource::Catalog.indirection.set_global_setting(:cache_class, :store_configs)
|
1991
|
-
|
2109
|
+
settings.override_default(:catalog_cache_terminus, :store_configs)
|
1992
2110
|
Puppet::Node::Facts.indirection.set_global_setting(:cache_class, :store_configs)
|
1993
2111
|
Puppet::Resource.indirection.set_global_setting(:terminus_class, :store_configs)
|
1994
2112
|
end
|
@@ -2003,7 +2121,7 @@ EOT
|
|
2003
2121
|
}
|
2004
2122
|
)
|
2005
2123
|
|
2006
|
-
define_settings(:parser,
|
2124
|
+
settings.define_settings(:parser,
|
2007
2125
|
:max_errors => {
|
2008
2126
|
:default => 10,
|
2009
2127
|
:desc => <<-'EOT'
|
@@ -2055,7 +2173,7 @@ EOT
|
|
2055
2173
|
EOT
|
2056
2174
|
}
|
2057
2175
|
)
|
2058
|
-
define_settings(:puppetdoc,
|
2176
|
+
settings.define_settings(:puppetdoc,
|
2059
2177
|
:document_all => {
|
2060
2178
|
:default => false,
|
2061
2179
|
:type => :boolean,
|
@@ -2064,7 +2182,7 @@ EOT
|
|
2064
2182
|
}
|
2065
2183
|
)
|
2066
2184
|
|
2067
|
-
define_settings(
|
2185
|
+
settings.define_settings(
|
2068
2186
|
:main,
|
2069
2187
|
:rich_data => {
|
2070
2188
|
:default => true,
|
@@ -2081,5 +2199,5 @@ EOT
|
|
2081
2199
|
EOT
|
2082
2200
|
}
|
2083
2201
|
)
|
2084
|
-
|
2202
|
+
end
|
2085
2203
|
end
|