puppet 3.2.4 → 3.3.0.rc2
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.
- data/COMMITTERS.md +101 -42
- data/Gemfile +15 -4
- data/README.md +5 -1
- data/README_DEVELOPER.md +117 -54
- data/Rakefile +4 -0
- data/ext/build_defaults.yaml +3 -2
- data/ext/debian/puppet-common.manpages +33 -1
- data/ext/gentoo/init.d/puppet +1 -1
- data/ext/gentoo/init.d/puppetmaster +1 -1
- data/ext/redhat/puppet.spec.erb +0 -1
- data/install.rb +2 -1
- data/lib/hiera/backend/puppet_backend.rb +1 -1
- data/lib/puppet/application.rb +10 -9
- data/lib/puppet/application/agent.rb +87 -93
- data/lib/puppet/application/apply.rb +0 -2
- data/lib/puppet/application/device.rb +3 -3
- data/lib/puppet/application/kick.rb +2 -2
- data/lib/puppet/application/master.rb +41 -19
- data/lib/puppet/application/queue.rb +5 -3
- data/lib/puppet/bindings.rb +147 -0
- data/lib/puppet/configurer.rb +25 -15
- data/lib/puppet/configurer/fact_handler.rb +2 -9
- data/lib/puppet/daemon.rb +44 -33
- data/lib/puppet/defaults.rb +57 -26
- data/lib/puppet/error.rb +1 -1
- data/lib/puppet/external/dot.rb +2 -2
- data/lib/puppet/external/nagios/base.rb +1 -6
- data/lib/puppet/external/pson/common.rb +2 -2
- data/lib/puppet/external/pson/pure/generator.rb +2 -2
- data/lib/puppet/external/pson/pure/parser.rb +1 -1
- data/lib/puppet/face/ca.rb +1 -1
- data/lib/puppet/face/config.rb +1 -1
- data/lib/puppet/face/help.rb +2 -2
- data/lib/puppet/face/module/list.rb +2 -2
- data/lib/puppet/feature/rails.rb +1 -1
- data/lib/puppet/file_bucket/dipper.rb +0 -1
- data/lib/puppet/file_serving/base.rb +1 -1
- data/lib/puppet/file_serving/configuration/parser.rb +20 -14
- data/lib/puppet/forge.rb +0 -32
- data/lib/puppet/forge/cache.rb +1 -1
- data/lib/puppet/forge/errors.rb +3 -3
- data/lib/puppet/forge/repository.rb +7 -42
- data/lib/puppet/graph.rb +11 -0
- data/lib/puppet/graph/key.rb +26 -0
- data/lib/puppet/graph/prioritizer.rb +29 -0
- data/lib/puppet/graph/random_prioritizer.rb +16 -0
- data/lib/puppet/{rb_tree_map.rb → graph/rb_tree_map.rb} +3 -3
- data/lib/puppet/graph/relationship_graph.rb +246 -0
- data/lib/puppet/graph/sequential_prioritizer.rb +31 -0
- data/lib/puppet/{simple_graph.rb → graph/simple_graph.rb} +22 -3
- data/lib/puppet/graph/title_hash_prioritizer.rb +16 -0
- data/lib/puppet/indirector.rb +2 -2
- data/lib/puppet/indirector/catalog/compiler.rb +10 -7
- data/lib/puppet/indirector/catalog/static_compiler.rb +50 -0
- data/lib/puppet/indirector/certificate/rest.rb +1 -1
- data/lib/puppet/indirector/exec.rb +1 -1
- data/lib/puppet/indirector/facts/facter.rb +2 -2
- data/lib/puppet/indirector/facts/inventory_active_record.rb +0 -1
- data/lib/puppet/indirector/facts/network_device.rb +1 -1
- data/lib/puppet/indirector/file_bucket_file/file.rb +0 -1
- data/lib/puppet/indirector/indirection.rb +2 -2
- data/lib/puppet/indirector/memory.rb +9 -0
- data/lib/puppet/indirector/node/ldap.rb +2 -4
- data/lib/puppet/indirector/report/processor.rb +1 -2
- data/lib/puppet/indirector/report/rest.rb +1 -1
- data/lib/puppet/indirector/request.rb +32 -10
- data/lib/puppet/indirector/resource/rest.rb +1 -1
- data/lib/puppet/indirector/resource_type/parser.rb +31 -12
- data/lib/puppet/interface.rb +1 -1
- data/lib/puppet/interface/documentation.rb +7 -11
- data/lib/puppet/interface/option.rb +1 -1
- data/lib/puppet/interface/option_builder.rb +1 -1
- data/lib/puppet/metatype/manager.rb +2 -2
- data/lib/puppet/module.rb +7 -1
- data/lib/puppet/module_tool.rb +1 -1
- data/lib/puppet/module_tool/applications/application.rb +10 -0
- data/lib/puppet/module_tool/applications/installer.rb +6 -3
- data/lib/puppet/module_tool/dependency.rb +2 -0
- data/lib/puppet/module_tool/errors/upgrader.rb +1 -1
- data/lib/puppet/module_tool/metadata.rb +25 -13
- data/lib/puppet/module_tool/modulefile.rb +7 -7
- data/lib/puppet/module_tool/shared_behaviors.rb +4 -2
- data/lib/puppet/module_tool/skeleton.rb +1 -1
- data/lib/puppet/module_tool/skeleton/templates/generator/manifests/init.pp.erb +5 -5
- data/lib/puppet/module_tool/skeleton/templates/generator/tests/init.pp.erb +5 -4
- data/lib/puppet/network/auth_config_parser.rb +3 -0
- data/lib/puppet/network/authconfig.rb +0 -1
- data/lib/puppet/network/authorization.rb +1 -1
- data/lib/puppet/network/authstore.rb +2 -2
- data/lib/puppet/network/format_handler.rb +25 -114
- data/lib/puppet/network/format_support.rb +106 -0
- data/lib/puppet/network/formats.rb +10 -4
- data/lib/puppet/network/http/compression.rb +1 -1
- data/lib/puppet/network/http/connection.rb +76 -32
- data/lib/puppet/network/http/handler.rb +122 -61
- data/lib/puppet/network/http/rack/rest.rb +1 -1
- data/lib/puppet/network/http/webrick/rest.rb +9 -3
- data/lib/puppet/network/http_pool.rb +2 -2
- data/lib/puppet/network/resolver.rb +1 -0
- data/lib/puppet/network/server.rb +5 -81
- data/lib/puppet/node/environment.rb +256 -13
- data/lib/puppet/node/facts.rb +28 -2
- data/lib/puppet/parameter.rb +27 -18
- data/lib/puppet/parameter/boolean.rb +20 -0
- data/lib/puppet/parameter/path.rb +1 -1
- data/lib/puppet/parameter/value.rb +1 -1
- data/lib/puppet/parameter/value_collection.rb +1 -1
- data/lib/puppet/parser/ast/arithmetic_operator.rb +8 -0
- data/lib/puppet/parser/ast/casestatement.rb +0 -3
- data/lib/puppet/parser/ast/lambda.rb +25 -6
- data/lib/puppet/parser/ast/leaf.rb +10 -3
- data/lib/puppet/parser/ast/nop.rb +1 -1
- data/lib/puppet/parser/ast/resource_override.rb +0 -2
- data/lib/puppet/parser/compiler.rb +92 -34
- data/lib/puppet/parser/files.rb +0 -5
- data/lib/puppet/parser/functions/create_resources.rb +23 -46
- data/lib/puppet/parser/functions/each.rb +0 -2
- data/lib/puppet/parser/functions/extlookup.rb +2 -2
- data/lib/puppet/parser/functions/foreach.rb +0 -2
- data/lib/puppet/parser/functions/hiera_include.rb +1 -1
- data/lib/puppet/parser/functions/lookup.rb +44 -0
- data/lib/puppet/parser/functions/slice.rb +1 -1
- data/lib/puppet/parser/grammar.ra +0 -1
- data/lib/puppet/parser/lexer.rb +0 -1
- data/lib/puppet/parser/parser.rb +0 -1
- data/lib/puppet/parser/parser_factory.rb +3 -2
- data/lib/puppet/parser/parser_support.rb +1 -1
- data/lib/puppet/parser/relationship.rb +1 -1
- data/lib/puppet/parser/scope.rb +49 -24
- data/lib/puppet/parser/type_loader.rb +13 -18
- data/lib/puppet/pops.rb +45 -0
- data/lib/puppet/pops/adaptable.rb +2 -2
- data/lib/puppet/pops/adapters.rb +4 -0
- data/lib/puppet/pops/binder/binder.rb +421 -0
- data/lib/puppet/pops/binder/binder_issues.rb +142 -0
- data/lib/puppet/pops/binder/bindings_checker.rb +217 -0
- data/lib/puppet/pops/binder/bindings_composer.rb +241 -0
- data/lib/puppet/pops/binder/bindings_factory.rb +847 -0
- data/lib/puppet/pops/binder/bindings_label_provider.rb +46 -0
- data/lib/puppet/pops/binder/bindings_loader.rb +79 -0
- data/lib/puppet/pops/binder/bindings_model.rb +215 -0
- data/lib/puppet/pops/binder/bindings_model_dumper.rb +205 -0
- data/lib/puppet/pops/binder/bindings_validator_factory.rb +28 -0
- data/lib/puppet/pops/binder/config/binder_config.rb +139 -0
- data/lib/puppet/pops/binder/config/binder_config_checker.rb +183 -0
- data/lib/puppet/pops/binder/config/diagnostic_producer.rb +32 -0
- data/lib/puppet/pops/binder/config/issues.rb +106 -0
- data/lib/puppet/pops/binder/hiera2.rb +10 -0
- data/lib/puppet/pops/binder/hiera2/bindings_provider.rb +148 -0
- data/lib/puppet/pops/binder/hiera2/config.rb +69 -0
- data/lib/puppet/pops/binder/hiera2/config_checker.rb +68 -0
- data/lib/puppet/pops/binder/hiera2/diagnostic_producer.rb +36 -0
- data/lib/puppet/pops/binder/hiera2/issues.rb +67 -0
- data/lib/puppet/pops/binder/hiera2/json_backend.rb +18 -0
- data/lib/puppet/pops/binder/hiera2/yaml_backend.rb +21 -0
- data/lib/puppet/pops/binder/injector.rb +688 -0
- data/lib/puppet/pops/binder/injector_entry.rb +53 -0
- data/lib/puppet/pops/binder/key_factory.rb +61 -0
- data/lib/puppet/pops/binder/producers.rb +829 -0
- data/lib/puppet/pops/binder/scheme_handler/confdir_hiera_scheme.rb +67 -0
- data/lib/puppet/pops/binder/scheme_handler/confdir_scheme.rb +34 -0
- data/lib/puppet/pops/binder/scheme_handler/module_hiera_scheme.rb +92 -0
- data/lib/puppet/pops/binder/scheme_handler/module_scheme.rb +84 -0
- data/lib/puppet/pops/binder/scheme_handler/symbolic_scheme.rb +54 -0
- data/lib/puppet/pops/binder/system_bindings.rb +72 -0
- data/lib/puppet/pops/issue_reporter.rb +75 -0
- data/lib/puppet/pops/issues.rb +9 -5
- data/lib/puppet/pops/model/ast_transformer.rb +4 -4
- data/lib/puppet/pops/model/ast_tree_dumper.rb +1 -1
- data/lib/puppet/pops/model/factory.rb +25 -13
- data/lib/puppet/pops/model/model.rb +1 -1
- data/lib/puppet/pops/model/tree_dumper.rb +2 -2
- data/lib/puppet/pops/parser/egrammar.ra +0 -1
- data/lib/puppet/pops/parser/eparser.rb +1 -2
- data/lib/puppet/pops/parser/evaluating_parser.rb +162 -0
- data/lib/puppet/pops/parser/lexer.rb +8 -6
- data/lib/puppet/pops/types/class_loader.rb +118 -0
- data/lib/puppet/pops/types/type_calculator.rb +557 -0
- data/lib/puppet/pops/types/type_factory.rb +147 -0
- data/lib/puppet/pops/types/type_parser.rb +117 -0
- data/lib/puppet/pops/types/types.rb +132 -0
- data/lib/puppet/pops/validation.rb +146 -17
- data/lib/puppet/pops/validation/checker3_1.rb +1 -1
- data/lib/puppet/pops/validation/validator_factory_3_1.rb +6 -16
- data/lib/puppet/property.rb +3 -3
- data/lib/puppet/property/keyvalue.rb +1 -1
- data/lib/puppet/provider.rb +2 -2
- data/lib/puppet/provider/aixobject.rb +19 -21
- data/lib/puppet/provider/augeas/augeas.rb +3 -1
- data/lib/puppet/provider/command.rb +2 -2
- data/lib/puppet/provider/group/aix.rb +1 -1
- data/lib/puppet/provider/group/ldap.rb +1 -1
- data/lib/puppet/provider/macauthorization/macauthorization.rb +1 -1
- data/lib/puppet/provider/mailalias/aliases.rb +3 -8
- data/lib/puppet/provider/mcx/mcxcontent.rb +7 -1
- data/lib/puppet/provider/mount.rb +8 -3
- data/lib/puppet/provider/nameservice.rb +1 -1
- data/lib/puppet/provider/nameservice/directoryservice.rb +5 -5
- data/lib/puppet/provider/package/appdmg.rb +1 -1
- data/lib/puppet/provider/package/apt.rb +0 -1
- data/lib/puppet/provider/package/dpkg.rb +86 -32
- data/lib/puppet/provider/package/fink.rb +0 -2
- data/lib/puppet/provider/package/freebsd.rb +0 -2
- data/lib/puppet/provider/package/openbsd.rb +57 -10
- data/lib/puppet/provider/package/opkg.rb +0 -1
- data/lib/puppet/provider/package/pacman.rb +0 -1
- data/lib/puppet/provider/package/pip.rb +1 -1
- data/lib/puppet/provider/package/pkgdmg.rb +17 -6
- data/lib/puppet/provider/package/pkgutil.rb +1 -1
- data/lib/puppet/provider/package/portage.rb +9 -1
- data/lib/puppet/provider/package/ports.rb +2 -2
- data/lib/puppet/provider/package/rpm.rb +29 -12
- data/lib/puppet/provider/package/rug.rb +1 -1
- data/lib/puppet/provider/package/urpmi.rb +11 -15
- data/lib/puppet/provider/package/windows/exe_package.rb +1 -1
- data/lib/puppet/provider/package/windows/package.rb +1 -26
- data/lib/puppet/provider/package/yum.rb +1 -1
- data/lib/puppet/provider/package/zypper.rb +22 -3
- data/lib/puppet/provider/parsedfile.rb +1 -12
- data/lib/puppet/provider/scheduled_task/win32_taskscheduler.rb +1 -1
- data/lib/puppet/provider/service/base.rb +1 -1
- data/lib/puppet/provider/service/daemontools.rb +3 -3
- data/lib/puppet/provider/service/debian.rb +1 -1
- data/lib/puppet/provider/service/init.rb +14 -20
- data/lib/puppet/provider/service/openrc.rb +3 -1
- data/lib/puppet/provider/service/redhat.rb +5 -8
- data/lib/puppet/provider/service/runit.rb +3 -2
- data/lib/puppet/provider/service/systemd.rb +1 -1
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +1 -1
- data/lib/puppet/provider/sshkey/parsed.rb +0 -2
- data/lib/puppet/provider/user/aix.rb +25 -12
- data/lib/puppet/provider/user/directoryservice.rb +4 -7
- data/lib/puppet/provider/user/ldap.rb +0 -1
- data/lib/puppet/provider/user/user_role_add.rb +2 -0
- data/lib/puppet/provider/user/useradd.rb +1 -1
- data/lib/puppet/provider/zone/solaris.rb +1 -2
- data/lib/puppet/reference/metaparameter.rb +1 -1
- data/lib/puppet/reference/type.rb +1 -1
- data/lib/puppet/reports/rrdgraph.rb +1 -1
- data/lib/puppet/reports/tagmail.rb +1 -1
- data/lib/puppet/resource.rb +16 -4
- data/lib/puppet/resource/catalog.rb +111 -173
- data/lib/puppet/resource/status.rb +42 -3
- data/lib/puppet/resource/type.rb +33 -46
- data/lib/puppet/resource/type_collection.rb +19 -15
- data/lib/puppet/run.rb +5 -1
- data/lib/puppet/scheduler/scheduler.rb +14 -15
- data/lib/puppet/settings.rb +78 -41
- data/lib/puppet/settings/boolean_setting.rb +0 -2
- data/lib/puppet/settings/config_file.rb +0 -2
- data/lib/puppet/settings/directory_setting.rb +0 -2
- data/lib/puppet/settings/duration_setting.rb +0 -2
- data/lib/puppet/settings/enum_setting.rb +16 -0
- data/lib/puppet/settings/file_setting.rb +0 -2
- data/lib/puppet/settings/path_setting.rb +0 -2
- data/lib/puppet/settings/string_setting.rb +0 -3
- data/lib/puppet/settings/terminus_setting.rb +0 -2
- data/lib/puppet/ssl/certificate_authority.rb +102 -9
- data/lib/puppet/test/test_helper.rb +1 -0
- data/lib/puppet/transaction.rb +130 -292
- data/lib/puppet/transaction/additional_resource_generator.rb +126 -0
- data/lib/puppet/transaction/event.rb +16 -1
- data/lib/puppet/transaction/report.rb +34 -14
- data/lib/puppet/transaction/resource_harness.rb +16 -19
- data/lib/puppet/type.rb +59 -53
- data/lib/puppet/type/component.rb +0 -2
- data/lib/puppet/type/cron.rb +13 -2
- data/lib/puppet/type/exec.rb +5 -7
- data/lib/puppet/type/file.rb +9 -32
- data/lib/puppet/type/file/content.rb +4 -1
- data/lib/puppet/type/file/ctime.rb +3 -1
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/file/mode.rb +0 -1
- data/lib/puppet/type/file/mtime.rb +2 -1
- data/lib/puppet/type/group.rb +7 -9
- data/lib/puppet/type/host.rb +1 -2
- data/lib/puppet/type/mcx.rb +0 -1
- data/lib/puppet/type/mount.rb +38 -6
- data/lib/puppet/type/package.rb +2 -2
- data/lib/puppet/type/resources.rb +5 -4
- data/lib/puppet/type/schedule.rb +1 -4
- data/lib/puppet/type/selmodule.rb +1 -1
- data/lib/puppet/type/service.rb +1 -3
- data/lib/puppet/type/tidy.rb +3 -3
- data/lib/puppet/type/user.rb +9 -13
- data/lib/puppet/type/yumrepo.rb +11 -7
- data/lib/puppet/util.rb +14 -7
- data/lib/puppet/util/autoload.rb +0 -1
- data/lib/puppet/util/backups.rb +1 -3
- data/lib/puppet/util/classgen.rb +1 -1
- data/lib/puppet/util/command_line/puppet_option_parser.rb +1 -3
- data/lib/puppet/util/command_line/trollop.rb +1 -1
- data/lib/puppet/util/constant_inflector.rb +1 -2
- data/lib/puppet/util/errors.rb +1 -0
- data/lib/puppet/util/file_watcher.rb +28 -0
- data/lib/puppet/util/fileparsing.rb +1 -3
- data/lib/puppet/util/filetype.rb +0 -1
- data/lib/puppet/util/http_proxy.rb +38 -0
- data/lib/puppet/util/ldap/manager.rb +1 -2
- data/lib/puppet/util/log.rb +31 -10
- data/lib/puppet/util/log/destinations.rb +0 -50
- data/lib/puppet/util/metric.rb +8 -1
- data/lib/puppet/util/monkey_patches.rb +14 -148
- data/lib/puppet/util/network_device/cisco/facts.rb +1 -1
- data/lib/puppet/util/network_device/config.rb +6 -9
- data/lib/puppet/util/network_device/transport/ssh.rb +1 -1
- data/lib/puppet/util/pidlock.rb +3 -0
- data/lib/puppet/util/posix.rb +1 -1
- data/lib/puppet/util/profiler.rb +1 -1
- data/lib/puppet/util/rdoc.rb +1 -1
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +0 -1
- data/lib/puppet/util/rdoc/generators/template/puppet/puppet.rb +50 -42
- data/lib/puppet/util/retryaction.rb +0 -1
- data/lib/puppet/util/symbolic_file_mode.rb +5 -1
- data/lib/puppet/util/tagging.rb +0 -2
- data/lib/puppet/util/warnings.rb +3 -0
- data/lib/puppet/util/watched_file.rb +37 -0
- data/lib/puppet/util/watcher.rb +17 -0
- data/lib/puppet/util/watcher/change_watcher.rb +33 -0
- data/lib/puppet/util/watcher/periodic_watcher.rb +37 -0
- data/lib/puppet/util/watcher/timer.rb +19 -0
- data/lib/puppet/util/windows/user.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/lib/puppetx.rb +109 -0
- data/lib/puppetx/puppet/bindings_scheme_handler.rb +130 -0
- data/lib/puppetx/puppet/hiera2_backend.rb +31 -0
- data/lib/puppetx/puppet/syntax_checker.rb +91 -0
- data/lib/puppetx/puppetlabs/syntax_checkers/json.rb +39 -0
- data/lib/semver.rb +1 -1
- data/man/man8/puppet-kick.8 +1 -1
- data/spec/fixtures/integration/provider/cron/crontab/unspecialized +15 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/hiera1config/binder_config.yaml +18 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/hiera1config/hiera.yaml +8 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/hiera1config/modules/good/common.yaml +1 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/hiera1config/modules/good/hiera.yaml +10 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/binder_config.yaml +19 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/common.yaml +1 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/hiera.yaml +11 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/localhost.yaml +1 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/awesome/common.yaml +3 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/awesome/hiera.yaml +13 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/awesome/lib/puppet/bindings/awesome/default.rb +4 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/awesome/lib/puppetx/awesome/echo_backend.rb +11 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/awesome/lib/puppetx/awesome/echo_scheme_handler.rb +18 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/awesome/localhost.yaml +1 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/bad/common.yaml +3 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/bad/hiera_config.yaml +9 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/good/common.yaml +2 -0
- data/spec/fixtures/unit/pops/binder/bindings_composer/ok/modules/good/hiera.yaml +11 -0
- data/spec/fixtures/unit/pops/binder/config/binder_config/ok/binder_config.yaml +9 -0
- data/spec/fixtures/unit/pops/binder/hiera2/bindings_provider/ok/hiera.yaml +9 -0
- data/spec/fixtures/unit/pops/binder/hiera2/bindings_provider/ok/node.example.com.json +9 -0
- data/spec/fixtures/unit/pops/binder/hiera2/bindings_provider/ok/node.example.com.yaml +5 -0
- data/spec/fixtures/unit/pops/binder/hiera2/config/bad_syntax/hiera.yaml +10 -0
- data/spec/fixtures/unit/pops/binder/hiera2/config/malformed_hierarchy/hiera.yaml +8 -0
- data/spec/fixtures/unit/pops/binder/hiera2/config/missing/foo.txt +1 -0
- data/spec/fixtures/unit/pops/binder/hiera2/config/no_backends/hiera.yaml +7 -0
- data/spec/fixtures/unit/pops/binder/hiera2/config/no_hierarchy/hiera.yaml +4 -0
- data/spec/fixtures/unit/pops/binder/hiera2/config/not_a_hash/hiera.yaml +2 -0
- data/spec/fixtures/unit/pops/binder/hiera2/config/ok/hiera.yaml +8 -0
- data/spec/fixtures/unit/pops/binder/hiera2/yaml_backend/empty/common.yaml +0 -0
- data/spec/fixtures/unit/pops/binder/hiera2/yaml_backend/invalid/common.yaml +1 -0
- data/spec/fixtures/unit/pops/binder/hiera2/yaml_backend/ok/common.yaml +2 -0
- data/spec/fixtures/unit/provider/package/openbsd/pkginfo_flavors.list +2 -0
- data/spec/integration/agent/logging_spec.rb +178 -0
- data/spec/integration/configurer_spec.rb +1 -1
- data/spec/integration/defaults_spec.rb +0 -6
- data/spec/integration/network/authconfig_spec.rb +19 -0
- data/spec/integration/network/server/webrick_spec.rb +10 -11
- data/spec/integration/parser/catalog_spec.rb +85 -0
- data/spec/integration/provider/cron/crontab_spec.rb +11 -0
- data/spec/integration/provider/mount_spec.rb +1 -0
- data/spec/integration/transaction_spec.rb +8 -8
- data/spec/integration/type/file_spec.rb +1 -1
- data/spec/integration/util/settings_spec.rb +58 -11
- data/spec/lib/matchers/include_in_order.rb +21 -0
- data/spec/lib/matchers/include_in_order_spec.rb +30 -0
- data/spec/lib/matchers/relationship_graph_matchers.rb +48 -0
- data/spec/lib/puppet_spec/compiler.rb +24 -0
- data/spec/lib/puppet_spec/pops.rb +16 -0
- data/spec/spec_helper.rb +0 -1
- data/spec/unit/application/agent_spec.rb +145 -145
- data/spec/unit/application/apply_spec.rb +1 -1
- data/spec/unit/application/doc_spec.rb +1 -1
- data/spec/unit/application/face_base_spec.rb +3 -3
- data/spec/unit/application/facts_spec.rb +1 -0
- data/spec/unit/application/master_spec.rb +0 -15
- data/spec/unit/application/queue_spec.rb +6 -12
- data/spec/unit/application/resource_spec.rb +1 -1
- data/spec/unit/configurer/fact_handler_spec.rb +19 -50
- data/spec/unit/configurer_spec.rb +23 -7
- data/spec/unit/daemon_spec.rb +97 -121
- data/spec/unit/defaults_spec.rb +44 -0
- data/spec/unit/face/node_spec.rb +2 -2
- data/spec/unit/file_serving/configuration/parser_spec.rb +23 -33
- data/spec/unit/file_serving/configuration_spec.rb +2 -2
- data/spec/unit/file_serving/mount/file_spec.rb +4 -4
- data/spec/unit/forge/repository_spec.rb +9 -29
- data/spec/unit/graph/key_spec.rb +41 -0
- data/spec/unit/{rb_tree_map_spec.rb → graph/rb_tree_map_spec.rb} +7 -7
- data/spec/unit/graph/relationship_graph_spec.rb +393 -0
- data/spec/unit/graph/sequential_prioritizer_spec.rb +32 -0
- data/spec/unit/{simple_graph_spec.rb → graph/simple_graph.rb} +42 -254
- data/spec/unit/graph/title_hash_prioritizer_spec.rb +49 -0
- data/spec/unit/hiera_puppet_spec.rb +1 -1
- data/spec/unit/indirector/catalog/active_record_spec.rb +4 -2
- data/spec/unit/indirector/catalog/compiler_spec.rb +20 -26
- data/spec/unit/indirector/face_spec.rb +1 -1
- data/spec/unit/indirector/facts/facter_spec.rb +11 -1
- data/spec/unit/indirector/facts/network_device_spec.rb +11 -1
- data/spec/unit/indirector/hiera_spec.rb +1 -1
- data/spec/unit/indirector/instrumentation_data/local_spec.rb +1 -1
- data/spec/unit/indirector/instrumentation_listener/local_spec.rb +1 -1
- data/spec/unit/indirector/request_spec.rb +92 -39
- data/spec/unit/indirector/rest_spec.rb +1 -0
- data/spec/unit/indirector_spec.rb +2 -2
- data/spec/unit/interface/option_builder_spec.rb +1 -0
- data/spec/unit/interface/option_spec.rb +1 -0
- data/spec/unit/interface_spec.rb +2 -2
- data/spec/unit/module_tool/applications/installer_spec.rb +49 -2
- data/spec/unit/module_tool/metadata_spec.rb +13 -0
- data/spec/unit/network/authstore_spec.rb +1 -1
- data/spec/unit/network/format_handler_spec.rb +33 -282
- data/spec/unit/network/format_support_spec.rb +199 -0
- data/spec/unit/network/formats_spec.rb +2 -2
- data/spec/unit/network/http/connection_spec.rb +88 -7
- data/spec/unit/network/http/handler_spec.rb +271 -249
- data/spec/unit/network/http/rack/rest_spec.rb +1 -1
- data/spec/unit/network/http/webrick/rest_spec.rb +73 -22
- data/spec/unit/network/http_pool_spec.rb +40 -0
- data/spec/unit/network/server_spec.rb +18 -207
- data/spec/unit/node/facts_spec.rb +68 -17
- data/spec/unit/other/selinux_spec.rb +24 -20
- data/spec/unit/parameter/boolean_spec.rb +25 -0
- data/spec/unit/parameter/value_collection_spec.rb +7 -7
- data/spec/unit/parameter_spec.rb +10 -13
- data/spec/unit/parser/ast/function_spec.rb +4 -4
- data/spec/unit/parser/ast/leaf_spec.rb +45 -6
- data/spec/unit/parser/collector_spec.rb +3 -3
- data/spec/unit/parser/compiler_spec.rb +4 -3
- data/spec/unit/parser/functions/create_resources_spec.rb +9 -25
- data/spec/unit/parser/functions/extlookup_spec.rb +2 -2
- data/spec/unit/parser/functions/hiera_include_spec.rb +12 -0
- data/spec/unit/parser/functions/lookup_spec.rb +96 -0
- data/spec/unit/parser/functions/regsubst_spec.rb +2 -2
- data/spec/unit/parser/functions/split_spec.rb +2 -2
- data/spec/unit/parser/functions/sprintf_spec.rb +1 -1
- data/spec/unit/parser/functions/versioncmp_spec.rb +2 -2
- data/spec/unit/parser/functions_spec.rb +7 -7
- data/spec/unit/parser/lexer_spec.rb +1 -1
- data/spec/unit/parser/methods/collect_spec.rb +43 -0
- data/spec/unit/parser/resource_spec.rb +9 -9
- data/spec/unit/parser/scope_spec.rb +45 -2
- data/spec/unit/parser/type_loader_spec.rb +159 -175
- data/spec/unit/pops/binder/binder_spec.rb +62 -0
- data/spec/unit/pops/binder/bindings_checker_spec.rb +196 -0
- data/spec/unit/pops/binder/bindings_composer_spec.rb +89 -0
- data/spec/unit/pops/binder/bindings_validator_factory_spec.rb +18 -0
- data/spec/unit/pops/binder/config/binder_config_spec.rb +48 -0
- data/spec/unit/pops/binder/hiera2/bindings_provider_spec.rb +74 -0
- data/spec/unit/pops/binder/hiera2/config_spec.rb +61 -0
- data/spec/unit/pops/binder/hiera2/yaml_backend_spec.rb +33 -0
- data/spec/unit/pops/binder/injector_spec.rb +789 -0
- data/spec/unit/pops/containment_spec.rb +1 -0
- data/spec/unit/pops/issues_spec.rb +1 -1
- data/spec/unit/pops/parser/evaluating_parser_spec.rb +88 -0
- data/spec/unit/pops/parser/lexer_spec.rb +1 -1
- data/spec/unit/pops/parser/parse_calls_spec.rb +4 -0
- data/spec/unit/pops/parser/parser_spec.rb +1 -1
- data/spec/unit/pops/types/type_calculator_spec.rb +484 -0
- data/spec/unit/pops/types/type_factory_spec.rb +65 -0
- data/spec/unit/pops/types/type_parser_spec.rb +93 -0
- data/spec/unit/property/list_spec.rb +1 -1
- data/spec/unit/property/ordered_list_spec.rb +1 -1
- data/spec/unit/provider/aixobject_spec.rb +101 -0
- data/spec/unit/provider/augeas/augeas_spec.rb +14 -3
- data/spec/unit/provider/mcx/mcxcontent_spec.rb +52 -16
- data/spec/unit/provider/mount/parsed_spec.rb +44 -56
- data/spec/unit/provider/mount_spec.rb +11 -2
- data/spec/unit/provider/naginator_spec.rb +8 -0
- data/spec/unit/provider/package/apt_spec.rb +5 -1
- data/spec/unit/provider/package/aptitude_spec.rb +9 -5
- data/spec/unit/provider/package/aptrpm_spec.rb +2 -2
- data/spec/unit/provider/package/dpkg_spec.rb +274 -99
- data/spec/unit/provider/package/openbsd_spec.rb +84 -1
- data/spec/unit/provider/package/opkg_spec.rb +3 -3
- data/spec/unit/provider/package/pip_spec.rb +16 -0
- data/spec/unit/provider/package/pkgdmg_spec.rb +62 -7
- data/spec/unit/provider/package/rpm_spec.rb +112 -21
- data/spec/unit/provider/package/urpmi.rb +80 -0
- data/spec/unit/provider/package/windows/exe_package_spec.rb +1 -1
- data/spec/unit/provider/package/yum_spec.rb +85 -0
- data/spec/unit/provider/package/zypper_spec.rb +25 -6
- data/spec/unit/provider/parsedfile_spec.rb +3 -2
- data/spec/unit/provider/service/init_spec.rb +10 -10
- data/spec/unit/provider/service/openrc_spec.rb +16 -0
- data/spec/unit/provider/service/openwrt_spec.rb +1 -1
- data/spec/unit/provider/service/redhat_spec.rb +7 -0
- data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +2 -2
- data/spec/unit/provider/user/aix_spec.rb +89 -0
- data/spec/unit/provider/user/directoryservice_spec.rb +11 -4
- data/spec/unit/provider/user/user_role_add_spec.rb +18 -0
- data/spec/unit/provider_spec.rb +2 -13
- data/spec/unit/reports/http_spec.rb +1 -1
- data/spec/unit/resource/catalog_spec.rb +23 -97
- data/spec/unit/resource/resource_type.json +34 -0
- data/spec/unit/resource/status_spec.rb +56 -0
- data/spec/unit/resource/type_collection_spec.rb +6 -6
- data/spec/unit/resource/type_spec.rb +25 -5
- data/spec/unit/resource_spec.rb +68 -24
- data/spec/unit/run_spec.rb +16 -0
- data/spec/unit/scheduler/scheduler_spec.rb +14 -27
- data/spec/unit/semver_spec.rb +5 -0
- data/spec/unit/settings/enum_setting_spec.rb +27 -0
- data/spec/unit/settings_spec.rb +53 -44
- data/spec/unit/ssl/certificate_authority_spec.rb +155 -19
- data/spec/unit/transaction/additional_resource_generator_spec.rb +419 -0
- data/spec/unit/transaction/event_manager_spec.rb +2 -2
- data/spec/unit/transaction/event_spec.rb +57 -0
- data/spec/unit/transaction/report_spec.rb +66 -0
- data/spec/unit/transaction/resource_harness_spec.rb +27 -20
- data/spec/unit/transaction_spec.rb +182 -390
- data/spec/unit/type/augeas_spec.rb +3 -3
- data/spec/unit/type/component_spec.rb +0 -9
- data/spec/unit/type/computer_spec.rb +1 -1
- data/spec/unit/type/cron_spec.rb +2 -2
- data/spec/unit/type/exec_spec.rb +4 -2
- data/spec/unit/type/file/content_spec.rb +11 -0
- data/spec/unit/type/file/group_spec.rb +1 -1
- data/spec/unit/type/file_spec.rb +16 -8
- data/spec/unit/type/mount_spec.rb +445 -259
- data/spec/unit/type/package_spec.rb +4 -4
- data/spec/unit/type/resources_spec.rb +30 -1
- data/spec/unit/type/user_spec.rb +26 -3
- data/spec/unit/type/yumrepo_spec.rb +7 -27
- data/spec/unit/type/zone_spec.rb +4 -1
- data/spec/unit/type_spec.rb +66 -33
- data/spec/unit/util/backups_spec.rb +3 -3
- data/spec/unit/util/http_proxy_spec.rb +83 -0
- data/spec/unit/util/log_spec.rb +79 -8
- data/spec/unit/util/metric_spec.rb +12 -0
- data/spec/unit/util/monkey_patches_spec.rb +6 -0
- data/spec/unit/util/network_device/config_spec.rb +26 -64
- data/spec/unit/util/pidlock_spec.rb +4 -1
- data/spec/unit/util/tagging_spec.rb +5 -9
- data/spec/unit/util/warnings_spec.rb +1 -1
- data/spec/unit/util/watched_file_spec.rb +52 -0
- data/spec/unit/util/watcher/periodic_watcher_spec.rb +52 -0
- data/spec/unit/util/watcher_spec.rb +56 -0
- data/spec/unit/util_spec.rb +16 -0
- metadata +2767 -2576
- data/ext/debian/puppet.manpages +0 -32
- data/ext/osx/PackageInfo.plist +0 -36
- data/ext/osx/createpackage.sh +0 -187
- data/ext/redhat/rundir-perms.patch +0 -28
- data/lib/puppet/external/base64.rb +0 -19
- data/lib/puppet/util/graph.rb +0 -27
- data/lib/puppet/util/loadedfile.rb +0 -61
- data/lib/puppet/util/log_paths.rb +0 -22
- data/lib/puppet/util/subclass_loader.rb +0 -78
- data/spec/monkey_patches/publicize_methods.rb +0 -11
- data/spec/unit/util/loadedfile_spec.rb +0 -71
data/lib/puppet/daemon.rb
CHANGED
@@ -1,13 +1,33 @@
|
|
1
|
-
require 'puppet'
|
2
|
-
require 'puppet/util/pidlock'
|
3
1
|
require 'puppet/application'
|
4
2
|
require 'puppet/scheduler'
|
5
3
|
|
6
|
-
#
|
7
|
-
#
|
4
|
+
# Run periodic actions and a network server in a daemonized process.
|
5
|
+
#
|
6
|
+
# A Daemon has 3 parts:
|
7
|
+
# * config reparse
|
8
|
+
# * (optional) an agent that responds to #run
|
9
|
+
# * (optional) a server that response to #stop, #start, and #wait_for_shutdown
|
10
|
+
#
|
11
|
+
# The config reparse will occur periodically based on Settings. The server will
|
12
|
+
# be started and is expected to manage its own run loop (and so not block the
|
13
|
+
# start call). The server will, however, still be waited for by using the
|
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.
|
17
|
+
#
|
18
|
+
# The Daemon is also responsible for signal handling, starting, stopping,
|
19
|
+
# running the agent on demand, and reloading the entire process. It ensures
|
20
|
+
# that only one Daemon is running by using a lockfile.
|
21
|
+
#
|
22
|
+
# @api private
|
8
23
|
class Puppet::Daemon
|
9
24
|
attr_accessor :agent, :server, :argv
|
10
25
|
|
26
|
+
def initialize(pidfile, scheduler = Puppet::Scheduler::Scheduler.new())
|
27
|
+
@scheduler = scheduler
|
28
|
+
@pidfile = pidfile
|
29
|
+
end
|
30
|
+
|
11
31
|
def daemonname
|
12
32
|
Puppet.run_mode.name
|
13
33
|
end
|
@@ -26,6 +46,8 @@ class Puppet::Daemon
|
|
26
46
|
|
27
47
|
Process.setsid
|
28
48
|
Dir.chdir("/")
|
49
|
+
|
50
|
+
close_streams
|
29
51
|
end
|
30
52
|
|
31
53
|
# Close stdin/stdout/stderr so that we can finish our transition into 'daemon' mode.
|
@@ -52,19 +74,6 @@ class Puppet::Daemon
|
|
52
74
|
Puppet::Daemon.close_streams
|
53
75
|
end
|
54
76
|
|
55
|
-
# Create a pidfile for our daemon, so we can be stopped and others
|
56
|
-
# don't try to start.
|
57
|
-
def create_pidfile
|
58
|
-
Puppet::Util.synchronize_on(Puppet.run_mode.name,Sync::EX) do
|
59
|
-
raise "Could not create PID file: #{pidfile}" unless Puppet::Util::Pidlock.new(pidfile).lock
|
60
|
-
end
|
61
|
-
end
|
62
|
-
|
63
|
-
# Provide the path to our pidfile.
|
64
|
-
def pidfile
|
65
|
-
Puppet[:pidfile]
|
66
|
-
end
|
67
|
-
|
68
77
|
def reexec
|
69
78
|
raise Puppet::DevError, "Cannot reexec unless ARGV arguments are set" unless argv
|
70
79
|
command = $0 + " " + argv.join(" ")
|
@@ -83,13 +92,6 @@ class Puppet::Daemon
|
|
83
92
|
agent.run({:splay => false})
|
84
93
|
end
|
85
94
|
|
86
|
-
# Remove the pid file for our daemon.
|
87
|
-
def remove_pidfile
|
88
|
-
Puppet::Util.synchronize_on(Puppet.run_mode.name,Sync::EX) do
|
89
|
-
Puppet::Util::Pidlock.new(pidfile).unlock
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
95
|
def restart
|
94
96
|
Puppet::Application.restart!
|
95
97
|
reexec unless agent and agent.running?
|
@@ -136,18 +138,29 @@ class Puppet::Daemon
|
|
136
138
|
# Start the listening server, if required.
|
137
139
|
server.start if server
|
138
140
|
|
139
|
-
# now that the server has started, we've waited just about as long as possible to close
|
140
|
-
# our streams and become a "real" daemon process. This is in hopes of allowing
|
141
|
-
# errors to have the console available as a fallback for logging for as long as
|
142
|
-
# possible.
|
143
|
-
close_streams if Puppet[:daemonize]
|
144
|
-
|
145
141
|
# Finally, loop forever running events - or, at least, until we exit.
|
146
142
|
run_event_loop
|
147
143
|
|
148
144
|
server.wait_for_shutdown if server
|
149
145
|
end
|
150
146
|
|
147
|
+
private
|
148
|
+
|
149
|
+
# Create a pidfile for our daemon, so we can be stopped and others
|
150
|
+
# don't try to start.
|
151
|
+
def create_pidfile
|
152
|
+
Puppet::Util.synchronize_on(Puppet.run_mode.name,Sync::EX) do
|
153
|
+
raise "Could not create PID file: #{@pidfile.file_path}" unless @pidfile.lock
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
# Remove the pid file for our daemon.
|
158
|
+
def remove_pidfile
|
159
|
+
Puppet::Util.synchronize_on(Puppet.run_mode.name,Sync::EX) do
|
160
|
+
@pidfile.unlock
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
151
164
|
def run_event_loop
|
152
165
|
agent_run = Puppet::Scheduler.create_job(Puppet[:runinterval], Puppet[:splay], Puppet[:splaylimit]) do
|
153
166
|
# Splay for the daemon is handled in the scheduler
|
@@ -167,9 +180,7 @@ class Puppet::Daemon
|
|
167
180
|
reparse_run.disable if Puppet[:filetimeout] == 0
|
168
181
|
agent_run.disable unless agent
|
169
182
|
|
170
|
-
scheduler
|
171
|
-
|
172
|
-
scheduler.run_loop
|
183
|
+
@scheduler.run_loop([reparse_run, agent_run])
|
173
184
|
end
|
174
185
|
end
|
175
186
|
|
data/lib/puppet/defaults.rb
CHANGED
@@ -1,8 +1,13 @@
|
|
1
|
-
# The majority of Puppet's configuration settings are set in this file.
|
2
|
-
|
3
|
-
|
4
1
|
module Puppet
|
5
2
|
|
3
|
+
def self.default_diffargs
|
4
|
+
if (Facter.value(:kernel) == "AIX" && Facter.value(:kernelmajversion) == "5300")
|
5
|
+
""
|
6
|
+
else
|
7
|
+
"-u"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
6
11
|
############################################################################################
|
7
12
|
# NOTE: For information about the available values for the ":type" property of settings,
|
8
13
|
# see the docs for Settings.define_settings
|
@@ -80,7 +85,9 @@ module Puppet
|
|
80
85
|
:rundir => {
|
81
86
|
:default => nil,
|
82
87
|
:type => :directory,
|
83
|
-
:mode =>
|
88
|
+
:mode => 0755,
|
89
|
+
:owner => "service",
|
90
|
+
:group => "service",
|
84
91
|
:desc => "Where Puppet PID files are kept."
|
85
92
|
},
|
86
93
|
:genconfig => {
|
@@ -173,7 +180,7 @@ module Puppet
|
|
173
180
|
"this provides the default environment for nodes we know nothing about."
|
174
181
|
},
|
175
182
|
:diff_args => {
|
176
|
-
:default =>
|
183
|
+
:default => default_diffargs,
|
177
184
|
:desc => "Which arguments to pass to the diff command when printing differences between\n" +
|
178
185
|
"files. The command to use can be chosen with the `diff` setting.",
|
179
186
|
},
|
@@ -236,6 +243,19 @@ module Puppet
|
|
236
243
|
:desc => "The hiera configuration file. Puppet only reads this file on startup, so you must restart the puppet master every time you edit it.",
|
237
244
|
:type => :file,
|
238
245
|
},
|
246
|
+
:binder => {
|
247
|
+
:default => false,
|
248
|
+
:desc => "Turns the binding system on or off. This includes hiera-2 and data in modules. The binding system aggregates data from
|
249
|
+
modules and other locations and makes them available for lookup. The binding system is experimental and any or all of it may change.",
|
250
|
+
:type => :boolean,
|
251
|
+
},
|
252
|
+
:binder_config => {
|
253
|
+
:default => nil,
|
254
|
+
:desc => "The binder configuration file. Puppet reads this file on each request to configure the bindings system.
|
255
|
+
If set to nil (the default), a $confdir/binder_config.yaml is optionally loaded. If it does not exists, a default configuration
|
256
|
+
is used. If the setting :binding_config is specified, it must reference a valid and existing yaml file.",
|
257
|
+
:type => :file,
|
258
|
+
},
|
239
259
|
:catalog_terminus => {
|
240
260
|
:type => :terminus,
|
241
261
|
:default => "compiler",
|
@@ -316,7 +336,7 @@ module Puppet
|
|
316
336
|
Requires that `puppet queue` be running.",
|
317
337
|
:hook => proc do |value|
|
318
338
|
if value
|
319
|
-
# This reconfigures the
|
339
|
+
# This reconfigures the termini for Node, Facts, and Catalog
|
320
340
|
Puppet.settings[:storeconfigs] = true
|
321
341
|
|
322
342
|
# But then we modify the configuration
|
@@ -368,6 +388,11 @@ module Puppet
|
|
368
388
|
:desc => "Freezes the 'main' class, disallowing any code to be added to it. This\n" +
|
369
389
|
"essentially means that you can't have any code outside of a node, class, or definition other\n" +
|
370
390
|
"than in the site manifest.",
|
391
|
+
},
|
392
|
+
:stringify_facts => {
|
393
|
+
:default => true,
|
394
|
+
:type => :boolean,
|
395
|
+
:desc => "Flatten fact values to strings using #to_s. Means you can't have arrays or hashes as fact values.",
|
371
396
|
}
|
372
397
|
)
|
373
398
|
Puppet.define_settings(:module_tool,
|
@@ -378,6 +403,10 @@ module Puppet
|
|
378
403
|
:module_working_dir => {
|
379
404
|
:default => '$vardir/puppet-module',
|
380
405
|
:desc => "The directory into which module tool data is stored",
|
406
|
+
},
|
407
|
+
:module_skeleton_dir => {
|
408
|
+
:default => '$module_working_dir/skeleton',
|
409
|
+
:desc => "The directory which the skeleton for module tool generate is stored.",
|
381
410
|
}
|
382
411
|
)
|
383
412
|
|
@@ -525,16 +554,6 @@ EOT
|
|
525
554
|
:owner => "service",
|
526
555
|
:desc => "Where each client stores the CA certificate."
|
527
556
|
},
|
528
|
-
## JJM - The ssl_client_ca_chain setting is commented out because it is
|
529
|
-
# intended for (#3143) and is not expected to be used until CA chaining is
|
530
|
-
# supported.
|
531
|
-
# :ssl_client_ca_chain => {
|
532
|
-
# :type => :file,
|
533
|
-
# :mode => 0644,
|
534
|
-
# :owner => "service",
|
535
|
-
# :desc => "The list of CA certificate to complete the chain of trust to CA certificates \n" <<
|
536
|
-
# "listed in the ssl_client_ca_auth file."
|
537
|
-
# },
|
538
557
|
:ssl_client_ca_auth => {
|
539
558
|
:type => :file,
|
540
559
|
:mode => 0644,
|
@@ -544,16 +563,6 @@ EOT
|
|
544
563
|
"listed in this file. If this setting has no value then the Puppet master's CA \n" <<
|
545
564
|
"certificate (localcacert) will be used."
|
546
565
|
},
|
547
|
-
## JJM - The ssl_server_ca_chain setting is commented out because it is
|
548
|
-
# intended for (#3143) and is not expected to be used until CA chaining is
|
549
|
-
# supported.
|
550
|
-
# :ssl_server_ca_chain => {
|
551
|
-
# :type => :file,
|
552
|
-
# :mode => 0644,
|
553
|
-
# :owner => "service",
|
554
|
-
# :desc => "The list of CA certificate to complete the chain of trust to CA certificates \n" <<
|
555
|
-
# "listed in the ssl_server_ca_auth file."
|
556
|
-
# },
|
557
566
|
:ssl_server_ca_auth => {
|
558
567
|
:type => :file,
|
559
568
|
:mode => 0644,
|
@@ -1220,6 +1229,18 @@ EOT
|
|
1220
1229
|
turn off waiting for certificates by specifying a time of 0, in which case
|
1221
1230
|
puppet agent will exit if it cannot get a cert.
|
1222
1231
|
#{AS_DURATION}",
|
1232
|
+
},
|
1233
|
+
:ordering => {
|
1234
|
+
:type => :enum,
|
1235
|
+
:values => ["manifest", "title-hash", "random"],
|
1236
|
+
:default => "title-hash",
|
1237
|
+
:desc => "Controls the default ordering to use in the absence of any
|
1238
|
+
dependency information. By default this is 'title-hash', which is an
|
1239
|
+
opaque, stable, random order. The value of 'manifest' will use the order
|
1240
|
+
in which the resources were added to the catalog, which matches the order
|
1241
|
+
that the puppet language executes. The final value of 'random' causes
|
1242
|
+
resources to be assigned a random order, while still obeying declared
|
1243
|
+
dependencies."
|
1223
1244
|
}
|
1224
1245
|
)
|
1225
1246
|
|
@@ -1297,6 +1318,16 @@ EOT
|
|
1297
1318
|
:smtpserver => {
|
1298
1319
|
:default => "none",
|
1299
1320
|
:desc => "The server through which to send email reports.",
|
1321
|
+
},
|
1322
|
+
:smtpport => {
|
1323
|
+
:default => 25,
|
1324
|
+
:desc => "The TCP port through which to send email reports.",
|
1325
|
+
},
|
1326
|
+
:smtphelo => {
|
1327
|
+
:default => Facter["fqdn"].value,
|
1328
|
+
:desc => "The name by which we identify ourselves in SMTP HELO for reports.
|
1329
|
+
If you send to a smtpserver which does strict HELO checking (as with Postfix's
|
1330
|
+
`smtpd_helo_restrictions` access controls), you may need to ensure this resolves.",
|
1300
1331
|
}
|
1301
1332
|
)
|
1302
1333
|
|
data/lib/puppet/error.rb
CHANGED
data/lib/puppet/external/dot.rb
CHANGED
@@ -39,9 +39,9 @@ module DOT
|
|
39
39
|
'height', # default: .5; height in inches
|
40
40
|
'label', # default: node name; any string
|
41
41
|
'layer', # default: overlay range; all, id or id:id
|
42
|
-
'orientation', #
|
42
|
+
'orientation', # default: 0.0; node rotation angle
|
43
43
|
'peripheries', # shape-dependent number of node boundaries
|
44
|
-
'regular', # default:
|
44
|
+
'regular', # default: false; force polygon to be regular
|
45
45
|
'shape', # default: ellipse; node shape; see Section 2.1 and Appendix E
|
46
46
|
'shapefile', # external EPSF or SVG custom shape file
|
47
47
|
'sides', # default: 4; number of sides for shape=polygon
|
@@ -215,7 +215,7 @@ class Nagios::Base
|
|
215
215
|
# Now access the parameters directly, to make it at least less
|
216
216
|
# likely we'll end up in an infinite recursion.
|
217
217
|
if mname.to_s =~ /=$/
|
218
|
-
@parameters[pname] =
|
218
|
+
@parameters[pname] = args.first
|
219
219
|
else
|
220
220
|
return @parameters[mname]
|
221
221
|
end
|
@@ -271,7 +271,6 @@ class Nagios::Base
|
|
271
271
|
# okay, this sucks
|
272
272
|
# how do i get my list of ocs?
|
273
273
|
def to_ldif
|
274
|
-
base = self.class.ldapbase
|
275
274
|
str = self.dn + "\n"
|
276
275
|
ocs = Array.new
|
277
276
|
if self.class.ocs
|
@@ -410,7 +409,6 @@ class Nagios::Base
|
|
410
409
|
end
|
411
410
|
|
412
411
|
newtype :servicedependency do
|
413
|
-
auxiliary = true
|
414
412
|
setparameters :dependent_host_name, :dependent_hostgroup_name,
|
415
413
|
:dependent_service_description, :host_name, :hostgroup_name,
|
416
414
|
:service_description, :inherits_parent, :execution_failure_criteria,
|
@@ -433,7 +431,6 @@ class Nagios::Base
|
|
433
431
|
end
|
434
432
|
|
435
433
|
newtype :hostdependency do
|
436
|
-
auxiliary = true
|
437
434
|
setparameters :dependent_host_name, :dependent_hostgroup_name, :host_name,
|
438
435
|
:hostgroup_name, :inherits_parent, :execution_failure_criteria,
|
439
436
|
:notification_failure_criteria, :dependency_period,
|
@@ -454,7 +451,6 @@ class Nagios::Base
|
|
454
451
|
end
|
455
452
|
|
456
453
|
newtype :hostextinfo do
|
457
|
-
auxiliary = true
|
458
454
|
setparameters :host_name, :notes, :notes_url, :icon_image, :icon_image_alt,
|
459
455
|
:vrml_image, :statusmap_image, "2d_coords".intern, "3d_coords".intern,
|
460
456
|
:register, :use
|
@@ -463,7 +459,6 @@ class Nagios::Base
|
|
463
459
|
end
|
464
460
|
|
465
461
|
newtype :serviceextinfo do
|
466
|
-
auxiliary = true
|
467
462
|
|
468
463
|
setparameters :host_name, :service_description, :notes, :notes_url,
|
469
464
|
:action_url, :icon_image, :icon_image_alt,
|
@@ -127,7 +127,7 @@ module PSON
|
|
127
127
|
# defiance of RFC 4627 to be parsed by the Parser. This option defaults
|
128
128
|
# to false.
|
129
129
|
# * *create_additions*: If set to false, the Parser doesn't create
|
130
|
-
# additions even if a
|
130
|
+
# additions even if a matching class and create_id was found. This option
|
131
131
|
# defaults to true.
|
132
132
|
def parse(source, opts = {})
|
133
133
|
PSON.parser.new(source, opts).parse
|
@@ -146,7 +146,7 @@ module PSON
|
|
146
146
|
# defiance of RFC 4627 to be parsed by the Parser. This option defaults
|
147
147
|
# to true.
|
148
148
|
# * *create_additions*: If set to false, the Parser doesn't create
|
149
|
-
# additions even if a
|
149
|
+
# additions even if a matching class and create_id was found. This option
|
150
150
|
# defaults to true.
|
151
151
|
def parse!(source, opts = {})
|
152
152
|
opts = {
|
@@ -58,7 +58,7 @@ module PSON
|
|
58
58
|
module Pure
|
59
59
|
module Generator
|
60
60
|
# This class is used to create State instances, that are use to hold data
|
61
|
-
# while generating a PSON text from a
|
61
|
+
# while generating a PSON text from a Ruby data structure.
|
62
62
|
class State
|
63
63
|
# Creates a State object from _opts_, which ought to be Hash to create
|
64
64
|
# a new State instance configured by _opts_, something else to create
|
@@ -366,7 +366,7 @@ module PSON
|
|
366
366
|
# This method creates a raw object hash, that can be nested into
|
367
367
|
# other data structures and will be unparsed as a raw string. This
|
368
368
|
# method should be used, if you want to convert raw strings to PSON
|
369
|
-
# instead of UTF-8 strings, e.
|
369
|
+
# instead of UTF-8 strings, e.g. binary data.
|
370
370
|
def to_pson_raw_object
|
371
371
|
{
|
372
372
|
PSON.create_id => self.class.name,
|
@@ -61,7 +61,7 @@ module PSON
|
|
61
61
|
# defiance of RFC 4627 to be parsed by the Parser. This option defaults
|
62
62
|
# to false.
|
63
63
|
# * *create_additions*: If set to false, the Parser doesn't create
|
64
|
-
# additions even if a
|
64
|
+
# additions even if a matching class and create_id was found. This option
|
65
65
|
# defaults to true.
|
66
66
|
# * *object_class*: Defaults to Hash
|
67
67
|
# * *array_class*: Defaults to Array
|
data/lib/puppet/face/ca.rb
CHANGED
@@ -204,7 +204,7 @@ Puppet::Face.define(:ca, '0.1.0') do
|
|
204
204
|
|
205
205
|
when_invoked do |host, options|
|
206
206
|
raise "Not a CA" unless Puppet::SSL::CertificateAuthority.ca?
|
207
|
-
unless
|
207
|
+
unless Puppet::SSL::CertificateAuthority.instance
|
208
208
|
raise "Unable to fetch the CA"
|
209
209
|
end
|
210
210
|
Puppet::SSL::Host.ca_location = :only
|
data/lib/puppet/face/config.rb
CHANGED
data/lib/puppet/face/help.rb
CHANGED
@@ -129,7 +129,7 @@ Detail: "#{detail.message}"
|
|
129
129
|
|
130
130
|
# Return a list of all applications (both legacy and Face applications), along with a summary
|
131
131
|
# of their functionality.
|
132
|
-
# @
|
132
|
+
# @return [Array] An Array of Arrays. The outer array contains one entry per application; each
|
133
133
|
# element in the outer array is a pair whose first element is a String containing the application
|
134
134
|
# name, and whose second element is a String containing the summary for that application.
|
135
135
|
def all_application_summaries()
|
@@ -140,7 +140,7 @@ Detail: "#{detail.message}"
|
|
140
140
|
begin
|
141
141
|
face = Puppet::Face[appname, :current]
|
142
142
|
result << [appname, face.summary]
|
143
|
-
rescue Puppet::Error
|
143
|
+
rescue Puppet::Error
|
144
144
|
result << [ "! #{appname}", "! Subcommand unavailable due to error. Check error logs." ]
|
145
145
|
end
|
146
146
|
else
|
@@ -237,8 +237,8 @@ Puppet::Face.define(:module, '1.0.0') do
|
|
237
237
|
# { :text => "puppetlabs-mysql (v1.0.0)" }
|
238
238
|
#
|
239
239
|
# The value of a module's :text is affected by three (3) factors: the format
|
240
|
-
# of the tree,
|
241
|
-
# relative to
|
240
|
+
# of the tree, its dependency status, and the location in the modulepath
|
241
|
+
# relative to its parent.
|
242
242
|
#
|
243
243
|
# Returns a Hash
|
244
244
|
#
|
data/lib/puppet/feature/rails.rb
CHANGED