puppet 3.3.2 → 3.4.0.rc1
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/CONTRIBUTING.md +22 -0
- data/Gemfile +11 -2
- data/README.md +13 -17
- data/README_DEVELOPER.md +1 -1
- data/Rakefile +1 -1
- data/examples/hiera/README.md +4 -4
- data/ext/debian/puppetmaster.init +1 -0
- data/ext/debian/rules +2 -5
- data/ext/nagios/check_puppet.rb +7 -7
- data/ext/osx/file_mapping.yaml +1 -1
- data/ext/osx/preflight.erb +34 -19
- data/ext/rack/{files/config.ru → config.ru} +0 -0
- data/ext/rack/{files/apache2.conf → example-passenger-vhost.conf} +6 -0
- data/ext/redhat/puppet.spec.erb +20 -2
- data/ext/systemd/{puppetagent.service → puppet.service} +0 -0
- data/lib/hiera_puppet.rb +2 -2
- data/lib/puppet/agent.rb +1 -6
- data/lib/puppet/application.rb +15 -2
- data/lib/puppet/application/agent.rb +2 -7
- data/lib/puppet/application/apply.rb +8 -13
- data/lib/puppet/application/cert.rb +47 -7
- data/lib/puppet/application/device.rb +1 -6
- data/lib/puppet/application/face_base.rb +1 -1
- data/lib/puppet/application/filebucket.rb +1 -1
- data/lib/puppet/application/inspect.rb +3 -12
- data/lib/puppet/application/master.rb +1 -6
- data/lib/puppet/application/queue.rb +1 -6
- data/lib/puppet/application/resource.rb +2 -6
- data/lib/puppet/coercion.rb +11 -0
- data/lib/puppet/configurer.rb +5 -3
- data/lib/puppet/configurer/downloader.rb +3 -1
- data/lib/puppet/configurer/plugin_handler.rb +10 -0
- data/lib/puppet/confine.rb +80 -0
- data/lib/puppet/{provider/confine → confine}/exists.rb +3 -3
- data/lib/puppet/{provider/confine → confine}/false.rb +2 -2
- data/lib/puppet/{provider/confine → confine}/feature.rb +2 -2
- data/lib/puppet/{provider/confine → confine}/true.rb +2 -2
- data/lib/puppet/{provider/confine → confine}/variable.rb +2 -2
- data/lib/puppet/{provider/confine_collection.rb → confine_collection.rb} +4 -4
- data/lib/puppet/{provider/confiner.rb → confiner.rb} +4 -4
- data/lib/puppet/daemon.rb +2 -6
- data/lib/puppet/data_binding.rb +2 -30
- data/lib/puppet/defaults.rb +283 -174
- data/lib/puppet/error.rb +1 -0
- data/lib/puppet/external/nagios.rb +0 -2
- data/lib/puppet/external/nagios/base.rb +4 -3
- data/lib/puppet/external/nagios/grammar.ry +173 -112
- data/lib/puppet/external/nagios/parser.rb +233 -184
- data/lib/puppet/face/file/store.rb +1 -1
- data/lib/puppet/face/module/generate.rb +5 -7
- data/lib/puppet/face/parser.rb +12 -2
- data/lib/puppet/face/plugin.rb +6 -0
- data/lib/puppet/feature/base.rb +16 -0
- data/lib/puppet/feature/external_facts.rb +5 -0
- data/lib/puppet/feature/libuser.rb +1 -1
- data/lib/puppet/feature/msgpack.rb +1 -0
- data/lib/puppet/feature/rails.rb +2 -2
- data/lib/puppet/file_bucket/dipper.rb +8 -6
- data/lib/puppet/file_bucket/file.rb +17 -1
- data/lib/puppet/file_serving/base.rb +21 -10
- data/lib/puppet/file_serving/configuration.rb +5 -7
- data/lib/puppet/file_serving/configuration/parser.rb +1 -1
- data/lib/puppet/file_serving/content.rb +1 -1
- data/lib/puppet/file_serving/fileset.rb +3 -3
- data/lib/puppet/file_serving/metadata.rb +22 -18
- data/lib/puppet/file_serving/mount/file.rb +1 -1
- data/lib/puppet/file_serving/mount/pluginfacts.rb +35 -0
- data/lib/puppet/file_system.rb +3 -0
- data/lib/puppet/file_system/file.rb +261 -0
- data/lib/puppet/file_system/file18.rb +5 -0
- data/lib/puppet/file_system/file19.rb +5 -0
- data/lib/puppet/file_system/file19windows.rb +113 -0
- data/lib/puppet/file_system/memory_file.rb +31 -0
- data/lib/puppet/file_system/tempfile.rb +20 -0
- data/lib/puppet/indirector/active_record.rb +1 -0
- data/lib/puppet/indirector/catalog/compiler.rb +28 -0
- data/lib/puppet/indirector/certificate_request/memory.rb +6 -0
- data/lib/puppet/indirector/data_binding/hiera.rb +46 -2
- data/lib/puppet/indirector/direct_file_server.rb +2 -2
- data/lib/puppet/indirector/facts/facter.rb +25 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +60 -74
- data/lib/puppet/indirector/indirection.rb +5 -1
- data/lib/puppet/indirector/json.rb +1 -1
- data/lib/puppet/indirector/key/ca.rb +4 -0
- data/lib/puppet/indirector/key/file.rb +7 -3
- data/lib/puppet/indirector/key/memory.rb +6 -0
- data/lib/puppet/indirector/node/write_only_yaml.rb +2 -2
- data/lib/puppet/indirector/request.rb +17 -11
- data/lib/puppet/indirector/resource/ral.rb +5 -0
- data/lib/puppet/indirector/resource/rest.rb +1 -0
- data/lib/puppet/indirector/resource/store_configs.rb +4 -0
- data/lib/puppet/indirector/rest.rb +2 -1
- data/lib/puppet/indirector/ssl_file.rb +7 -7
- data/lib/puppet/indirector/terminus.rb +4 -0
- data/lib/puppet/indirector/yaml.rb +3 -3
- data/lib/puppet/interface/documentation.rb +4 -11
- data/lib/puppet/module.rb +19 -6
- data/lib/puppet/module_tool/applications/builder.rb +1 -1
- data/lib/puppet/module_tool/applications/installer.rb +1 -1
- data/lib/puppet/module_tool/checksums.rb +1 -1
- data/lib/puppet/module_tool/dependency.rb +7 -3
- data/lib/puppet/module_tool/metadata.rb +6 -2
- data/lib/puppet/module_tool/tar.rb +2 -1
- data/lib/puppet/module_tool/tar/gnu.rb +6 -2
- data/lib/puppet/module_tool/tar/mini.rb +2 -0
- data/lib/puppet/module_tool/tar/solaris.rb +2 -5
- data/lib/puppet/network/authconfig.rb +0 -2
- data/lib/puppet/network/authentication.rb +1 -1
- data/lib/puppet/network/authstore.rb +6 -7
- data/lib/puppet/network/format.rb +2 -3
- data/lib/puppet/network/format_handler.rb +16 -11
- data/lib/puppet/network/format_support.rb +14 -0
- data/lib/puppet/network/formats.rb +26 -0
- data/lib/puppet/network/http/connection.rb +8 -41
- data/lib/puppet/network/http/handler.rb +28 -32
- data/lib/puppet/network/http/webrick.rb +15 -22
- data/lib/puppet/network/http_pool.rb +43 -9
- data/lib/puppet/network/rights.rb +0 -0
- data/lib/puppet/node.rb +24 -8
- data/lib/puppet/node/environment.rb +18 -20
- data/lib/puppet/node/facts.rb +23 -6
- data/lib/puppet/parameter.rb +15 -2
- data/lib/puppet/parameter/boolean.rb +5 -0
- data/lib/puppet/parameter/value_collection.rb +6 -4
- data/lib/puppet/parser/ast/resourceparam.rb +2 -1
- data/lib/puppet/parser/compiler.rb +25 -9
- data/lib/puppet/parser/files.rb +1 -1
- data/lib/puppet/parser/functions.rb +12 -21
- data/lib/puppet/parser/functions/collect.rb +6 -35
- data/lib/puppet/parser/functions/contain.rb +26 -0
- data/lib/puppet/parser/functions/create_resources.rb +5 -0
- data/lib/puppet/parser/functions/extlookup.rb +2 -2
- data/lib/puppet/parser/functions/file.rb +1 -1
- data/lib/puppet/parser/functions/{reject.rb → filter.rb} +13 -12
- data/lib/puppet/parser/functions/fqdn_rand.rb +13 -5
- data/lib/puppet/parser/functions/include.rb +18 -1
- data/lib/puppet/parser/functions/map.rb +44 -0
- data/lib/puppet/parser/functions/select.rb +6 -38
- data/lib/puppet/parser/lexer.rb +1 -1
- data/lib/puppet/parser/parser_support.rb +1 -1
- data/lib/puppet/parser/resource.rb +6 -45
- data/lib/puppet/parser/scope.rb +33 -2
- data/lib/puppet/parser/type_loader.rb +4 -60
- data/lib/puppet/pops/binder/bindings_loader.rb +1 -1
- data/lib/puppet/pops/binder/config/binder_config.rb +3 -3
- data/lib/puppet/pops/binder/hiera2/bindings_provider.rb +1 -1
- data/lib/puppet/pops/binder/scheme_handler/confdir_hiera_scheme.rb +1 -1
- data/lib/puppet/pops/binder/scheme_handler/module_hiera_scheme.rb +2 -2
- data/lib/puppet/pops/issues.rb +4 -0
- data/lib/puppet/pops/model/ast_transformer.rb +4 -1
- data/lib/puppet/pops/model/model_label_provider.rb +1 -1
- data/lib/puppet/pops/parser/egrammar.ra +5 -24
- data/lib/puppet/pops/parser/eparser.rb +859 -902
- data/lib/puppet/pops/parser/lexer.rb +48 -30
- data/lib/puppet/pops/parser/parser_support.rb +1 -1
- data/lib/puppet/pops/patterns.rb +4 -4
- data/lib/puppet/pops/utils.rb +1 -1
- data/lib/puppet/pops/validation/checker3_1.rb +25 -20
- data/lib/puppet/provider.rb +23 -6
- data/lib/puppet/provider/aixobject.rb +0 -0
- data/lib/puppet/provider/augeas/augeas.rb +21 -5
- data/lib/puppet/provider/confine.rb +5 -79
- data/lib/puppet/provider/cron/crontab.rb +0 -0
- data/lib/puppet/provider/exec.rb +9 -7
- data/lib/puppet/provider/exec/posix.rb +10 -1
- data/lib/puppet/provider/exec/windows.rb +1 -1
- data/lib/puppet/provider/file/posix.rb +1 -0
- data/lib/puppet/provider/file/windows.rb +16 -5
- data/lib/puppet/provider/group/aix.rb +0 -0
- data/lib/puppet/provider/group/windows_adsi.rb +33 -1
- data/lib/puppet/provider/macauthorization/macauthorization.rb +1 -1
- data/lib/puppet/provider/mailalias/aliases.rb +0 -0
- data/lib/puppet/provider/maillist/mailman.rb +0 -0
- data/lib/puppet/provider/mount/parsed.rb +0 -0
- data/lib/puppet/provider/nameservice/directoryservice.rb +3 -3
- data/lib/puppet/provider/package/appdmg.rb +1 -1
- data/lib/puppet/provider/package/apple.rb +1 -1
- data/lib/puppet/provider/package/apt.rb +1 -1
- data/lib/puppet/provider/package/aptitude.rb +0 -0
- data/lib/puppet/provider/package/blastwave.rb +1 -1
- data/lib/puppet/provider/package/dpkg.rb +1 -1
- data/lib/puppet/provider/package/fink.rb +1 -1
- data/lib/puppet/provider/package/freebsd.rb +0 -0
- data/lib/puppet/provider/package/gem.rb +0 -0
- data/lib/puppet/provider/package/macports.rb +0 -0
- data/lib/puppet/provider/package/msi.rb +4 -10
- data/lib/puppet/provider/package/nim.rb +8 -8
- data/lib/puppet/provider/package/openbsd.rb +1 -1
- data/lib/puppet/provider/package/opkg.rb +0 -0
- data/lib/puppet/provider/package/pacman.rb +2 -2
- data/lib/puppet/provider/package/pkgdmg.rb +1 -1
- data/lib/puppet/provider/package/pkgutil.rb +1 -1
- data/lib/puppet/provider/package/ports.rb +0 -0
- data/lib/puppet/provider/package/rpm.rb +39 -3
- data/lib/puppet/provider/package/sun.rb +3 -3
- data/lib/puppet/provider/package/sunfreeware.rb +0 -0
- data/lib/puppet/provider/package/windows.rb +12 -19
- data/lib/puppet/provider/package/windows/package.rb +1 -1
- data/lib/puppet/provider/package/yum.rb +2 -2
- data/lib/puppet/provider/parsedfile.rb +0 -0
- data/lib/puppet/provider/port/parsed.rb +0 -0
- data/lib/puppet/provider/service/base.rb +0 -0
- data/lib/puppet/provider/service/bsd.rb +3 -3
- data/lib/puppet/provider/service/daemontools.rb +8 -8
- data/lib/puppet/provider/service/debian.rb +0 -0
- data/lib/puppet/provider/service/freebsd.rb +3 -3
- data/lib/puppet/provider/service/init.rb +5 -4
- data/lib/puppet/provider/service/launchd.rb +35 -24
- data/lib/puppet/provider/service/openbsd.rb +23 -0
- data/lib/puppet/provider/service/redhat.rb +0 -0
- data/lib/puppet/provider/service/runit.rb +3 -3
- data/lib/puppet/provider/service/smf.rb +0 -0
- data/lib/puppet/provider/service/src.rb +0 -0
- data/lib/puppet/provider/service/systemd.rb +0 -0
- data/lib/puppet/provider/service/upstart.rb +3 -3
- data/lib/puppet/provider/ssh_authorized_key/parsed.rb +2 -2
- data/lib/puppet/provider/sshkey/parsed.rb +0 -0
- data/lib/puppet/provider/user/aix.rb +0 -0
- data/lib/puppet/provider/user/directoryservice.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +1 -1
- data/lib/puppet/provider/zone/solaris.rb +1 -1
- data/lib/puppet/rails/benchmark.rb +1 -1
- data/lib/puppet/reference/configuration.rb +1 -2
- data/lib/puppet/reference/indirection.rb +12 -14
- data/lib/puppet/relationship.rb +7 -4
- data/lib/puppet/reports.rb +2 -2
- data/lib/puppet/reports/rrdgraph.rb +1 -1
- data/lib/puppet/reports/store.rb +3 -3
- data/lib/puppet/reports/tagmail.rb +2 -2
- data/lib/puppet/resource.rb +66 -8
- data/lib/puppet/resource/catalog.rb +18 -25
- data/lib/puppet/resource/status.rb +10 -4
- data/lib/puppet/run.rb +6 -2
- data/lib/puppet/settings.rb +39 -119
- data/lib/puppet/settings/base_setting.rb +8 -9
- data/lib/puppet/settings/directory_setting.rb +8 -0
- data/lib/puppet/settings/file_setting.rb +35 -1
- data/lib/puppet/settings/priority_setting.rb +42 -0
- data/lib/puppet/ssl.rb +4 -0
- data/lib/puppet/ssl/certificate.rb +18 -0
- data/lib/puppet/ssl/certificate_authority.rb +101 -72
- data/lib/puppet/ssl/certificate_authority/autosign_command.rb +44 -0
- data/lib/puppet/ssl/certificate_authority/interface.rb +21 -17
- data/lib/puppet/ssl/certificate_factory.rb +38 -12
- data/lib/puppet/ssl/certificate_request.rb +201 -47
- data/lib/puppet/ssl/certificate_request_attributes.rb +34 -0
- data/lib/puppet/ssl/certificate_revocation_list.rb +2 -2
- data/lib/puppet/ssl/host.rb +21 -10
- data/lib/puppet/ssl/inventory.rb +6 -10
- data/lib/puppet/ssl/key.rb +1 -1
- data/lib/puppet/ssl/oids.rb +78 -0
- data/lib/puppet/ssl/validator.rb +41 -97
- data/lib/puppet/ssl/validator/default_validator.rb +153 -0
- data/lib/puppet/ssl/validator/no_validator.rb +17 -0
- data/lib/puppet/status.rb +4 -0
- data/lib/puppet/test/test_helper.rb +5 -0
- data/lib/puppet/transaction.rb +13 -0
- data/lib/puppet/transaction/event.rb +8 -3
- data/lib/puppet/transaction/report.rb +6 -2
- data/lib/puppet/transaction/resource_harness.rb +173 -115
- data/lib/puppet/type.rb +30 -13
- data/lib/puppet/type/augeas.rb +12 -46
- data/lib/puppet/type/component.rb +1 -7
- data/lib/puppet/type/cron.rb +0 -0
- data/lib/puppet/type/exec.rb +13 -1
- data/lib/puppet/type/file.rb +19 -10
- data/lib/puppet/type/file/checksum.rb +0 -0
- data/lib/puppet/type/file/content.rb +3 -0
- data/lib/puppet/type/file/ensure.rb +33 -15
- data/lib/puppet/type/file/group.rb +0 -0
- data/lib/puppet/type/file/mode.rb +6 -2
- data/lib/puppet/type/file/owner.rb +0 -0
- data/lib/puppet/type/file/source.rb +65 -14
- data/lib/puppet/type/file/target.rb +6 -6
- data/lib/puppet/type/file/type.rb +0 -0
- data/lib/puppet/type/filebucket.rb +0 -0
- data/lib/puppet/type/group.rb +18 -0
- data/lib/puppet/type/host.rb +0 -0
- data/lib/puppet/type/k5login.rb +4 -4
- data/lib/puppet/type/mailalias.rb +0 -0
- data/lib/puppet/type/maillist.rb +0 -0
- data/lib/puppet/type/mount.rb +15 -1
- data/lib/puppet/type/package.rb +7 -1
- data/lib/puppet/type/port.rb +0 -0
- data/lib/puppet/type/schedule.rb +9 -4
- data/lib/puppet/type/service.rb +1 -1
- data/lib/puppet/type/sshkey.rb +0 -0
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/user.rb +3 -0
- data/lib/puppet/type/yumrepo.rb +8 -6
- data/lib/puppet/type/zpool.rb +0 -0
- data/lib/puppet/util.rb +4 -31
- data/lib/puppet/util/adsi.rb +73 -17
- data/lib/puppet/util/autoload.rb +3 -3
- data/lib/puppet/util/backups.rb +4 -4
- data/lib/puppet/util/cacher.rb +7 -13
- data/lib/puppet/util/checksums.rb +2 -2
- data/lib/puppet/util/classgen.rb +3 -1
- data/lib/puppet/util/colors.rb +1 -0
- data/lib/puppet/util/command_line.rb +5 -0
- data/lib/puppet/util/docs.rb +33 -27
- data/lib/puppet/util/execution.rb +42 -18
- data/lib/puppet/util/filetype.rb +3 -3
- data/lib/puppet/util/instance_loader.rb +2 -2
- data/lib/puppet/util/instrumentation.rb +23 -42
- data/lib/puppet/util/instrumentation/data.rb +11 -4
- data/lib/puppet/util/instrumentation/indirection_probe.rb +11 -4
- data/lib/puppet/util/instrumentation/instrumentable.rb +7 -14
- data/lib/puppet/util/instrumentation/listener.rb +15 -8
- data/lib/puppet/util/instrumentation/listeners/log.rb +4 -10
- data/lib/puppet/util/instrumentation/listeners/performance.rb +8 -14
- data/lib/puppet/util/limits.rb +12 -0
- data/lib/puppet/util/lockfile.rb +2 -2
- data/lib/puppet/util/log.rb +14 -6
- data/lib/puppet/util/log/destinations.rb +23 -1
- data/lib/puppet/util/metric.rb +9 -3
- data/lib/puppet/util/monkey_patches.rb +7 -2
- data/lib/puppet/util/network_device/config.rb +1 -1
- data/lib/puppet/util/plugins.rb +1 -1
- data/lib/puppet/util/posix.rb +0 -0
- data/lib/puppet/util/profiler.rb +7 -2
- data/lib/puppet/util/provider_features.rb +2 -2
- data/lib/puppet/util/rdoc.rb +28 -30
- data/lib/puppet/util/rdoc/code_objects.rb +75 -25
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +1 -1
- data/lib/puppet/util/rdoc/parser.rb +12 -487
- data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +477 -0
- data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc1.rb +19 -0
- data/lib/puppet/util/rdoc/parser/puppet_parser_rdoc2.rb +14 -0
- data/lib/puppet/util/reference.rb +1 -1
- data/lib/puppet/util/resource_template.rb +1 -1
- data/lib/puppet/util/selinux.rb +1 -1
- data/lib/puppet/util/storage.rb +2 -2
- data/lib/puppet/util/suidmanager.rb +1 -1
- data/lib/puppet/util/tag_set.rb +29 -0
- data/lib/puppet/util/tagging.rb +8 -24
- data/lib/puppet/util/watched_file.rb +1 -1
- data/lib/puppet/util/watcher.rb +1 -1
- data/lib/puppet/util/windows.rb +3 -0
- data/lib/puppet/util/windows/access_control_entry.rb +84 -0
- data/lib/puppet/util/windows/access_control_list.rb +106 -0
- data/lib/puppet/util/windows/file.rb +213 -0
- data/lib/puppet/util/windows/process.rb +199 -0
- data/lib/puppet/util/windows/root_certs.rb +52 -37
- data/lib/puppet/util/windows/security.rb +270 -245
- data/lib/puppet/util/windows/security_descriptor.rb +62 -0
- data/lib/puppet/util/windows/sid.rb +26 -4
- data/lib/puppet/version.rb +2 -2
- data/spec/fixtures/releases/jamtur01-apache/lib/puppet/provider/a2mod/debian.rb +1 -1
- data/spec/fixtures/unit/indirector/{hiera → data_binding/hiera}/global.yaml +0 -0
- data/spec/fixtures/unit/indirector/data_binding/hiera/invalid.yaml +1 -0
- data/spec/fixtures/unit/module/trailing-comma.json +24 -0
- data/spec/fixtures/unit/util/monkey_patches/x509.pem +32 -0
- data/spec/integration/application/apply_spec.rb +1 -1
- data/spec/integration/application/doc_spec.rb +1 -1
- data/spec/integration/configurer_spec.rb +4 -2
- data/spec/integration/data_binding.rb +100 -0
- data/spec/integration/indirector/catalog/compiler_spec.rb +16 -13
- data/spec/integration/indirector/direct_file_server_spec.rb +3 -5
- data/spec/integration/indirector/file_content/file_server_spec.rb +2 -2
- data/spec/integration/node/facts_spec.rb +1 -1
- data/spec/integration/node_spec.rb +1 -1
- data/spec/integration/parser/compiler_spec.rb +90 -0
- data/spec/integration/parser/parser_spec.rb +2 -2
- data/spec/integration/provider/cron/crontab_spec.rb +3 -5
- data/spec/integration/resource/catalog_spec.rb +1 -1
- data/spec/integration/ssl/autosign_spec.rb +90 -0
- data/spec/integration/ssl/certificate_authority_spec.rb +62 -69
- data/spec/integration/ssl/certificate_revocation_list_spec.rb +1 -1
- data/spec/integration/ssl/host_spec.rb +1 -1
- data/spec/integration/transaction_spec.rb +13 -13
- data/spec/integration/type/exec_spec.rb +2 -2
- data/spec/integration/type/file_spec.rb +287 -45
- data/spec/integration/type/tidy_spec.rb +3 -3
- data/spec/integration/util/rdoc/parser_spec.rb +236 -35
- data/spec/integration/util/settings_spec.rb +1 -1
- data/spec/integration/util/windows/process_spec.rb +22 -0
- data/spec/integration/util/windows/security_spec.rb +316 -106
- data/spec/lib/matchers/containment_matchers.rb +52 -0
- data/spec/lib/puppet_spec/compiler.rb +6 -0
- data/spec/lib/puppet_spec/files.rb +20 -21
- data/spec/shared_behaviours/documentation_on_faces.rb +3 -3
- data/spec/shared_behaviours/file_server_terminus.rb +2 -2
- data/spec/shared_contexts/platform.rb +1 -0
- data/spec/spec_helper.rb +13 -1
- data/spec/unit/agent_spec.rb +0 -12
- data/spec/unit/application/agent_spec.rb +4 -4
- data/spec/unit/application/apply_spec.rb +18 -2
- data/spec/unit/application/cert_spec.rb +8 -6
- data/spec/unit/application/device_spec.rb +1 -1
- data/spec/unit/application/filebucket_spec.rb +1 -1
- data/spec/unit/application/inspect_spec.rb +1 -1
- data/spec/unit/application_spec.rb +24 -0
- data/spec/unit/configurer/downloader_spec.rb +8 -7
- data/spec/unit/configurer/fact_handler_spec.rb +23 -0
- data/spec/unit/configurer/plugin_handler_spec.rb +7 -2
- data/spec/unit/configurer_spec.rb +15 -5
- data/spec/unit/{provider/confine → confine}/exists_spec.rb +12 -12
- data/spec/unit/{provider/confine → confine}/false_spec.rb +9 -9
- data/spec/unit/{provider/confine → confine}/feature_spec.rb +10 -10
- data/spec/unit/{provider/confine → confine}/true_spec.rb +7 -7
- data/spec/unit/{provider/confine → confine}/variable_spec.rb +16 -16
- data/spec/unit/{provider/confine_collection_spec.rb → confine_collection_spec.rb} +30 -30
- data/spec/unit/{provider/confine_spec.rb → confine_spec.rb} +11 -11
- data/spec/unit/{provider/confiner_spec.rb → confiner_spec.rb} +4 -4
- data/spec/unit/face/parser_spec.rb +54 -0
- data/spec/unit/file_bucket/dipper_spec.rb +2 -2
- data/spec/unit/file_serving/base_spec.rb +32 -9
- data/spec/unit/file_serving/configuration_spec.rb +7 -7
- data/spec/unit/file_serving/content_spec.rb +12 -7
- data/spec/unit/file_serving/fileset_spec.rb +57 -27
- data/spec/unit/file_serving/metadata_spec.rb +74 -12
- data/spec/unit/file_serving/mount/file_spec.rb +10 -10
- data/spec/unit/file_serving/mount/pluginfacts_spec.rb +73 -0
- data/spec/unit/file_system/file_spec.rb +486 -0
- data/spec/unit/file_system/tempfile_spec.rb +48 -0
- data/spec/unit/graph/relationship_graph_spec.rb +0 -6
- data/spec/unit/hiera_puppet_spec.rb +2 -2
- data/spec/unit/indirector/catalog/compiler_spec.rb +15 -19
- data/spec/unit/indirector/certificate_status/file_spec.rb +30 -40
- data/spec/unit/indirector/data_binding/hiera_spec.rb +95 -2
- data/spec/unit/indirector/direct_file_server_spec.rb +6 -6
- data/spec/unit/indirector/facts/facter_spec.rb +33 -0
- data/spec/unit/indirector/file_bucket_file/file_spec.rb +61 -52
- data/spec/unit/indirector/file_metadata/file_spec.rb +2 -2
- data/spec/unit/indirector/file_server_spec.rb +4 -4
- data/spec/unit/indirector/json_spec.rb +4 -4
- data/spec/unit/indirector/key/file_spec.rb +13 -14
- data/spec/unit/indirector/resource/ral_spec.rb +7 -0
- data/spec/unit/indirector/resource/store_configs_spec.rb +11 -0
- data/spec/unit/indirector/rest_spec.rb +7 -3
- data/spec/unit/indirector/ssl_file_spec.rb +14 -17
- data/spec/unit/indirector/yaml_spec.rb +4 -4
- data/spec/unit/module_spec.rb +43 -15
- data/spec/unit/module_tool/tar/gnu_spec.rb +2 -2
- data/spec/unit/module_tool/tar/solaris_spec.rb +2 -2
- data/spec/unit/module_tool/tar_spec.rb +45 -0
- data/spec/unit/network/authconfig_spec.rb +2 -1
- data/spec/unit/network/authentication_spec.rb +2 -2
- data/spec/unit/network/format_handler_spec.rb +2 -2
- data/spec/unit/network/formats_spec.rb +24 -0
- data/spec/unit/network/http/connection_spec.rb +76 -199
- data/spec/unit/network/http/handler_spec.rb +33 -34
- data/spec/unit/network/http_pool_spec.rb +8 -5
- data/spec/unit/node/environment_spec.rb +76 -90
- data/spec/unit/node/facts_spec.rb +20 -3
- data/spec/unit/node_spec.rb +43 -0
- data/spec/unit/parameter/boolean_spec.rb +22 -12
- data/spec/unit/parser/ast/resourceparam_spec.rb +51 -0
- data/spec/unit/parser/compiler_spec.rb +103 -35
- data/spec/unit/parser/eparser_adapter_spec.rb +12 -12
- data/spec/unit/parser/files_spec.rb +11 -11
- data/spec/unit/parser/functions/contain_spec.rb +185 -0
- data/spec/unit/parser/functions/create_resources_spec.rb +13 -5
- data/spec/unit/parser/functions/generate_spec.rb +1 -1
- data/spec/unit/parser/functions_spec.rb +2 -2
- data/spec/unit/parser/lexer_spec.rb +1 -1
- data/spec/unit/parser/methods/each_spec.rb +1 -1
- data/spec/unit/parser/methods/{select_spec.rb → filter_spec.rb} +11 -11
- data/spec/unit/parser/methods/map_spec.rb +95 -0
- data/spec/unit/parser/methods/reduce_spec.rb +12 -11
- data/spec/unit/parser/methods/shared.rb +5 -5
- data/spec/unit/parser/methods/slice_spec.rb +13 -13
- data/spec/unit/parser/parser_spec.rb +1 -1
- data/spec/unit/parser/resource/param_spec.rb +44 -0
- data/spec/unit/parser/resource_spec.rb +16 -15
- data/spec/unit/pops/model/ast_transformer_spec.rb +18 -4
- data/spec/unit/pops/parser/lexer_spec.rb +22 -5
- data/spec/unit/pops/parser/parse_calls_spec.rb +5 -5
- data/spec/unit/pops/transformer/transform_calls_spec.rb +6 -6
- data/spec/unit/pops/transformer/transform_containers_spec.rb +2 -2
- data/spec/unit/pops/validator/validator_spec.rb +31 -0
- data/spec/unit/provider/augeas/augeas_spec.rb +57 -2
- data/spec/unit/provider/exec/posix_spec.rb +8 -3
- data/spec/unit/provider/file/posix_spec.rb +2 -2
- data/spec/unit/provider/group/windows_adsi_spec.rb +70 -3
- data/spec/unit/provider/nameservice/directoryservice_spec.rb +3 -3
- data/spec/unit/provider/package/apt_spec.rb +1 -1
- data/spec/unit/provider/package/msi_spec.rb +15 -42
- data/spec/unit/provider/package/openbsd_spec.rb +3 -3
- data/spec/unit/provider/package/rpm_spec.rb +56 -13
- data/spec/unit/provider/package/windows_spec.rb +15 -19
- data/spec/unit/provider/service/base_spec.rb +1 -1
- data/spec/unit/provider/service/daemontools_spec.rb +18 -8
- data/spec/unit/provider/service/freebsd_spec.rb +3 -3
- data/spec/unit/provider/service/gentoo_spec.rb +5 -2
- data/spec/unit/provider/service/init_spec.rb +17 -17
- data/spec/unit/provider/service/launchd_spec.rb +76 -23
- data/spec/unit/provider/service/openbsd_spec.rb +125 -0
- data/spec/unit/provider/service/openwrt_spec.rb +1 -1
- data/spec/unit/provider/service/runit_spec.rb +12 -5
- data/spec/unit/provider/service/upstart_spec.rb +4 -4
- data/spec/unit/provider/ssh_authorized_key/parsed_spec.rb +5 -5
- data/spec/unit/provider/user/directoryservice_spec.rb +4 -4
- data/spec/unit/provider/zone/solaris_spec.rb +1 -1
- data/spec/unit/provider_spec.rb +2 -2
- data/spec/unit/reports/http_spec.rb +19 -34
- data/spec/unit/reports/store_spec.rb +2 -2
- data/spec/unit/resource/catalog_spec.rb +81 -11
- data/spec/unit/resource/status_spec.rb +11 -1
- data/spec/unit/resource/type_spec.rb +30 -1
- data/spec/unit/resource_spec.rb +40 -4
- data/spec/unit/settings/file_setting_spec.rb +2 -2
- data/spec/unit/settings/path_setting_spec.rb +2 -2
- data/spec/unit/settings/priority_setting_spec.rb +66 -0
- data/spec/unit/settings_spec.rb +16 -31
- data/spec/unit/ssl/certificate_authority/autosign_command_spec.rb +30 -0
- data/spec/unit/ssl/certificate_authority_spec.rb +129 -134
- data/spec/unit/ssl/certificate_factory_spec.rb +18 -0
- data/spec/unit/ssl/certificate_request_attributes_spec.rb +61 -0
- data/spec/unit/ssl/certificate_request_spec.rb +103 -0
- data/spec/unit/ssl/certificate_spec.rb +31 -18
- data/spec/unit/ssl/host_spec.rb +34 -8
- data/spec/unit/ssl/inventory_spec.rb +27 -62
- data/spec/unit/ssl/key_spec.rb +4 -4
- data/spec/unit/ssl/oids_spec.rb +48 -0
- data/spec/unit/ssl/validator_spec.rb +49 -6
- data/spec/unit/status_spec.rb +9 -0
- data/spec/unit/transaction/event_spec.rb +1 -9
- data/spec/unit/transaction/report_spec.rb +20 -1
- data/spec/unit/transaction/resource_harness_spec.rb +60 -210
- data/spec/unit/transaction_spec.rb +54 -8
- data/spec/unit/type/component_spec.rb +2 -2
- data/spec/unit/type/exec_spec.rb +14 -7
- data/spec/unit/type/file/content_spec.rb +13 -2
- data/spec/unit/type/file/ctime_spec.rb +1 -1
- data/spec/unit/type/file/mode_spec.rb +48 -2
- data/spec/unit/type/file/mtime_spec.rb +1 -1
- data/spec/unit/type/file/source_spec.rb +177 -7
- data/spec/unit/type/file_spec.rb +63 -71
- data/spec/unit/type/group_spec.rb +20 -0
- data/spec/unit/type/k5login_spec.rb +3 -3
- data/spec/unit/type/mount_spec.rb +53 -0
- data/spec/unit/type/nagios_spec.rb +216 -0
- data/spec/unit/type/package_spec.rb +7 -1
- data/spec/unit/type/schedule_spec.rb +6 -0
- data/spec/unit/type/service_spec.rb +3 -3
- data/spec/unit/type/tidy_spec.rb +14 -14
- data/spec/unit/type/user_spec.rb +9 -0
- data/spec/unit/type_spec.rb +86 -4
- data/spec/unit/util/adsi_spec.rb +120 -12
- data/spec/unit/util/autoload_spec.rb +14 -14
- data/spec/unit/util/backups_spec.rb +29 -21
- data/spec/unit/util/checksums_spec.rb +2 -1
- data/spec/unit/util/command_line_spec.rb +41 -0
- data/spec/unit/util/docs_spec.rb +91 -0
- data/spec/unit/util/execution_spec.rb +26 -2
- data/spec/unit/util/filetype_spec.rb +7 -7
- data/spec/unit/util/lockfile_spec.rb +2 -2
- data/spec/unit/util/log/destinations_spec.rb +32 -0
- data/spec/unit/util/monkey_patches_spec.rb +41 -0
- data/spec/unit/util/pidlock_spec.rb +6 -6
- data/spec/unit/util/rdoc/parser_spec.rb +15 -13
- data/spec/unit/util/rdoc_spec.rb +18 -24
- data/spec/unit/util/resource_template_spec.rb +3 -3
- data/spec/unit/util/selinux_spec.rb +4 -2
- data/spec/unit/util/storage_spec.rb +4 -4
- data/spec/unit/util/suidmanager_spec.rb +7 -0
- data/spec/unit/util/tag_set_spec.rb +46 -0
- data/spec/unit/util/tagging_spec.rb +82 -45
- data/spec/unit/util/watcher_spec.rb +4 -1
- data/spec/unit/util/windows/access_control_entry_spec.rb +67 -0
- data/spec/unit/util/windows/access_control_list_spec.rb +133 -0
- data/spec/unit/util/windows/root_certs_spec.rb +10 -8
- data/spec/unit/util/windows/security_descriptor_spec.rb +117 -0
- data/spec/unit/util/windows/sid_spec.rb +69 -0
- data/spec/unit/util_spec.rb +7 -7
- data/tasks/ci.rake +17 -36
- metadata +2811 -2746
- checksums.yaml +0 -7
- data/examples/mac_automount.pp +0 -16
- data/examples/mcx_dock_absent.pp +0 -4
- data/examples/mcx_dock_default.pp +0 -118
- data/examples/mcx_dock_full.pp +0 -125
- data/examples/mcx_dock_invalid.pp +0 -9
- data/examples/mcx_nogroup.pp +0 -118
- data/examples/mcx_notexists_absent.pp +0 -4
- data/ext/rack/README +0 -58
- data/ext/rack/manifest.pp +0 -59
- data/lib/puppet/external/lock.rb +0 -63
- data/lib/puppet/indirector/hiera.rb +0 -39
- data/lib/puppet/parser/functions/foreach.rb +0 -95
- data/spec/integration/network/server/webrick_spec.rb +0 -76
- data/spec/integration/parser/functions_spec.rb +0 -16
- data/spec/unit/indirector/hiera_spec.rb +0 -154
- data/spec/unit/parser/methods/collect_spec.rb +0 -153
- data/spec/unit/parser/methods/foreach_spec.rb +0 -91
- data/spec/unit/parser/methods/reject_spec.rb +0 -73
- data/spec/unit/resource/resource_type.json +0 -34
data/CONTRIBUTING.md
CHANGED
@@ -47,6 +47,28 @@ top of things.
|
|
47
47
|
* Make sure you have added the necessary tests for your changes.
|
48
48
|
* Run _all_ the tests to assure nothing else was accidentally broken.
|
49
49
|
|
50
|
+
## Making Trivial Changes
|
51
|
+
|
52
|
+
### Documentation
|
53
|
+
|
54
|
+
For changes of a trivial nature to comments and documentation, it is not
|
55
|
+
always necessary to create a new ticket in Redmine. In this case, it is
|
56
|
+
appropriate to start the first line of a commit with '(doc)' instead of
|
57
|
+
a ticket number.
|
58
|
+
|
59
|
+
````
|
60
|
+
(doc) Add documentation commit example to CONTRIBUTING
|
61
|
+
|
62
|
+
There is no example for contributing a documentation commit
|
63
|
+
to the Puppet repository. This is a problem because the contributor
|
64
|
+
is left to assume how a commit of this nature may appear.
|
65
|
+
|
66
|
+
The first line is a real life imperative statement with '(doc)' in
|
67
|
+
place of what would have been the ticket number in a
|
68
|
+
non-documentation related commit. The body describes the nature of
|
69
|
+
the new documentation or comments added.
|
70
|
+
````
|
71
|
+
|
50
72
|
## Submitting Changes
|
51
73
|
|
52
74
|
* Sign the [Contributor License Agreement](http://links.puppetlabs.com/cla).
|
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
source "https://rubygems.org"
|
1
|
+
source ENV['GEM_SOURCE'] || "https://rubygems.org"
|
2
2
|
|
3
3
|
def location_for(place, fake_version = nil)
|
4
|
-
if place =~ /^(git
|
4
|
+
if place =~ /^(git[:@][^#]*)#(.*)/
|
5
5
|
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
|
6
6
|
elsif place =~ /^file:\/\/(.*)/
|
7
7
|
['>= 0', { :path => File.expand_path($1), :require => false }]
|
@@ -37,6 +37,14 @@ group(:development, :test) do
|
|
37
37
|
gem "mocha", "~> 0.10.5", :require => false
|
38
38
|
|
39
39
|
gem "yarjuf", "~> 1.0"
|
40
|
+
|
41
|
+
# json-schema does not support windows, so use the 'ruby' platform to exclude it on windows
|
42
|
+
platforms :ruby do
|
43
|
+
# json-schema uses multi_json, but chokes with multi_json 1.7.9, so prefer 1.7.7
|
44
|
+
gem "multi_json", "1.7.7", :require => false
|
45
|
+
gem "json-schema", "2.1.1", :require => false
|
46
|
+
end
|
47
|
+
|
40
48
|
end
|
41
49
|
|
42
50
|
group(:extra) do
|
@@ -48,6 +56,7 @@ group(:extra) do
|
|
48
56
|
gem "sqlite3", :require => false
|
49
57
|
gem "stomp", :require => false
|
50
58
|
gem "tzinfo", :require => false
|
59
|
+
gem "msgpack", :require => false
|
51
60
|
end
|
52
61
|
|
53
62
|
platforms :mswin, :mingw do
|
data/README.md
CHANGED
@@ -7,32 +7,28 @@ Puppet, an automated administrative engine for your Linux, Unix, and Windows sys
|
|
7
7
|
administrative tasks (such as adding users, installing packages, and updating server
|
8
8
|
configurations) based on a centralized specification.
|
9
9
|
|
10
|
-
Documentation
|
11
|
-
|
10
|
+
Documentation
|
11
|
+
-------------
|
12
12
|
|
13
|
+
Documentation for Puppet and related projects can be found online at the
|
14
|
+
[Puppet Docs site](http://docs.puppetlabs.com).
|
13
15
|
|
14
16
|
Installation
|
15
17
|
------------
|
16
18
|
|
17
|
-
|
18
|
-
|
19
|
-
|
19
|
+
The best way to run Puppet is with [Puppet Enterprise](http://puppetlabs.com/puppet/puppet-enterprise),
|
20
|
+
which also includes orchestration features, a web console, and professional support.
|
21
|
+
[The PE documentation is available here.](http://docs.puppetlabs.com/pe/latest)
|
20
22
|
|
21
|
-
|
22
|
-
|
23
|
-
`ruby -ropenssl -e "puts :yep"`. If that errors out, you're missing the
|
24
|
-
library.
|
23
|
+
To install an open source release of Puppet,
|
24
|
+
[see the installation guide on the docs site.](http://docs.puppetlabs.com/guides/installation.html)
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
compile Ruby yourself, since it's part of the standard library and not
|
29
|
-
available separately. You could probably just compile and install that one
|
30
|
-
library, though.
|
31
|
-
|
32
|
-
* Facter => 1.6.11 (available via your package manager or from the [Facter site](http://puppetlabs.com/projects/facter)).
|
26
|
+
If you need to run Puppet from source as a tester or developer,
|
27
|
+
[see the running from source guide on the docs site.](http://docs.puppetlabs.com/guides/from_source.html)
|
33
28
|
|
34
29
|
Contributions
|
35
30
|
------
|
31
|
+
|
36
32
|
Please see our [Contribution
|
37
33
|
Documents](https://github.com/puppetlabs/puppet/blob/master/CONTRIBUTING.md)
|
38
34
|
and our [Developer
|
@@ -54,4 +50,4 @@ is an active #puppet channel on Freenode.
|
|
54
50
|
|
55
51
|
HTTP API
|
56
52
|
--------
|
57
|
-
{file:
|
53
|
+
{file:api/docs/http_api_index.md HTTP API Index}
|
data/README_DEVELOPER.md
CHANGED
@@ -693,7 +693,7 @@ When Puppet master is started from Rack, Puppet 3.x will read from
|
|
693
693
|
~/.puppet/puppet.conf by default. This is intended behavior. Rack
|
694
694
|
configurations should start Puppet master with an explicit configuration
|
695
695
|
directory using `ARGV << "--confdir" << "/etc/puppet"`. Please see the
|
696
|
-
`ext/rack/
|
696
|
+
`ext/rack/config.ru` file for an up-to-date example.
|
697
697
|
|
698
698
|
# Determining the Puppet Version
|
699
699
|
|
data/Rakefile
CHANGED
data/examples/hiera/README.md
CHANGED
@@ -24,7 +24,7 @@ Module from forge with module defaults
|
|
24
24
|
|
25
25
|
<pre>
|
26
26
|
$ mv modules/data modules/data.bak
|
27
|
-
$ puppet --config etc/puppet.conf
|
27
|
+
$ puppet apply --config etc/puppet.conf site.pp
|
28
28
|
notice: /Stage[main]/Ntp::Config/File[/tmp/ntp.conf]/ensure: defined content as '{md5}7045121976147a932a66c7671939a9ad'
|
29
29
|
notice: /Stage[main]/Users::Common/Notify[Adding users::common]/message: defined 'message' as 'Adding users::common'
|
30
30
|
$ cat /tmp/ntp.conf
|
@@ -40,7 +40,7 @@ Site wide override data in _data::common_
|
|
40
40
|
|
41
41
|
<pre>
|
42
42
|
$ mv modules/data.bak modules/data
|
43
|
-
$ puppet --config etc/puppet.conf
|
43
|
+
$ puppet apply --config etc/puppet.conf site.pp
|
44
44
|
notice: /Stage[main]/Ntp::Config/File[/tmp/ntp.conf]/content: content changed '{md5}7045121976147a932a66c7671939a9addc2' to '{md5}8f9039fe1989a278a0a8e1836acb8d23'
|
45
45
|
notice: /Stage[main]/Users::Common/Notify[Adding users::common]/message: defined 'message' as 'Adding users::common'
|
46
46
|
$ cat /tmp/ntp.conf
|
@@ -56,7 +56,7 @@ Fact driven overrides for location=dc1
|
|
56
56
|
* The _hiera_include()_ function includes _users::common_ and _users::dc1_ as the data file for dc1 adds that
|
57
57
|
|
58
58
|
<pre>
|
59
|
-
$ FACTER_location=dc1 puppet --config etc/puppet.conf
|
59
|
+
$ FACTER_location=dc1 puppet apply --config etc/puppet.conf site.pp
|
60
60
|
notice: /Stage[main]/Ntp::Config/File[/tmp/ntp.conf]/content: content changed '{md5}8f9039fe1989a278a0a8e1836acb8d23' to '{md5}074d0e2ac727f6cb9afe3345d574b578'
|
61
61
|
notice: /Stage[main]/Users::Common/Notify[Adding users::common]/message: defined 'message' as 'Adding users::common'
|
62
62
|
notice: /Stage[main]/Users::Dc1/Notify[Adding users::dc1]/message: defined 'message' as 'Adding users::dc1'
|
@@ -69,7 +69,7 @@ Now simulate a machine in _dc2_, because there is no data for dc2 it uses the si
|
|
69
69
|
does not include the _users::dc1_ class anymore
|
70
70
|
|
71
71
|
<pre>
|
72
|
-
$ FACTER_location=dc2 puppet --config etc/puppet.conf
|
72
|
+
$ FACTER_location=dc2 puppet apply --config etc/puppet.conf site.pp
|
73
73
|
warning: Could not find class data::dc2 for nephilim.ml.org
|
74
74
|
notice: /Stage[main]/Ntp::Config/File[/tmp/ntp.conf]/content: content changed '{md5}074d0e2ac727f6cb9afe3345d574b578' to '{md5}8f9039fe1989a278a0a8e1836acb8d23'
|
75
75
|
notice: /Stage[main]/Users::Common/Notify[Adding users::common]/message: defined 'message' as 'Adding users::common'
|
data/ext/debian/rules
CHANGED
@@ -66,14 +66,11 @@ install: build
|
|
66
66
|
$(INSTALL) -m0644 ext/emacs/puppet-mode.el \
|
67
67
|
$(CURDIR)/debian/puppet-el/usr/share/emacs/site-lisp/puppet-mode.el
|
68
68
|
|
69
|
-
# Install the rack README as README.rack
|
70
|
-
$(INSTALL) -m0644 ext/rack/README \
|
71
|
-
$(CURDIR)/debian/puppetmaster-passenger/usr/share/doc/puppetmaster-passenger/README.rack
|
72
69
|
# Install the config.ru
|
73
|
-
$(INSTALL) -m0644 ext/rack/
|
70
|
+
$(INSTALL) -m0644 ext/rack/config.ru \
|
74
71
|
$(CURDIR)/debian/puppetmaster-passenger/usr/share/puppet/rack/puppetmasterd
|
75
72
|
# Install apache2 site configuration template
|
76
|
-
$(INSTALL) -m0644 ext/rack/
|
73
|
+
$(INSTALL) -m0644 ext/rack/example-passenger-vhost.conf \
|
77
74
|
$(CURDIR)/debian/puppetmaster-passenger/usr/share/puppetmaster-passenger/apache2.site.conf.tmpl
|
78
75
|
|
79
76
|
# Add ext directory
|
data/ext/nagios/check_puppet.rb
CHANGED
@@ -99,16 +99,16 @@ class CheckPuppet
|
|
99
99
|
process = "process #{OPTIONS[:process]} is not running"
|
100
100
|
end
|
101
101
|
|
102
|
-
case
|
103
|
-
when
|
104
|
-
status = "OK"
|
105
|
-
exitcode = 0
|
106
|
-
when 2
|
102
|
+
case
|
103
|
+
when (@proc == 2 or @file == 2)
|
107
104
|
status = "CRITICAL"
|
108
105
|
exitcode = 2
|
109
|
-
when
|
106
|
+
when (@proc == 0 and @file == 0)
|
107
|
+
status = "OK"
|
108
|
+
exitcode = 0
|
109
|
+
else
|
110
110
|
status = "UNKNOWN"
|
111
|
-
|
111
|
+
exitcode = 3
|
112
112
|
end
|
113
113
|
|
114
114
|
puts "PUPPET #{status}: #{process}, #{state}"
|
data/ext/osx/file_mapping.yaml
CHANGED
data/ext/osx/preflight.erb
CHANGED
@@ -8,30 +8,45 @@
|
|
8
8
|
# ${3} is the destination volume so that this works correctly
|
9
9
|
# when being installed to volumes other than the current OS.
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<% require 'rake' %>
|
11
|
+
<%- ["@apple_libdir", "@apple_sbindir", "@apple_bindir", "@apple_docdir", "@package_name"].each do |i| -%>
|
12
|
+
<%- val = instance_variable_get(i) -%>
|
13
|
+
<%- raise "Critical variable #{i} is unset!" if val.nil? or val.empty? -%>
|
14
|
+
<%- end -%>
|
16
15
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
# remove ruby library files. Because hiera and puppet both place a "hiera"
|
17
|
+
# directory in the libdir, we have to be sure we only delete the files
|
18
|
+
# belonging to this project. In this case, we only delete files from within
|
19
|
+
# the 'hiera' directory, while deleting the entire puppet directory.
|
20
|
+
<%- Dir.chdir("lib") do -%>
|
21
|
+
<%- [@apple_old_libdir, @apple_libdir].compact.each do |libdir| -%>
|
22
|
+
<%- Dir["hiera/**/*"].select{ |i| File.file?(i) }.each do |file| -%>
|
23
|
+
/bin/rm -f "${3}<%= libdir %>/<%= file %>"
|
24
|
+
<%- end -%>
|
25
|
+
<%- Dir.glob("*").each do |file| -%>
|
26
|
+
<%- next if file == "hiera" -%>
|
27
|
+
<%- if File.directory?(file) -%>
|
28
|
+
/bin/rm -Rf "${3}<%= libdir %>/<%= file %>"
|
29
|
+
<%- else -%>
|
30
|
+
/bin/rm -f "${3}<%= libdir %>/<%= file %>"
|
31
|
+
<%- end -%>
|
32
|
+
<%- end -%>
|
33
|
+
<%- end -%>
|
34
|
+
<%- end -%>
|
21
35
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
36
|
+
# remove bin files
|
37
|
+
<%- Dir.chdir("bin") do -%>
|
38
|
+
<%- Dir.glob("*").each do |file| -%>
|
39
|
+
/bin/rm -f "${3}<%= @apple_bindir %>/<%= file %>"
|
40
|
+
<%- end -%>
|
41
|
+
<%- end -%>
|
27
42
|
|
28
43
|
# remove old doc files
|
29
44
|
/bin/rm -Rf "${3}<%= @apple_docdir %>/<%= @package_name %>"
|
30
45
|
|
31
46
|
# These files used to live in the sbindir but were
|
32
47
|
# removed in Pupppet >= 3.0. Remove them
|
33
|
-
/bin/rm -
|
34
|
-
/bin/rm -
|
35
|
-
/bin/rm -
|
36
|
-
/bin/rm -
|
37
|
-
/bin/rm -
|
48
|
+
/bin/rm -f "${3}<%= @apple_sbindir %>/puppetca"
|
49
|
+
/bin/rm -f "${3}<%= @apple_sbindir %>/puppetd"
|
50
|
+
/bin/rm -f "${3}<%= @apple_sbindir %>/puppetmasterd"
|
51
|
+
/bin/rm -f "${3}<%= @apple_sbindir %>/puppetqd"
|
52
|
+
/bin/rm -f "${3}<%= @apple_sbindir %>/puppetrun"
|
File without changes
|
@@ -1,3 +1,9 @@
|
|
1
|
+
# This Apache 2 virtual host config shows how to use Puppet as a Rack
|
2
|
+
# application via Passenger. See
|
3
|
+
# http://docs.puppetlabs.com/guides/passenger.html for more information.
|
4
|
+
|
5
|
+
# You can also use the included config.ru file to run Puppet with other Rack
|
6
|
+
# servers instead of Passenger.
|
1
7
|
|
2
8
|
# you probably want to tune these settings
|
3
9
|
PassengerHighPerformance on
|
data/ext/redhat/puppet.spec.erb
CHANGED
@@ -122,7 +122,8 @@ install -d -m0750 %{buildroot}%{_localstatedir}/log/puppet
|
|
122
122
|
%if 0%{?_with_systemd}
|
123
123
|
# Systemd for fedora >= 17
|
124
124
|
%{__install} -d -m0755 %{buildroot}%{_unitdir}
|
125
|
-
install -Dp -m0644 ext/systemd/
|
125
|
+
install -Dp -m0644 ext/systemd/puppet.service %{buildroot}%{_unitdir}/puppet.service
|
126
|
+
ln -s %{_unitdir}/puppet.service %{buildroot}%{_unitdir}/puppetagent.service
|
126
127
|
install -Dp -m0644 ext/systemd/puppetmaster.service %{buildroot}%{_unitdir}/puppetmaster.service
|
127
128
|
%else
|
128
129
|
# Otherwise init.d for fedora < 17 or el 5, 6
|
@@ -189,6 +190,7 @@ cp -pr ext/puppet-nm-dispatcher \
|
|
189
190
|
%dir %{_sysconfdir}/NetworkManager/dispatcher.d
|
190
191
|
%{_sysconfdir}/NetworkManager/dispatcher.d/98-puppet
|
191
192
|
%if 0%{?_with_systemd}
|
193
|
+
%{_unitdir}/puppet.service
|
192
194
|
%{_unitdir}/puppetagent.service
|
193
195
|
%else
|
194
196
|
%{_initrddir}/puppet
|
@@ -289,7 +291,7 @@ if [ "$1" -ge 1 ]; then
|
|
289
291
|
newpid="%{_localstatedir}/run/puppet/agent.pid"
|
290
292
|
if [ -s "$oldpid" -a ! -s "$newpid" ]; then
|
291
293
|
(kill $(< "$oldpid") && rm -f "$oldpid" && \
|
292
|
-
/bin/systemctl start
|
294
|
+
/bin/systemctl start puppet.service) >/dev/null 2>&1 || :
|
293
295
|
fi
|
294
296
|
fi
|
295
297
|
%else
|
@@ -303,6 +305,15 @@ if [ "$1" -ge 1 ]; then
|
|
303
305
|
(kill $(< "$oldpid") && rm -f "$oldpid" && \
|
304
306
|
/sbin/service puppet start) >/dev/null 2>&1 || :
|
305
307
|
fi
|
308
|
+
|
309
|
+
# If an old puppet process (one whose binary is located in /sbin) is running,
|
310
|
+
# kill it and then start up a fresh with the new binary.
|
311
|
+
if [ -e "$newpid" ]; then
|
312
|
+
if ps aux | grep `cat "$newpid"` | grep -v grep | awk '{ print $12 }' | grep -q sbin; then
|
313
|
+
(kill $(< "$newpid") && rm -f "$newpid" && \
|
314
|
+
/sbin/service puppet start) >/dev/null 2>&1 || :
|
315
|
+
fi
|
316
|
+
fi
|
306
317
|
fi
|
307
318
|
%endif
|
308
319
|
|
@@ -338,7 +349,9 @@ fi
|
|
338
349
|
if [ "$1" -eq 0 ] ; then
|
339
350
|
# Package removal, not upgrade
|
340
351
|
/bin/systemctl --no-reload disable puppetagent.service > /dev/null 2>&1 || :
|
352
|
+
/bin/systemctl --no-reload disable puppet.service > /dev/null 2>&1 || :
|
341
353
|
/bin/systemctl stop puppetagent.service > /dev/null 2>&1 || :
|
354
|
+
/bin/systemctl stop puppet.service > /dev/null 2>&1 || :
|
342
355
|
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
343
356
|
fi
|
344
357
|
%else
|
@@ -394,6 +407,11 @@ rm -rf %{buildroot}
|
|
394
407
|
* <%= Time.now.strftime("%a %b %d %Y") %> Puppet Labs Release <info@puppetlabs.com> - <%= @rpmversion %>-<%= @rpmrelease %>
|
395
408
|
- Build for <%= @version %>
|
396
409
|
|
410
|
+
* Wed Oct 2 2013 Jason Antman <jason@jasonantman.com>
|
411
|
+
- Move systemd service and unit file names back to "puppet" from erroneous "puppetagent"
|
412
|
+
- Add symlink to puppetagent unit file for compatibility with current bug
|
413
|
+
- Alter package removal actions to deactivate and stop both service names
|
414
|
+
|
397
415
|
* Thu Jun 27 2013 Matthaus Owens <matthaus@puppetlabs.com> - 3.2.3-0.1rc0
|
398
416
|
- Bump requires on ruby-rgen to 0.6.5
|
399
417
|
|
File without changes
|
data/lib/hiera_puppet.rb
CHANGED
@@ -71,12 +71,12 @@ module HieraPuppet
|
|
71
71
|
|
72
72
|
if Puppet.settings[:hiera_config].is_a?(String)
|
73
73
|
expanded_config_file = File.expand_path(Puppet.settings[:hiera_config])
|
74
|
-
if File.exist?(expanded_config_file)
|
74
|
+
if Puppet::FileSystem::File.exist?(expanded_config_file)
|
75
75
|
config_file = expanded_config_file
|
76
76
|
end
|
77
77
|
elsif Puppet.settings[:confdir].is_a?(String)
|
78
78
|
expanded_config_file = File.expand_path(File.join(Puppet.settings[:confdir], '/hiera.yaml'))
|
79
|
-
if File.exist?(expanded_config_file)
|
79
|
+
if Puppet::FileSystem::File.exist?(expanded_config_file)
|
80
80
|
config_file = expanded_config_file
|
81
81
|
end
|
82
82
|
end
|
data/lib/puppet/agent.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'sync'
|
2
1
|
require 'puppet/application'
|
3
2
|
|
4
3
|
# A general class for triggering a run of another
|
@@ -42,7 +41,7 @@ class Puppet::Agent
|
|
42
41
|
with_client do |client|
|
43
42
|
begin
|
44
43
|
client_args = client_options.merge(:pluginsync => Puppet[:pluginsync])
|
45
|
-
|
44
|
+
lock { client.run(client_args) }
|
46
45
|
rescue SystemExit,NoMemoryError
|
47
46
|
raise
|
48
47
|
rescue Exception => detail
|
@@ -76,10 +75,6 @@ class Puppet::Agent
|
|
76
75
|
@splayed = true
|
77
76
|
end
|
78
77
|
|
79
|
-
def sync
|
80
|
-
@sync ||= Sync.new
|
81
|
-
end
|
82
|
-
|
83
78
|
def run_in_fork(forking = true)
|
84
79
|
return yield unless forking or Puppet.features.windows?
|
85
80
|
|
data/lib/puppet/application.rb
CHANGED
@@ -381,18 +381,31 @@ class Application
|
|
381
381
|
Puppet::Util::Log.newdestination(:console)
|
382
382
|
end
|
383
383
|
|
384
|
+
set_log_level
|
385
|
+
|
386
|
+
Puppet::Util::Log.setup_default unless options[:setdest]
|
387
|
+
end
|
388
|
+
|
389
|
+
def set_log_level
|
384
390
|
if options[:debug]
|
385
391
|
Puppet::Util::Log.level = :debug
|
386
392
|
elsif options[:verbose]
|
387
393
|
Puppet::Util::Log.level = :info
|
388
394
|
end
|
395
|
+
end
|
389
396
|
|
390
|
-
|
397
|
+
def handle_logdest_arg(arg)
|
398
|
+
begin
|
399
|
+
Puppet::Util::Log.newdestination(arg)
|
400
|
+
options[:setdest] = true
|
401
|
+
rescue => detail
|
402
|
+
Puppet.log_exception(detail)
|
403
|
+
end
|
391
404
|
end
|
392
405
|
|
393
406
|
def configure_indirector_routes
|
394
407
|
route_file = Puppet[:route_file]
|
395
|
-
if ::File.
|
408
|
+
if Puppet::FileSystem::File.exist?(route_file)
|
396
409
|
routes = YAML.load_file(route_file)
|
397
410
|
application_routes = routes[name.to_s]
|
398
411
|
Puppet::Indirector.configure_routes(application_routes) if application_routes
|
@@ -67,12 +67,7 @@ class Puppet::Application::Agent < Puppet::Application
|
|
67
67
|
end
|
68
68
|
|
69
69
|
option("--logdest DEST", "-l DEST") do |arg|
|
70
|
-
|
71
|
-
Puppet::Util::Log.newdestination(arg)
|
72
|
-
options[:setdest] = true
|
73
|
-
rescue => detail
|
74
|
-
Puppet.log_exception(detail)
|
75
|
-
end
|
70
|
+
handle_logdest_arg(arg)
|
76
71
|
end
|
77
72
|
|
78
73
|
option("--waitforcert WAITFORCERT", "-w") do |arg|
|
@@ -442,7 +437,7 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
|
|
442
437
|
|
443
438
|
def setup_listen(daemon)
|
444
439
|
Puppet.warning "Puppet --listen / kick is deprecated. See http://links.puppetlabs.com/puppet-kick-deprecation"
|
445
|
-
unless
|
440
|
+
unless Puppet::FileSystem::File.exist?(Puppet[:rest_authconfig])
|
446
441
|
Puppet.err "Will not start without authorization file #{Puppet[:rest_authconfig]}"
|
447
442
|
exit(14)
|
448
443
|
end
|