puppet 5.3.7 → 5.4.0
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/CONTRIBUTING.md +42 -29
- data/README.md +8 -6
- data/ext/cert_inspector +2 -2
- data/ext/envpuppet +1 -1
- data/ext/gentoo/init.d/puppetmaster +4 -4
- data/ext/ips/puppet-agent +11 -11
- data/ext/ips/puppet-master +11 -11
- data/ext/puppet-test +1 -2
- data/ext/redhat/client.init +2 -2
- data/ext/redhat/logrotate +1 -1
- data/ext/solaris/smf/puppet +11 -11
- data/ext/solaris/smf/svc-puppetd +5 -5
- data/ext/solaris/smf/svc-puppetmasterd +5 -5
- data/ext/windows/service/daemon.rb +1 -1
- data/install.rb +2 -3
- data/lib/puppet/agent.rb +1 -1
- data/lib/puppet/application/cert.rb +1 -3
- data/lib/puppet/application/describe.rb +0 -1
- data/lib/puppet/application/device.rb +12 -99
- data/lib/puppet/application/filebucket.rb +32 -11
- data/lib/puppet/application/lookup.rb +1 -11
- data/lib/puppet/application/script.rb +261 -0
- data/lib/puppet/configurer.rb +3 -4
- data/lib/puppet/configurer/plugin_handler.rb +26 -9
- data/lib/puppet/context.rb +1 -1
- data/lib/puppet/datatypes.rb +213 -0
- data/lib/puppet/datatypes/error.rb +21 -0
- data/lib/puppet/datatypes/impl/error.rb +40 -0
- data/lib/puppet/defaults.rb +51 -20
- data/lib/puppet/environments.rb +17 -0
- data/lib/puppet/error.rb +17 -0
- data/lib/puppet/etc.rb +2 -2
- data/lib/puppet/external/pson/pure/generator.rb +1 -1
- data/lib/puppet/external/pson/pure/parser.rb +1 -1
- data/lib/puppet/face/config.rb +45 -0
- data/lib/puppet/face/epp.rb +3 -3
- data/lib/puppet/face/help/action.erb +3 -0
- data/lib/puppet/face/module/build.rb +1 -0
- data/lib/puppet/face/module/generate.rb +5 -0
- data/lib/puppet/face/module/install.rb +1 -0
- data/lib/puppet/face/module/search.rb +6 -2
- data/lib/puppet/face/module/uninstall.rb +1 -0
- data/lib/puppet/face/module/upgrade.rb +1 -0
- data/lib/puppet/face/parser.rb +0 -1
- data/lib/puppet/face/plugin.rb +1 -3
- data/lib/puppet/feature/base.rb +1 -1
- data/lib/puppet/feature/bolt.rb +3 -0
- data/lib/puppet/file_bucket/dipper.rb +1 -2
- data/lib/puppet/file_serving/http_metadata.rb +1 -1
- data/lib/puppet/file_system/uniquefile.rb +2 -2
- data/lib/puppet/forge.rb +6 -0
- data/lib/puppet/functions.rb +70 -88
- data/lib/puppet/functions/all.rb +6 -2
- data/lib/puppet/functions/annotate.rb +1 -1
- data/lib/puppet/functions/any.rb +7 -3
- data/lib/puppet/functions/contain.rb +6 -0
- data/lib/puppet/functions/convert_to.rb +32 -0
- data/lib/puppet/functions/defined.rb +0 -3
- data/lib/puppet/functions/each.rb +10 -6
- data/lib/puppet/functions/filter.rb +16 -10
- data/lib/puppet/functions/find_file.rb +0 -1
- data/lib/puppet/functions/include.rb +6 -0
- data/lib/puppet/functions/map.rb +12 -9
- data/lib/puppet/functions/module_directory.rb +41 -0
- data/lib/puppet/functions/new.rb +1 -4
- data/lib/puppet/functions/regsubst.rb +1 -1
- data/lib/puppet/functions/require.rb +6 -0
- data/lib/puppet/generate/type.rb +1 -1
- data/lib/puppet/gettext/config.rb +2 -2
- data/lib/puppet/gettext/stubs.rb +1 -1
- data/lib/puppet/indirector/catalog/compiler.rb +0 -1
- data/lib/puppet/indirector/file_bucket_file/file.rb +6 -2
- data/lib/puppet/indirector/file_server.rb +1 -1
- data/lib/puppet/indirector/node/ldap.rb +19 -3
- data/lib/puppet/indirector/request.rb +10 -6
- data/lib/puppet/indirector/rest.rb +11 -12
- data/lib/puppet/info_service/class_information_service.rb +1 -1
- data/lib/puppet/interface/action.rb +11 -0
- data/lib/puppet/interface/action_builder.rb +8 -0
- data/lib/puppet/interface/option_manager.rb +1 -1
- data/lib/puppet/loaders.rb +2 -0
- data/lib/puppet/module.rb +6 -2
- data/lib/puppet/module_tool/applications/builder.rb +4 -0
- data/lib/puppet/module_tool/applications/installer.rb +3 -0
- data/lib/puppet/module_tool/applications/uninstaller.rb +3 -0
- data/lib/puppet/module_tool/applications/unpacker.rb +1 -1
- data/lib/puppet/module_tool/applications/upgrader.rb +3 -0
- data/lib/puppet/module_tool/installed_modules.rb +1 -1
- data/lib/puppet/module_tool/metadata.rb +0 -1
- data/lib/puppet/network/authstore.rb +1 -1
- data/lib/puppet/network/http/api/indirected_routes.rb +1 -1
- data/lib/puppet/network/http/connection.rb +1 -9
- data/lib/puppet/network/http/factory.rb +0 -3
- data/lib/puppet/network/http/webrick.rb +1 -0
- data/lib/puppet/network/rights.rb +1 -1
- data/lib/puppet/node.rb +53 -0
- data/lib/puppet/node/environment.rb +1 -1
- data/lib/puppet/parameter/boolean.rb +1 -1
- data/lib/puppet/parser.rb +1 -0
- data/lib/puppet/parser/abstract_compiler.rb +36 -0
- data/lib/puppet/parser/ast/branch.rb +1 -1
- data/lib/puppet/parser/ast/pops_bridge.rb +8 -52
- data/lib/puppet/parser/compiler.rb +4 -54
- data/lib/puppet/parser/functions.rb +0 -1
- data/lib/puppet/parser/functions/create_resources.rb +6 -0
- data/lib/puppet/parser/functions/fqdn_rand.rb +6 -2
- data/lib/puppet/parser/functions/inline_template.rb +6 -0
- data/lib/puppet/parser/functions/new.rb +47 -32
- data/lib/puppet/parser/functions/realize.rb +6 -0
- data/lib/puppet/parser/functions/return.rb +1 -22
- data/lib/puppet/parser/functions/reverse_each.rb +1 -1
- data/lib/puppet/parser/functions/scanf.rb +1 -1
- data/lib/puppet/parser/functions/sha256.rb +5 -0
- data/lib/puppet/parser/functions/tag.rb +6 -0
- data/lib/puppet/parser/functions/tagged.rb +6 -0
- data/lib/puppet/parser/functions/template.rb +5 -0
- data/lib/puppet/parser/scope.rb +28 -4
- data/lib/puppet/parser/script_compiler.rb +118 -0
- data/lib/puppet/parser/type_loader.rb +1 -1
- data/lib/puppet/pops.rb +1 -1
- data/lib/puppet/pops/evaluator/access_operator.rb +38 -4
- data/lib/puppet/pops/evaluator/closure.rb +12 -4
- data/lib/puppet/pops/evaluator/compare_operator.rb +4 -4
- data/lib/puppet/pops/evaluator/epp_evaluator.rb +13 -0
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +38 -10
- data/lib/puppet/pops/evaluator/literal_evaluator.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_converter.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_support.rb +2 -3
- data/lib/puppet/pops/functions/dispatch.rb +6 -5
- data/lib/puppet/pops/functions/function.rb +2 -2
- data/lib/puppet/pops/issues.rb +34 -2
- data/lib/puppet/pops/loader/base_loader.rb +10 -0
- data/lib/puppet/pops/loader/dependency_loader.rb +7 -0
- data/lib/puppet/pops/loader/loader.rb +21 -2
- data/lib/puppet/pops/loader/loader_paths.rb +180 -30
- data/lib/puppet/pops/loader/module_loaders.rb +202 -33
- data/lib/puppet/pops/loader/puppet_plan_instantiator.rb +84 -0
- data/lib/puppet/pops/loader/puppet_resource_type_impl_instantiator.rb +9 -9
- data/lib/puppet/pops/loader/ruby_data_type_instantiator.rb +40 -0
- data/lib/puppet/pops/loader/runtime3_type_loader.rb +6 -1
- data/lib/puppet/pops/loader/static_loader.rb +23 -8
- data/lib/puppet/pops/loader/task_instantiator.rb +69 -0
- data/lib/puppet/pops/loader/type_definition_instantiator.rb +4 -0
- data/lib/puppet/pops/loaders.rb +122 -11
- data/lib/puppet/pops/lookup/data_dig_function_provider.rb +1 -1
- data/lib/puppet/pops/lookup/interpolation.rb +1 -1
- data/lib/puppet/pops/lookup/lookup_adapter.rb +0 -1
- data/lib/puppet/pops/model/ast.pp +3 -0
- data/lib/puppet/pops/model/ast.rb +34 -1
- data/lib/puppet/pops/model/factory.rb +30 -3
- data/lib/puppet/pops/model/model_label_provider.rb +1 -0
- data/lib/puppet/pops/model/model_tree_dumper.rb +12 -1
- data/lib/puppet/pops/model/tree_dumper.rb +1 -1
- data/lib/puppet/pops/parser/code_merger.rb +2 -2
- data/lib/puppet/pops/parser/egrammar.ra +44 -15
- data/lib/puppet/pops/parser/eparser.rb +1687 -1571
- data/lib/puppet/pops/parser/epp_support.rb +1 -3
- data/lib/puppet/pops/parser/evaluating_parser.rb +1 -1
- data/lib/puppet/pops/parser/interpolation_support.rb +2 -2
- data/lib/puppet/pops/parser/lexer2.rb +4 -4
- data/lib/puppet/pops/parser/lexer_support.rb +2 -2
- data/lib/puppet/pops/parser/locatable.rb +1 -1
- data/lib/puppet/pops/parser/locator.rb +7 -13
- data/lib/puppet/pops/parser/parser_support.rb +3 -3
- data/lib/puppet/pops/parser/slurp_support.rb +0 -3
- data/lib/puppet/pops/pcore.rb +45 -0
- data/lib/puppet/pops/resource/param.rb +1 -1
- data/lib/puppet/pops/resource/resource_type_impl.rb +1 -1
- data/lib/puppet/pops/serialization/abstract_reader.rb +4 -0
- data/lib/puppet/pops/serialization/abstract_writer.rb +6 -0
- data/lib/puppet/pops/serialization/extension.rb +1 -0
- data/lib/puppet/pops/serialization/from_data_converter.rb +64 -10
- data/lib/puppet/pops/serialization/json_path.rb +2 -1
- data/lib/puppet/pops/serialization/object.rb +3 -4
- data/lib/puppet/pops/serialization/serializer.rb +2 -1
- data/lib/puppet/pops/serialization/to_data_converter.rb +7 -3
- data/lib/puppet/pops/time/timespan.rb +1 -1
- data/lib/puppet/pops/types/iterable.rb +38 -9
- data/lib/puppet/pops/types/p_init_type.rb +1 -1
- data/lib/puppet/pops/types/p_meta_type.rb +4 -0
- data/lib/puppet/pops/types/p_object_type.rb +146 -14
- data/lib/puppet/pops/types/p_object_type_extension.rb +218 -0
- data/lib/puppet/pops/types/p_sem_ver_range_type.rb +0 -1
- data/lib/puppet/pops/types/p_sem_ver_type.rb +10 -2
- data/lib/puppet/pops/types/p_type_set_type.rb +0 -1
- data/lib/puppet/pops/types/p_uri_type.rb +190 -0
- data/lib/puppet/pops/types/puppet_object.rb +15 -1
- data/lib/puppet/pops/types/ruby_generator.rb +46 -54
- data/lib/puppet/pops/types/string_converter.rb +22 -1
- data/lib/puppet/pops/types/type_acceptor.rb +1 -1
- data/lib/puppet/pops/types/type_calculator.rb +13 -4
- data/lib/puppet/pops/types/type_factory.rb +29 -5
- data/lib/puppet/pops/types/type_formatter.rb +67 -4
- data/lib/puppet/pops/types/type_parser.rb +92 -4
- data/lib/puppet/pops/types/type_with_members.rb +43 -0
- data/lib/puppet/pops/types/types.rb +212 -80
- data/lib/puppet/pops/validation/checker4_0.rb +10 -6
- data/lib/puppet/pops/validation/tasks_checker.rb +60 -0
- data/lib/puppet/pops/validation/validator_factory_4_0.rb +6 -1
- data/lib/puppet/property.rb +1 -1
- data/lib/puppet/provider.rb +18 -8
- data/lib/puppet/provider/augeas/augeas.rb +3 -4
- data/lib/puppet/provider/exec.rb +0 -2
- data/lib/puppet/provider/group/groupadd.rb +25 -1
- data/lib/puppet/provider/group/windows_adsi.rb +7 -4
- data/lib/puppet/provider/mount.rb +25 -8
- data/lib/puppet/provider/nameservice.rb +9 -4
- data/lib/puppet/provider/nameservice/directoryservice.rb +3 -3
- data/lib/puppet/provider/nameservice/objectadd.rb +13 -24
- data/lib/puppet/provider/nameservice/pw.rb +14 -14
- data/lib/puppet/provider/package/appdmg.rb +0 -1
- data/lib/puppet/provider/package/apple.rb +0 -1
- data/lib/puppet/provider/package/gem.rb +2 -2
- data/lib/puppet/provider/package/macports.rb +2 -2
- data/lib/puppet/provider/package/pkg.rb +3 -0
- data/lib/puppet/provider/package/pkgdmg.rb +0 -1
- data/lib/puppet/provider/package/portage.rb +0 -1
- data/lib/puppet/provider/package/yum.rb +23 -8
- data/lib/puppet/provider/package/zypper.rb +2 -2
- data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +2 -2
- data/lib/puppet/provider/service/init.rb +1 -0
- data/lib/puppet/provider/service/launchd.rb +6 -7
- data/lib/puppet/provider/service/redhat.rb +3 -2
- data/lib/puppet/provider/service/systemd.rb +2 -2
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
- data/lib/puppet/provider/user/aix.rb +3 -2
- data/lib/puppet/provider/user/openbsd.rb +1 -1
- data/lib/puppet/provider/user/pw.rb +1 -1
- data/lib/puppet/provider/user/user_role_add.rb +7 -1
- data/lib/puppet/provider/user/useradd.rb +36 -6
- data/lib/puppet/provider/user/windows_adsi.rb +1 -1
- data/lib/puppet/provider/yumrepo/inifile.rb +2 -4
- data/lib/puppet/provider/zfs/zfs.rb +23 -3
- data/lib/puppet/provider/zpool/zpool.rb +1 -1
- data/lib/puppet/reference/configuration.rb +0 -2
- data/lib/puppet/reference/type.rb +0 -1
- data/lib/puppet/resource.rb +1 -2
- data/lib/puppet/resource/catalog.rb +1 -1
- data/lib/puppet/resource/status.rb +0 -1
- data/lib/puppet/resource/type.rb +4 -4
- data/lib/puppet/resource/type_collection.rb +1 -1
- data/lib/puppet/settings/base_setting.rb +1 -1
- data/lib/puppet/settings/environment_conf.rb +0 -1
- data/lib/puppet/settings/ini_file.rb +66 -12
- data/lib/puppet/ssl/certificate_authority.rb +1 -1
- data/lib/puppet/ssl/certificate_request.rb +2 -2
- data/lib/puppet/ssl/certificate_revocation_list.rb +2 -1
- data/lib/puppet/ssl/certificate_signer.rb +11 -0
- data/lib/puppet/ssl/host.rb +2 -2
- data/lib/puppet/syntax_checkers/base64.rb +1 -1
- data/lib/puppet/transaction.rb +37 -14
- data/lib/puppet/transaction/report.rb +3 -1
- data/lib/puppet/type.rb +17 -4
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/exec.rb +5 -4
- data/lib/puppet/type/file.rb +3 -3
- data/lib/puppet/type/file/checksum.rb +7 -1
- data/lib/puppet/type/file/checksum_value.rb +4 -3
- data/lib/puppet/type/group.rb +3 -0
- data/lib/puppet/type/k5login.rb +101 -0
- data/lib/puppet/type/macauthorization.rb +1 -1
- data/lib/puppet/type/mount.rb +6 -2
- data/lib/puppet/type/tidy.rb +6 -4
- data/lib/puppet/type/user.rb +26 -39
- data/lib/puppet/type/yumrepo.rb +9 -0
- data/lib/puppet/type/zfs.rb +4 -0
- data/lib/puppet/util.rb +8 -15
- data/lib/puppet/util/character_encoding.rb +2 -2
- data/lib/puppet/util/checksums.rb +82 -1
- data/lib/puppet/util/errors.rb +0 -2
- data/lib/puppet/util/filetype.rb +2 -2
- data/lib/puppet/util/json_lockfile.rb +1 -1
- data/lib/puppet/util/log.rb +1 -1
- data/lib/puppet/util/log/destinations.rb +10 -1
- data/lib/puppet/util/monkey_patches.rb +1 -1
- data/lib/puppet/util/network_device/cisco/device.rb +5 -5
- data/lib/puppet/util/network_device/config.rb +2 -3
- data/lib/puppet/util/platform.rb +13 -0
- data/lib/puppet/util/plist.rb +4 -4
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +2 -2
- data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc2.rb +1 -1
- data/lib/puppet/util/reference.rb +8 -1
- data/lib/puppet/util/windows/adsi.rb +18 -15
- data/lib/puppet/util/windows/principal.rb +6 -7
- data/lib/puppet/util/windows/process.rb +1 -1
- data/lib/puppet/util/windows/registry.rb +2 -2
- data/lib/puppet/util/windows/sid.rb +7 -62
- data/lib/puppet/vendor/deep_merge/README.md +2 -2
- data/lib/puppet/vendor/pathspec/lib/pathspec/gitignorespec.rb +18 -18
- data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version.rb +2 -2
- data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet/version_range.rb +5 -5
- data/lib/puppet/vendor/semantic_puppet/locales/config.yaml +1 -1
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet_pal.rb +874 -0
- data/locales/ja/puppet.po +140 -163
- data/locales/puppet.pot +940 -597
- data/man/man5/puppet.conf.5 +16 -91
- data/man/man8/puppet-agent.8 +2 -6
- data/man/man8/puppet-apply.8 +2 -2
- data/man/man8/puppet-ca.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-cert.8 +1 -1
- data/man/man8/puppet-certificate.8 +1 -1
- data/man/man8/puppet-certificate_request.8 +1 -1
- data/man/man8/puppet-certificate_revocation_list.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 +11 -33
- 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 +4 -22
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- 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-master.8 +1 -1
- data/man/man8/puppet-module.8 +2 -11
- 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-status.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/integration/application/lookup_spec.rb +0 -21
- data/spec/integration/parser/compiler_spec.rb +18 -0
- data/spec/integration/parser/script_compiler_spec.rb +113 -0
- data/spec/integration/provider/mount_spec.rb +2 -0
- data/spec/integration/type/file_spec.rb +11 -3
- data/spec/integration/util/windows/adsi_spec.rb +1 -86
- data/spec/integration/util/windows/principal_spec.rb +1 -10
- data/spec/shared_contexts/checksum.rb +4 -1
- data/spec/shared_contexts/digests.rb +46 -1
- data/spec/shared_contexts/types_setup.rb +8 -3
- data/spec/unit/agent_spec.rb +2 -2
- data/spec/unit/application/cert_spec.rb +5 -17
- data/spec/unit/application/device_spec.rb +2 -96
- data/spec/unit/application/filebucket_spec.rb +18 -4
- data/spec/unit/configurer/plugin_handler_spec.rb +5 -32
- data/spec/unit/configurer_spec.rb +3 -3
- data/spec/unit/datatypes_spec.rb +304 -0
- data/spec/unit/defaults_spec.rb +41 -20
- data/spec/unit/face/config_spec.rb +46 -1
- data/spec/unit/face/epp_face_spec.rb +7 -3
- data/spec/unit/face/module/search_spec.rb +11 -0
- data/spec/unit/face/parser_spec.rb +2 -2
- data/spec/unit/file_bucket/dipper_spec.rb +12 -1
- data/spec/unit/forge/module_release_spec.rb +70 -0
- data/spec/unit/functions/break_spec.rb +34 -2
- data/spec/unit/functions/contain_spec.rb +1 -0
- data/spec/unit/functions/convert_to_spec.rb +22 -0
- data/spec/unit/functions/epp_spec.rb +5 -0
- data/spec/unit/functions/include_spec.rb +15 -0
- data/spec/unit/functions/module_directory_spec.rb +43 -0
- data/spec/unit/functions/new_spec.rb +14 -14
- data/spec/unit/functions/require_spec.rb +2 -0
- data/spec/unit/functions/shared.rb +12 -0
- data/spec/unit/functions/step_spec.rb +1 -1
- data/spec/unit/functions4_spec.rb +49 -4
- data/spec/unit/indirector/catalog/compiler_spec.rb +3 -3
- data/spec/unit/indirector/file_bucket_file/file_spec.rb +148 -94
- data/spec/unit/indirector/node/ldap_spec.rb +15 -12
- data/spec/unit/indirector/rest_spec.rb +0 -43
- data/spec/unit/interface/action_spec.rb +33 -0
- data/spec/unit/module_tool/applications/builder_spec.rb +7 -0
- data/spec/unit/module_tool/applications/installer_spec.rb +8 -0
- data/spec/unit/module_tool/applications/uninstaller_spec.rb +8 -0
- data/spec/unit/module_tool/applications/upgrader_spec.rb +6 -0
- data/spec/unit/network/http/connection_spec.rb +1 -1
- data/spec/unit/network/http/factory_spec.rb +28 -35
- data/spec/unit/parser/compiler_spec.rb +0 -8
- data/spec/unit/parser/environment_compiler_spec.rb +36 -0
- data/spec/unit/parser/functions/create_resources_spec.rb +9 -0
- data/spec/unit/parser/functions/inline_template_spec.rb +7 -0
- data/spec/unit/parser/functions/realize_spec.rb +9 -0
- data/spec/unit/parser/functions/tag_spec.rb +7 -0
- data/spec/unit/parser/functions/tagged_spec.rb +25 -0
- data/spec/unit/parser/functions/template_spec.rb +8 -0
- data/spec/unit/parser/scope_spec.rb +19 -0
- data/spec/unit/pops/evaluator/conditionals_spec.rb +1 -1
- data/spec/unit/pops/loaders/loader_spec.rb +516 -0
- data/spec/unit/pops/loaders/loaders_spec.rb +11 -0
- data/spec/unit/pops/loaders/module_loaders_spec.rb +43 -0
- data/spec/unit/pops/loaders/static_loader_spec.rb +15 -7
- data/spec/unit/pops/model/model_spec.rb +5 -0
- data/spec/unit/pops/parser/lexer2_spec.rb +15 -0
- data/spec/unit/pops/parser/locator_spec.rb +20 -0
- data/spec/unit/pops/parser/parse_basic_expressions_spec.rb +33 -0
- data/spec/unit/pops/parser/parse_calls_spec.rb +28 -0
- data/spec/unit/pops/parser/parse_conditionals_spec.rb +12 -0
- data/spec/unit/pops/parser/parse_plan_spec.rb +48 -0
- data/spec/unit/pops/serialization/packer_spec.rb +8 -0
- data/spec/unit/pops/serialization/serialization_spec.rb +30 -0
- data/spec/unit/pops/serialization/to_from_hr_spec.rb +31 -0
- data/spec/unit/pops/types/error_spec.rb +207 -0
- data/spec/unit/pops/types/p_init_type_spec.rb +98 -0
- data/spec/unit/pops/types/p_object_type_spec.rb +275 -10
- data/spec/unit/pops/types/p_uri_type_spec.rb +191 -0
- data/spec/unit/pops/types/ruby_generator_spec.rb +82 -44
- data/spec/unit/pops/types/task_spec.rb +353 -0
- data/spec/unit/pops/types/type_calculator_spec.rb +76 -5
- data/spec/unit/pops/types/type_formatter_spec.rb +31 -13
- data/spec/unit/pops/types/type_parser_spec.rb +13 -1
- data/spec/unit/pops/types/types_spec.rb +60 -0
- data/spec/unit/pops/validator/validator_spec.rb +76 -0
- data/spec/unit/provider/group/groupadd_spec.rb +77 -1
- data/spec/unit/provider/group/pw_spec.rb +4 -4
- data/spec/unit/provider/group/windows_adsi_spec.rb +22 -79
- data/spec/unit/provider/mount_spec.rb +18 -5
- data/spec/unit/provider/nameservice_spec.rb +5 -5
- data/spec/unit/provider/package/dnf_spec.rb +2 -2
- data/spec/unit/provider/package/gem_spec.rb +1 -1
- data/spec/unit/provider/package/pkg_spec.rb +3 -0
- data/spec/unit/provider/package/yum_spec.rb +40 -0
- data/spec/unit/provider/service/launchd_spec.rb +2 -1
- data/spec/unit/provider/service/redhat_spec.rb +5 -0
- data/spec/unit/provider/service/systemd_spec.rb +1 -1
- data/spec/unit/provider/user/hpux_spec.rb +2 -2
- data/spec/unit/provider/user/openbsd_spec.rb +2 -2
- data/spec/unit/provider/user/pw_spec.rb +14 -14
- data/spec/unit/provider/user/user_role_add_spec.rb +19 -2
- data/spec/unit/provider/user/useradd_spec.rb +188 -22
- data/spec/unit/provider/user/windows_adsi_spec.rb +4 -4
- data/spec/unit/provider/zfs/zfs_spec.rb +55 -1
- data/spec/unit/provider_spec.rb +48 -0
- data/spec/unit/puppet_pal_2pec.rb +1005 -0
- data/spec/unit/puppet_pal_spec.rb +11 -0
- data/spec/unit/settings/ini_file_spec.rb +313 -2
- data/spec/unit/ssl/certificate_request_spec.rb +42 -1
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +2 -1
- data/spec/unit/transaction/report_spec.rb +1 -0
- data/spec/unit/transaction_spec.rb +112 -21
- data/spec/unit/type/file/checksum_spec.rb +20 -0
- data/spec/unit/type/file_spec.rb +8 -0
- data/spec/unit/type/group_spec.rb +8 -0
- data/spec/unit/type/k5login_spec.rb +22 -1
- data/spec/unit/type/scheduled_task_spec.rb +15 -0
- data/spec/unit/type/user_spec.rb +11 -1
- data/spec/unit/type/yumrepo_spec.rb +5 -0
- data/spec/unit/util/checksums_spec.rb +3 -3
- data/spec/unit/util/log/destinations_spec.rb +14 -0
- data/spec/unit/util/network_device/cisco/device_spec.rb +1 -1
- data/spec/unit/util/plist_spec.rb +3 -3
- data/spec/unit/util/windows/adsi_spec.rb +27 -31
- data/spec/unit/util/windows/sid_spec.rb +15 -86
- data/spec/unit/util_spec.rb +17 -3
- data/tasks/manpages.rake +1 -1
- metadata +216 -178
- data/lib/puppet/bindings.rb +0 -148
- data/lib/puppet/configurer/downloader_factory.rb +0 -44
- data/spec/unit/configurer/downloader_factory_spec.rb +0 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbcab5f5cb4399541643f5eed9ca003120fb707b
|
4
|
+
data.tar.gz: fe7a7969462ef7ad3d248565e3e82b0832575a69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59d5e430fcd6c54af6edcf3ea9118b1ed06ac993556b1a203be500a1448667f838479e7c614375033dbbf0eef986ce02cc89df1779c9834e80422657e9889bd8
|
7
|
+
data.tar.gz: 0ae09468a1d6783a3a4932d318319ecfbf651816c30c451edaa2f7c5175c1beea514a50b45832d488f95877d56099eb38bb370730248ebcb169f243a3ebfafb2
|
data/CONTRIBUTING.md
CHANGED
@@ -27,13 +27,13 @@ the [puppet-dev mailing list](https://groups.google.com/forum/#!forum/puppet-dev
|
|
27
27
|
|
28
28
|
## Getting Started
|
29
29
|
|
30
|
-
* Make sure you have a [Jira account](https://tickets.puppetlabs.com)
|
31
|
-
* Make sure you have a [GitHub account](https://github.com/signup/free)
|
30
|
+
* Make sure you have a [Jira account](https://tickets.puppetlabs.com).
|
31
|
+
* Make sure you have a [GitHub account](https://github.com/signup/free).
|
32
32
|
* Submit a Jira ticket for your issue if one does not already exist.
|
33
|
-
* Clearly describe the issue including steps to reproduce when it is a bug
|
33
|
+
* Clearly describe the issue including steps to reproduce when it is a bug.
|
34
34
|
* Make sure you fill in the earliest version that you know has the issue.
|
35
35
|
* A ticket is not necessary for [trivial changes](https://docs.puppet.com/community/trivial_patch_exemption.html)
|
36
|
-
* Fork the repository on GitHub
|
36
|
+
* Fork the repository on GitHub.
|
37
37
|
|
38
38
|
## Making Changes
|
39
39
|
|
@@ -41,27 +41,29 @@ the [puppet-dev mailing list](https://groups.google.com/forum/#!forum/puppet-dev
|
|
41
41
|
* This is usually the master branch.
|
42
42
|
* Only target release branches if you are certain your fix must be on that
|
43
43
|
branch.
|
44
|
-
* To quickly create a topic branch based on master
|
44
|
+
* To quickly create a topic branch based on master, run `git checkout -b
|
45
45
|
fix/master/my_contribution master`. Please avoid working directly on the
|
46
46
|
`master` branch.
|
47
47
|
* Make commits of logical and atomic units.
|
48
48
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
49
|
-
* Make sure your commit messages are in the proper format.
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
49
|
+
* Make sure your commit messages are in the proper format. If the commit
|
50
|
+
addresses an issue filed in the
|
51
|
+
[Puppet Jira project](https://tickets.puppetlabs.com/browse/PUP), start
|
52
|
+
the first line of the commit with the issue number in parentheses.
|
53
|
+
|
54
|
+
```
|
55
|
+
(PUP-1234) Make the example in CONTRIBUTING imperative and concrete
|
56
|
+
|
57
|
+
Without this patch applied the example commit message in the CONTRIBUTING
|
58
|
+
document is not a concrete example. This is a problem because the
|
59
|
+
contributor is left to imagine what the commit message should look like
|
60
|
+
based on a description rather than an example. This patch fixes the
|
61
|
+
problem by making the example concrete and imperative.
|
62
|
+
|
63
|
+
The first line is a real-life imperative statement with a ticket number
|
64
|
+
from our issue tracker. The body describes the behavior without the patch,
|
65
|
+
why this is a problem, and how the patch fixes the problem when applied.
|
66
|
+
```
|
65
67
|
* Make sure you have added the necessary tests for your changes.
|
66
68
|
* Run _all_ the tests to assure nothing else was accidentally broken. First
|
67
69
|
install all the test dependencies with `bundle install --path .bundle`. Then
|
@@ -77,9 +79,10 @@ wrapped in the `_()` translation function, so they can be extracted into files
|
|
77
79
|
for the translators.
|
78
80
|
|
79
81
|
When adding user-facing strings to your work, follow these guidelines:
|
82
|
+
|
80
83
|
* Use full sentences. Strings built up out of concatenated bits are hard to translate.
|
81
84
|
* Use string formatting instead of interpolation. Use the hash format and give good names to the placeholder values that can be used by translators to understand the meaning of the formatted values.
|
82
|
-
|
85
|
+
For example: `_('Creating new user %{name}.') % { name: user.name }`
|
83
86
|
* Use `n_()` for pluralization. (see gettext gem docs linked above for details)
|
84
87
|
|
85
88
|
It is the responsibility of contributors and code reviewers to ensure that all
|
@@ -92,25 +95,33 @@ ticket in Jira. In this case, it is appropriate to start the first line of a
|
|
92
95
|
commit with one of `(docs)`, `(maint)`, or `(packaging)` instead of a ticket
|
93
96
|
number.
|
94
97
|
|
95
|
-
|
96
|
-
|
98
|
+
If a Jira ticket exists for the documentation commit, you can include it
|
99
|
+
after the `(docs)` token.
|
100
|
+
|
101
|
+
```
|
102
|
+
(docs)(DOCUMENT-000) Add docs commit example to CONTRIBUTING
|
97
103
|
|
98
104
|
There is no example for contributing a documentation commit
|
99
105
|
to the Puppet repository. This is a problem because the contributor
|
100
106
|
is left to assume how a commit of this nature may appear.
|
101
107
|
|
102
|
-
The first line is a real
|
103
|
-
place of what would have been the ticket number in a
|
108
|
+
The first line is a real-life imperative statement with '(docs)' in
|
109
|
+
place of what would have been the PUP project ticket number in a
|
104
110
|
non-documentation related commit. The body describes the nature of
|
105
111
|
the new documentation or comments added.
|
106
|
-
|
112
|
+
```
|
113
|
+
|
114
|
+
For commits that address trivial repository maintenance tasks or packaging
|
115
|
+
issues, start the first line of the commit with `(maint)` or `(packaging)`,
|
116
|
+
respectively.
|
107
117
|
|
108
118
|
## Submitting Changes
|
109
119
|
|
110
120
|
* Sign the [Contributor License Agreement](http://links.puppet.com/cla).
|
111
121
|
* Push your changes to a topic branch in your fork of the repository.
|
112
122
|
* Submit a pull request to the repository in the puppetlabs organization.
|
113
|
-
* Update your Jira ticket to mark that you have submitted code and are ready
|
123
|
+
* Update your Jira ticket to mark that you have submitted code and are ready
|
124
|
+
for it to be reviewed (Status: Ready for Merge).
|
114
125
|
* Include a link to the pull request in the ticket.
|
115
126
|
* The core team looks at Pull Requests on a regular basis in a weekly triage
|
116
127
|
meeting that we hold in a public Google Hangout. The hangout is announced in
|
@@ -122,6 +133,7 @@ number.
|
|
122
133
|
weeks we may close the pull request if it isn't showing any activity.
|
123
134
|
|
124
135
|
## Revert Policy
|
136
|
+
|
125
137
|
By running tests in advance and by engaging with peer review for prospective
|
126
138
|
changes, your contributions have a high probability of becoming long lived
|
127
139
|
parts of the the project. After being merged, the code will run through a
|
@@ -142,10 +154,11 @@ ticket. This test(s) should be used to check future submissions of the code to
|
|
142
154
|
ensure the issue has been resolved.
|
143
155
|
|
144
156
|
### Summary
|
157
|
+
|
145
158
|
* Changes resulting in test pipeline failures will be reverted if they cannot
|
146
159
|
be resolved within one business day.
|
147
160
|
|
148
|
-
|
161
|
+
## Additional Resources
|
149
162
|
|
150
163
|
* [Puppet community guidelines](https://docs.puppet.com/community/community_guidelines.html)
|
151
164
|
* [Bug tracker (Jira)](https://tickets.puppetlabs.com)
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
Puppet
|
2
2
|
======
|
3
3
|
|
4
|
-
[![
|
5
|
-
[![
|
4
|
+
[![Travis Status](https://travis-ci.org/puppetlabs/puppet.svg?branch=master)](https://travis-ci.org/puppetlabs/puppet)
|
5
|
+
[![Appveyor Status](https://ci.appveyor.com/api/projects/status/cvhpypd4504sevqq/branch/master?svg=true)](https://ci.appveyor.com/project/puppetlabs/puppet/branch/master)
|
6
|
+
[![Gem Version](https://badge.fury.io/rb/puppet.svg)](https://badge.fury.io/rb/puppet)
|
7
|
+
[![Inline docs](https://inch-ci.org/github/puppetlabs/puppet.svg)](https://inch-ci.org/github/puppetlabs/puppet)
|
6
8
|
|
7
9
|
Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs
|
8
10
|
administrative tasks (such as adding users, installing packages, and updating server
|
@@ -16,7 +18,7 @@ Documentation for Puppet and related projects can be found online at the
|
|
16
18
|
|
17
19
|
HTTP API
|
18
20
|
--------
|
19
|
-
[HTTP API Index](https://puppet.com/docs/puppet/5.
|
21
|
+
[HTTP API Index](https://puppet.com/docs/puppet/5.4/http_api/http_api_index.html)
|
20
22
|
|
21
23
|
Installation
|
22
24
|
------------
|
@@ -26,7 +28,7 @@ which also includes orchestration features, a web console, and professional supp
|
|
26
28
|
[The PE documentation is available here.](https://puppet.com/docs/pe/latest)
|
27
29
|
|
28
30
|
To install an open source release of Puppet,
|
29
|
-
[see the installation guide on the docs site.](http://puppet.com/docs/puppet/5.
|
31
|
+
[see the installation guide on the docs site.](http://puppet.com/docs/puppet/5.4/install_pre.html)
|
30
32
|
|
31
33
|
If you need to run Puppet from source as a tester or developer,
|
32
34
|
[see the running from source guide on the docs site.](https://docs.puppet.com/puppet/3.8/from_source.html)
|
@@ -53,10 +55,10 @@ Support
|
|
53
55
|
|
54
56
|
Please log tickets and issues at our [JIRA tracker](https://tickets.puppetlabs.com). A [mailing
|
55
57
|
list](https://groups.google.com/forum/?fromgroups#!forum/puppet-users) is
|
56
|
-
available for asking questions and getting help from others. In addition there
|
58
|
+
available for asking questions and getting help from others. In addition, there
|
57
59
|
is an active #puppet channel on Freenode.
|
58
60
|
|
59
|
-
We use semantic version numbers for our releases
|
61
|
+
We use semantic version numbers for our releases and recommend that users stay
|
60
62
|
as up-to-date as possible by upgrading to patch releases and minor releases as
|
61
63
|
they become available.
|
62
64
|
|
data/ext/cert_inspector
CHANGED
@@ -97,7 +97,7 @@ class X509Collector
|
|
97
97
|
next unless public_key_info = extract_public_key_info(path, meaning)
|
98
98
|
public_key, priority, name = public_key_info
|
99
99
|
pem = public_key.to_s
|
100
|
-
existing_priority,
|
100
|
+
existing_priority, _, _ = key_data[pem]
|
101
101
|
next if existing_priority and existing_priority < priority
|
102
102
|
key_data[pem] = priority, name, public_key
|
103
103
|
rescue
|
@@ -106,7 +106,7 @@ class X509Collector
|
|
106
106
|
end
|
107
107
|
name_to_key_hash = {}
|
108
108
|
key_data.each do |pem, data|
|
109
|
-
|
109
|
+
_, name, public_key = data
|
110
110
|
if name_to_key_hash[name]
|
111
111
|
suffix_num = 2
|
112
112
|
while name_to_key_hash[name + " (#{suffix_num})"]
|
data/ext/envpuppet
CHANGED
@@ -48,7 +48,7 @@ will taint the development version
|
|
48
48
|
|
49
49
|
The following enviornment variables configure the behavior of envpuppet
|
50
50
|
|
51
|
-
ENVPUPPET_BASEDIR
|
51
|
+
ENVPUPPET_BASEDIR="${HOME}/src"
|
52
52
|
the base directory where puppet, facter, etc... live.
|
53
53
|
|
54
54
|
ENVPUPPET_BLEEDING=true Enables bleeding edge prototypes like
|
@@ -36,7 +36,7 @@ start() {
|
|
36
36
|
ebegin "Starting puppetmaster"
|
37
37
|
start-stop-daemon --start --quiet --exec /usr/bin/ruby /usr/bin/puppetmasterd \
|
38
38
|
-- ${options}
|
39
|
-
eend $? "Failed to start puppetmaster"
|
39
|
+
eend "$?" "Failed to start puppetmaster"
|
40
40
|
}
|
41
41
|
|
42
42
|
stop() {
|
@@ -44,8 +44,8 @@ stop() {
|
|
44
44
|
start-stop-daemon --stop --quiet \
|
45
45
|
--pidfile ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid
|
46
46
|
local ret=$?
|
47
|
-
eend ${ret} "Failed to stop puppetmaster"
|
48
|
-
rm -f ${PUPPETMASTER_PID_DIR}/puppetmasterd.pid
|
49
|
-
return ${ret}
|
47
|
+
eend "${ret}" "Failed to stop puppetmaster"
|
48
|
+
rm -f "${PUPPETMASTER_PID_DIR}/puppetmasterd.pid"
|
49
|
+
return "${ret}"
|
50
50
|
}
|
51
51
|
|
data/ext/ips/puppet-agent
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
. /lib/svc/share/smf_include.sh
|
4
4
|
|
5
|
-
[[ -z "${SMF_FMRI}" ]] && exit $SMF_EXIT_ERR
|
5
|
+
[[ -z "${SMF_FMRI}" ]] && exit "$SMF_EXIT_ERR"
|
6
6
|
|
7
7
|
typeset -r CONF_FILE=/etc/puppet/puppet.conf
|
8
|
-
[[ ! -f "${CONF_FILE}" ]] && exit $SMF_EXIT_ERR_CONFIG
|
8
|
+
[[ ! -f "${CONF_FILE}" ]] && exit "$SMF_EXIT_ERR_CONFIG"
|
9
9
|
|
10
10
|
typeset -r PUPPET=/usr/bin/puppet
|
11
11
|
|
12
12
|
case "$1" in
|
13
13
|
start)
|
14
|
-
exec $PUPPET agent
|
14
|
+
exec "$PUPPET" agent
|
15
15
|
;;
|
16
16
|
|
17
17
|
stop)
|
@@ -23,22 +23,22 @@ stop)
|
|
23
23
|
# continues until all processes are killed.
|
24
24
|
# svcs -p <fmri> lists all processes in the contract.
|
25
25
|
# http://bnsmb.de/solaris/My_Little_SMF_FAQ.html
|
26
|
-
ctid=`svcprop -p restarter/contract $SMF_FMRI`
|
26
|
+
ctid=`svcprop -p restarter/contract "$SMF_FMRI"`
|
27
27
|
if [ -n "$ctid" ]; then
|
28
|
-
smf_kill_contract $ctid TERM 1 5
|
28
|
+
smf_kill_contract "$ctid" TERM 1 5
|
29
29
|
ret=$?
|
30
|
-
[ $ret -eq 1 ] && exit $SMF_EXIT_ERR_FATAL
|
30
|
+
[ "$ret" -eq 1 ] && exit "$SMF_EXIT_ERR_FATAL"
|
31
31
|
|
32
|
-
if [ $ret -eq 2 ] ; then
|
33
|
-
smf_kill_contract $ctid KILL 1
|
34
|
-
[ $? -ne 0 ] && exit $SMF_EXIT_ERR_FATAL
|
32
|
+
if [ "$ret" -eq 2 ] ; then
|
33
|
+
smf_kill_contract "$ctid" KILL 1
|
34
|
+
[ $? -ne 0 ] && exit "$SMF_EXIT_ERR_FATAL"
|
35
35
|
fi
|
36
36
|
fi
|
37
37
|
;;
|
38
38
|
*)
|
39
39
|
echo "Usage: $0 {start|stop}";
|
40
|
-
exit $SMF_EXIT_ERR_FATAL
|
40
|
+
exit "$SMF_EXIT_ERR_FATAL"
|
41
41
|
;;
|
42
42
|
esac
|
43
|
-
exit $SMF_EXIT_OK
|
43
|
+
exit "$SMF_EXIT_OK"
|
44
44
|
|
data/ext/ips/puppet-master
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
. /lib/svc/share/smf_include.sh
|
4
4
|
|
5
|
-
[[ -z "${SMF_FMRI}" ]] && exit $SMF_EXIT_ERR
|
5
|
+
[[ -z "${SMF_FMRI}" ]] && exit "$SMF_EXIT_ERR"
|
6
6
|
|
7
7
|
typeset -r CONF_FILE=/etc/puppet/puppet.conf
|
8
|
-
[[ ! -f ${CONF_FILE} ]] && exit $SMF_EXIT_ERR_CONFIG
|
8
|
+
[[ ! -f "${CONF_FILE}" ]] && exit "$SMF_EXIT_ERR_CONFIG"
|
9
9
|
typeset -r PUPPET=/usr/bin/puppet
|
10
10
|
|
11
11
|
case "$1" in
|
12
12
|
start)
|
13
|
-
exec $PUPPET master --daemonize
|
13
|
+
exec "$PUPPET" master --daemonize
|
14
14
|
;;
|
15
15
|
|
16
16
|
stop)
|
@@ -23,22 +23,22 @@ stop)
|
|
23
23
|
# svcs -p <fmri> lists all processes in the contract.
|
24
24
|
# http://bnsmb.de/solaris/My_Little_SMF_FAQ.html
|
25
25
|
|
26
|
-
ctid=`svcprop -p restarter/contract $SMF_FMRI`
|
26
|
+
ctid=`svcprop -p restarter/contract "$SMF_FMRI"`
|
27
27
|
if [ -n "$ctid" ]; then
|
28
|
-
smf_kill_contract $ctid TERM 1 5
|
28
|
+
smf_kill_contract "$ctid" TERM 1 5
|
29
29
|
ret=$?
|
30
|
-
[ $ret -eq 1 ] && exit $SMF_EXIT_ERR_FATAL
|
30
|
+
[ "$ret" -eq 1 ] && exit "$SMF_EXIT_ERR_FATAL"
|
31
31
|
|
32
|
-
if [ $ret -eq 2 ] ; then
|
33
|
-
smf_kill_contract $ctid KILL 1
|
34
|
-
[ $? -ne 0 ] && exit $SMF_EXIT_ERR_FATAL
|
32
|
+
if [ "$ret" -eq 2 ] ; then
|
33
|
+
smf_kill_contract "$ctid" KILL 1
|
34
|
+
[ $? -ne 0 ] && exit "$SMF_EXIT_ERR_FATAL"
|
35
35
|
fi
|
36
36
|
fi
|
37
37
|
;;
|
38
38
|
*)
|
39
39
|
echo "Usage: $0 {start|stop}";
|
40
|
-
exit $SMF_EXIT_ERR_FATAL
|
40
|
+
exit "$SMF_EXIT_ERR_FATAL"
|
41
41
|
;;
|
42
42
|
esac
|
43
|
-
exit $SMF_EXIT_OK
|
43
|
+
exit "$SMF_EXIT_OK"
|
44
44
|
|
data/ext/puppet-test
CHANGED
@@ -382,7 +382,6 @@ $args = {}
|
|
382
382
|
$options = {:repeat => 1, :fork => 0, :pause => false, :nodes => []}
|
383
383
|
|
384
384
|
begin
|
385
|
-
explicit_waitforcert = false
|
386
385
|
result.each { |opt,arg|
|
387
386
|
case opt
|
388
387
|
# First check to see if the argument is a valid setting;
|
@@ -397,7 +396,7 @@ begin
|
|
397
396
|
when "--fork"
|
398
397
|
begin
|
399
398
|
$options[:fork] = Integer(arg)
|
400
|
-
rescue
|
399
|
+
rescue
|
401
400
|
$stderr.puts "The argument to 'fork' must be an integer"
|
402
401
|
exit(14)
|
403
402
|
end
|
data/ext/redhat/client.init
CHANGED
@@ -16,9 +16,9 @@
|
|
16
16
|
[ -f /etc/sysconfig/puppet ] && . /etc/sysconfig/puppet
|
17
17
|
lockfile=/var/lock/subsys/puppet
|
18
18
|
piddir=/var/run/puppetlabs
|
19
|
-
pidfile
|
19
|
+
pidfile="${piddir}/agent.pid"
|
20
20
|
puppetd=/opt/puppetlabs/puppet/bin/puppet
|
21
|
-
pid=$(cat $pidfile 2> /dev/null)
|
21
|
+
pid=$(cat "$pidfile" 2> /dev/null)
|
22
22
|
RETVAL=0
|
23
23
|
|
24
24
|
PUPPET_OPTS="agent "
|
data/ext/redhat/logrotate
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
nocreate
|
16
16
|
sharedscripts
|
17
17
|
postrotate
|
18
|
-
([ -x /etc/init.d/puppet ] && /etc/init.d/puppet
|
18
|
+
([ -x /etc/init.d/puppet ] && /etc/init.d/puppet rotate > /dev/null 2>&1) ||
|
19
19
|
([ -x /usr/bin/systemctl ] && /usr/bin/systemctl kill -s USR2 puppet.service > /dev/null 2>&1) || true
|
20
20
|
endscript
|
21
21
|
}
|
data/ext/solaris/smf/puppet
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
|
3
3
|
. /lib/svc/share/smf_include.sh
|
4
4
|
|
5
|
-
[ -z "${SMF_FMRI}" ] && exit $SMF_EXIT_ERR
|
5
|
+
[ -z "${SMF_FMRI}" ] && exit "$SMF_EXIT_ERR"
|
6
6
|
|
7
7
|
CONF_FILE=/etc/puppetlabs/puppet/puppet.conf
|
8
|
-
[ ! -f "${CONF_FILE}" ] && exit $SMF_EXIT_ERR_CONFIG
|
8
|
+
[ ! -f "${CONF_FILE}" ] && exit "$SMF_EXIT_ERR_CONFIG"
|
9
9
|
|
10
10
|
PUPPET=/opt/puppetlabs/bin/puppet
|
11
11
|
|
12
12
|
case "$1" in
|
13
13
|
start)
|
14
|
-
exec $PUPPET agent
|
14
|
+
exec "$PUPPET" agent
|
15
15
|
;;
|
16
16
|
|
17
17
|
stop)
|
@@ -23,22 +23,22 @@ stop)
|
|
23
23
|
# continues until all processes are killed.
|
24
24
|
# svcs -p <fmri> lists all processes in the contract.
|
25
25
|
# http://bnsmb.de/solaris/My_Little_SMF_FAQ.html
|
26
|
-
ctid=`svcprop -p restarter/contract $SMF_FMRI`
|
26
|
+
ctid=`svcprop -p restarter/contract "$SMF_FMRI"`
|
27
27
|
if [ -n "$ctid" ]; then
|
28
|
-
smf_kill_contract $ctid TERM 1 30
|
28
|
+
smf_kill_contract "$ctid" TERM 1 30
|
29
29
|
ret=$?
|
30
|
-
[ $ret -eq 1 ] && exit $SMF_EXIT_ERR_FATAL
|
30
|
+
[ "$ret" -eq 1 ] && exit "$SMF_EXIT_ERR_FATAL"
|
31
31
|
|
32
|
-
if [ $ret -eq 2 ] ; then
|
33
|
-
smf_kill_contract $ctid KILL 1
|
34
|
-
[ $? -ne 0 ] && exit $SMF_EXIT_ERR_FATAL
|
32
|
+
if [ "$ret" -eq 2 ] ; then
|
33
|
+
smf_kill_contract "$ctid" KILL 1
|
34
|
+
[ $? -ne 0 ] && exit "$SMF_EXIT_ERR_FATAL"
|
35
35
|
fi
|
36
36
|
fi
|
37
37
|
;;
|
38
38
|
*)
|
39
39
|
echo "Usage: $0 {start|stop}";
|
40
|
-
exit $SMF_EXIT_ERR_FATAL
|
40
|
+
exit "$SMF_EXIT_ERR_FATAL"
|
41
41
|
;;
|
42
42
|
esac
|
43
|
-
exit $SMF_EXIT_OK
|
43
|
+
exit "$SMF_EXIT_OK"
|
44
44
|
|
data/ext/solaris/smf/svc-puppetd
CHANGED
@@ -28,14 +28,14 @@ start)
|
|
28
28
|
;;
|
29
29
|
stop)
|
30
30
|
printf "Stopping Puppet client services:"
|
31
|
-
kill `cat $pidfile`
|
31
|
+
kill `cat "$pidfile"`
|
32
32
|
|
33
33
|
printf " puppetd"
|
34
34
|
echo ""
|
35
35
|
;;
|
36
36
|
restart)
|
37
37
|
printf "Restarting Puppet client services:"
|
38
|
-
kill -HUP `cat $pidfile`
|
38
|
+
kill -HUP `cat "$pidfile"`
|
39
39
|
|
40
40
|
printf " puppetd"
|
41
41
|
echo ""
|
@@ -43,14 +43,14 @@ restart)
|
|
43
43
|
reload)
|
44
44
|
printf "Reloading Puppet client services:"
|
45
45
|
|
46
|
-
kill -HUP `cat $pidfile`
|
46
|
+
kill -HUP `cat "$pidfile"`
|
47
47
|
|
48
48
|
printf " puppetd"
|
49
49
|
echo ""
|
50
50
|
;;
|
51
51
|
status)
|
52
|
-
if [ -f $pidfile ]; then
|
53
|
-
pid=`cat $pidfile`
|
52
|
+
if [ -f "$pidfile" ]; then
|
53
|
+
pid=`cat "$pidfile"`
|
54
54
|
curpid=`pgrep puppetd`
|
55
55
|
if [ "$pid" -eq "$curpid" ]; then
|
56
56
|
exit 0
|