puppet 3.0.0.rc5 → 3.0.0.rc7
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/LICENSE +1 -1
- data/README_DEVELOPER.md +209 -1
- data/README_HIERA.md +148 -0
- data/Rakefile +25 -27
- data/bin/extlookup2hiera +56 -0
- data/conf/auth.conf +34 -34
- data/examples/hiera/README.md +91 -0
- data/examples/hiera/etc/hiera.yaml +15 -0
- data/examples/hiera/etc/hieradb/common.yaml +3 -0
- data/examples/hiera/etc/hieradb/dc1.yaml +6 -0
- data/examples/hiera/etc/hieradb/development.yaml +2 -0
- data/examples/hiera/etc/puppet.conf +3 -0
- data/examples/hiera/modules/data/manifests/common.pp +3 -0
- data/examples/hiera/modules/ntp/manifests/config.pp +5 -0
- data/examples/hiera/modules/ntp/manifests/data.pp +3 -0
- data/examples/hiera/modules/ntp/templates/ntp.conf.erb +3 -0
- data/examples/hiera/modules/users/manifests/common.pp +3 -0
- data/examples/hiera/modules/users/manifests/dc1.pp +3 -0
- data/examples/hiera/modules/users/manifests/development.pp +3 -0
- data/examples/hiera/site.pp +3 -0
- data/ext/build_defaults.yaml +23 -0
- data/ext/debian/README.Debian +8 -0
- data/ext/debian/README.source +2 -0
- data/ext/debian/TODO.Debian +1 -0
- data/ext/debian/changelog.erb +1104 -0
- data/ext/debian/compat +1 -0
- data/ext/debian/control +143 -0
- data/ext/debian/copyright +361 -0
- data/ext/debian/docs +1 -0
- data/ext/debian/fileserver.conf +17 -0
- data/ext/debian/puppet-common.dirs +8 -0
- data/ext/debian/puppet-common.install +4 -0
- data/ext/debian/puppet-common.lintian-overrides +5 -0
- data/ext/debian/puppet-common.manpages +2 -0
- data/ext/debian/puppet-common.postinst +35 -0
- data/ext/debian/puppet-common.postrm +32 -0
- data/ext/debian/puppet-el.dirs +1 -0
- data/ext/debian/puppet-el.emacsen-install +25 -0
- data/ext/debian/puppet-el.emacsen-remove +11 -0
- data/ext/debian/puppet-el.emacsen-startup +9 -0
- data/ext/debian/puppet-el.install +1 -0
- data/ext/debian/puppet-testsuite.install +2 -0
- data/ext/debian/puppet-testsuite.lintian-overrides +4 -0
- data/ext/debian/puppet.conf +14 -0
- data/ext/debian/puppet.default +7 -0
- data/ext/debian/puppet.init +118 -0
- data/ext/debian/puppet.lintian-overrides +3 -0
- data/ext/debian/puppet.logrotate +11 -0
- data/ext/debian/puppet.manpages +32 -0
- data/ext/debian/puppet.postinst +20 -0
- data/ext/debian/puppet.postrm +20 -0
- data/ext/debian/puppet.preinst +20 -0
- data/ext/debian/puppetmaster-common.install +2 -0
- data/ext/debian/puppetmaster-common.manpages +2 -0
- data/ext/debian/puppetmaster-common.puppetqd.default +27 -0
- data/ext/debian/puppetmaster-common.puppetqd.init +84 -0
- data/ext/debian/puppetmaster-passenger.dirs +4 -0
- data/ext/debian/puppetmaster-passenger.postinst +66 -0
- data/ext/debian/puppetmaster-passenger.postrm +33 -0
- data/ext/debian/puppetmaster.README.debian +16 -0
- data/ext/debian/puppetmaster.default +38 -0
- data/ext/debian/puppetmaster.init +158 -0
- data/ext/debian/puppetmaster.lintian-overrides +3 -0
- data/ext/debian/puppetmaster.postinst +20 -0
- data/ext/debian/puppetmaster.postrm +5 -0
- data/ext/debian/puppetmaster.preinst +22 -0
- data/ext/debian/rules +128 -0
- data/ext/debian/source/format +1 -0
- data/ext/debian/source/options +1 -0
- data/ext/debian/vim-puppet.README.Debian +13 -0
- data/ext/debian/vim-puppet.dirs +3 -0
- data/ext/debian/vim-puppet.yaml +5 -0
- data/ext/debian/watch +2 -0
- data/ext/emacs/puppet-mode.el +1 -0
- data/ext/envpuppet +4 -0
- data/ext/envpuppet.bat +3 -2
- data/{conf → ext}/freebsd/puppetd +0 -0
- data/{conf → ext}/freebsd/puppetmasterd +0 -0
- data/{conf → ext}/gentoo/conf.d/puppet +0 -0
- data/{conf → ext}/gentoo/conf.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/init.d/puppet +0 -0
- data/{conf → ext}/gentoo/init.d/puppetmaster +0 -0
- data/{conf → ext}/gentoo/puppet/fileserver.conf +0 -0
- data/{conf → ext}/gentoo/puppet/puppet.conf +0 -0
- data/ext/ips/puppet-agent +49 -0
- data/ext/ips/puppet-master +44 -0
- data/ext/ips/puppet.conf +29 -0
- data/ext/ips/puppet.p5m.erb +12 -0
- data/ext/ips/puppetagent.xml +46 -0
- data/ext/ips/puppetmaster.xml +42 -0
- data/ext/ips/rules +19 -0
- data/ext/ips/transforms +34 -0
- data/{conf → ext}/osx/PackageInfo.plist +0 -0
- data/{conf → ext}/osx/createpackage.sh +1 -1
- data/ext/osx/file_mapping.yaml +33 -0
- data/ext/osx/preflight.erb +37 -0
- data/{tasks/rake/templates → ext/osx}/prototype.plist.erb +0 -0
- data/ext/packaging/README-Solaris.md +117 -0
- data/ext/packaging/README.md +89 -0
- data/ext/packaging/tasks/00_utils.rb +236 -0
- data/ext/packaging/tasks/10_setupvars.rake +62 -0
- data/ext/packaging/tasks/apple.rake +201 -0
- data/ext/packaging/tasks/clean.rake +5 -0
- data/ext/packaging/tasks/deb.rake +105 -0
- data/ext/packaging/tasks/gem.rake +52 -0
- data/ext/packaging/tasks/ips.rake +78 -0
- data/ext/packaging/tasks/mock.rake +88 -0
- data/ext/packaging/tasks/release.rake +20 -0
- data/ext/packaging/tasks/rpm.rake +39 -0
- data/ext/packaging/tasks/ship.rake +34 -0
- data/ext/packaging/tasks/sign.rake +76 -0
- data/ext/packaging/tasks/tar.rake +20 -0
- data/ext/project_data.yaml +25 -0
- data/ext/rack/files/apache2.conf +2 -1
- data/{conf → ext}/redhat/client.init +0 -0
- data/{conf → ext}/redhat/client.sysconfig +0 -0
- data/{conf → ext}/redhat/fileserver.conf +0 -0
- data/{conf → ext}/redhat/logrotate +0 -0
- data/{conf → ext}/redhat/puppet.conf +0 -0
- data/{conf/redhat/puppet.spec → ext/redhat/puppet.spec.erb} +140 -33
- data/{conf → ext}/redhat/queue.init +0 -0
- data/{conf → ext}/redhat/rundir-perms.patch +0 -0
- data/{conf → ext}/redhat/server.init +0 -0
- data/{conf → ext}/redhat/server.sysconfig +0 -0
- data/{conf → ext}/solaris/pkginfo +0 -0
- data/{conf → ext}/solaris/smf/puppetd.xml +0 -0
- data/{conf → ext}/solaris/smf/puppetmasterd.xml +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetd +0 -0
- data/{conf → ext}/solaris/smf/svc-puppetmasterd +0 -0
- data/{conf → ext}/suse/client.init +0 -0
- data/{conf → ext}/suse/fileserver.conf +0 -0
- data/{conf → ext}/suse/logrotate +0 -0
- data/{conf → ext}/suse/puppet.conf +0 -0
- data/{conf → ext}/suse/puppet.spec +1 -1
- data/{conf → ext}/suse/server.init +0 -0
- data/ext/systemd/puppetagent.service +13 -0
- data/ext/systemd/puppetmaster.service +13 -0
- data/{conf → ext}/windows/eventlog/Rakefile +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.dll +0 -0
- data/{conf → ext}/windows/eventlog/puppetres.mc +0 -0
- data/ext/windows/service/daemon.bat +6 -0
- data/ext/windows/service/daemon.rb +90 -0
- data/install.rb +22 -32
- data/lib/hiera/backend/puppet_backend.rb +102 -0
- data/lib/hiera/scope.rb +42 -0
- data/lib/hiera_puppet.rb +89 -0
- data/lib/puppet.rb +1 -1
- data/lib/puppet/agent.rb +2 -2
- data/lib/puppet/agent/locker.rb +12 -9
- data/lib/puppet/application.rb +10 -8
- data/lib/puppet/application/agent.rb +12 -8
- data/lib/puppet/application/apply.rb +2 -2
- data/lib/puppet/application/cert.rb +6 -6
- data/lib/puppet/application/certificate.rb +1 -4
- data/lib/puppet/application/describe.rb +1 -1
- data/lib/puppet/application/device.rb +5 -2
- data/lib/puppet/application/doc.rb +1 -1
- data/lib/puppet/application/face_base.rb +3 -13
- data/lib/puppet/application/filebucket.rb +1 -1
- data/lib/puppet/application/inspect.rb +1 -1
- data/lib/puppet/application/kick.rb +4 -2
- data/lib/puppet/application/master.rb +2 -2
- data/lib/puppet/application/queue.rb +3 -1
- data/lib/puppet/application/resource.rb +1 -1
- data/lib/puppet/configurer.rb +11 -7
- data/lib/puppet/configurer/downloader.rb +1 -4
- data/lib/puppet/daemon.rb +4 -4
- data/lib/puppet/defaults.rb +64 -60
- data/lib/puppet/external/dot.rb +1 -1
- data/lib/puppet/external/pson/common.rb +15 -0
- data/lib/puppet/external/pson/pure.rb +0 -62
- data/lib/puppet/external/pson/pure/generator.rb +1 -1
- data/lib/puppet/external/pson/pure/parser.rb +2 -2
- data/lib/puppet/face/ca.rb +19 -14
- data/lib/puppet/face/config.rb +2 -2
- data/lib/puppet/face/facts.rb +1 -1
- data/lib/puppet/face/help/action.erb +0 -1
- data/lib/puppet/face/help/face.erb +0 -1
- data/lib/puppet/face/help/man.erb +3 -6
- data/lib/puppet/face/module/install.rb +1 -1
- data/lib/puppet/face/module/list.rb +1 -1
- data/lib/puppet/face/module/uninstall.rb +1 -1
- data/lib/puppet/face/node.rb +1 -1
- data/lib/puppet/face/node/clean.rb +30 -25
- data/lib/puppet/feature/base.rb +0 -3
- data/lib/puppet/feature/rails.rb +2 -1
- data/lib/puppet/file_serving/terminus_selector.rb +1 -1
- data/lib/puppet/indirector/catalog/active_record.rb +5 -0
- data/lib/puppet/indirector/catalog/static_compiler.rb +2 -3
- data/lib/puppet/indirector/certificate/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_request/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/certificate_revocation_list/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/face.rb +3 -3
- data/lib/puppet/indirector/facts/active_record.rb +5 -0
- data/lib/puppet/indirector/facts/facter.rb +1 -4
- data/lib/puppet/indirector/facts/inventory_active_record.rb +6 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +2 -1
- data/lib/puppet/indirector/indirection.rb +2 -2
- data/lib/puppet/indirector/key/disabled_ca.rb +22 -0
- data/lib/puppet/indirector/node/active_record.rb +5 -0
- data/lib/puppet/indirector/request.rb +4 -0
- data/lib/puppet/indirector/resource/active_record.rb +5 -0
- data/lib/puppet/network/authentication.rb +30 -0
- data/lib/puppet/network/http.rb +0 -13
- data/lib/puppet/network/http/connection.rb +10 -2
- data/lib/puppet/network/http/handler.rb +8 -0
- data/lib/puppet/network/http/mongrel/rest.rb +5 -0
- data/lib/puppet/network/http/rack/rest.rb +7 -0
- data/lib/puppet/network/http/webrick.rb +3 -6
- data/lib/puppet/network/http/webrick/rest.rb +4 -0
- data/lib/puppet/network/server.rb +9 -33
- data/lib/puppet/node.rb +1 -1
- data/lib/puppet/node/facts.rb +0 -1
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/functions.rb +12 -1
- data/lib/puppet/parser/functions/hiera.rb +8 -0
- data/lib/puppet/parser/functions/hiera_array.rb +8 -0
- data/lib/puppet/parser/functions/hiera_hash.rb +8 -0
- data/lib/puppet/parser/functions/hiera_include.rb +11 -0
- data/lib/puppet/parser/functions/shellquote.rb +21 -29
- data/lib/puppet/parser/lexer.rb +2 -1
- data/lib/puppet/parser/scope.rb +8 -0
- data/lib/puppet/provider/exec/windows.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +2 -3
- data/lib/puppet/provider/package/pkg.rb +37 -10
- data/lib/puppet/provider/service/daemontools.rb +1 -1
- data/lib/puppet/provider/service/launchd.rb +1 -1
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/runit.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +8 -3
- data/lib/puppet/provider/user/windows_adsi.rb +11 -0
- data/lib/puppet/provider/zfs/zfs.rb +29 -2
- data/lib/puppet/provider/zone/solaris.rb +144 -39
- data/lib/puppet/provider/zpool/zpool.rb +7 -10
- data/lib/puppet/settings.rb +50 -86
- data/lib/puppet/settings/duration_setting.rb +34 -0
- data/lib/puppet/settings/terminus_setting.rb +16 -0
- data/lib/puppet/ssl/base.rb +49 -9
- data/lib/puppet/ssl/certificate.rb +13 -9
- data/lib/puppet/ssl/certificate_authority.rb +4 -0
- data/lib/puppet/ssl/certificate_authority/interface.rb +10 -17
- data/lib/puppet/ssl/certificate_factory.rb +4 -21
- data/lib/puppet/ssl/certificate_request.rb +1 -10
- data/lib/puppet/ssl/certificate_revocation_list.rb +1 -3
- data/lib/puppet/ssl/digest.rb +20 -0
- data/lib/puppet/ssl/host.rb +31 -6
- data/lib/puppet/test/test_helper.rb +1 -1
- data/lib/puppet/transaction/report.rb +2 -1
- data/lib/puppet/type.rb +1 -1
- data/lib/puppet/type/augeas.rb +1 -1
- data/lib/puppet/type/cron.rb +1 -1
- data/lib/puppet/type/exec.rb +7 -8
- data/lib/puppet/type/file.rb +1 -1
- data/lib/puppet/type/file/content.rb +2 -2
- data/lib/puppet/type/file/ensure.rb +1 -1
- data/lib/puppet/type/file/mode.rb +1 -1
- data/lib/puppet/type/file/selcontext.rb +6 -2
- data/lib/puppet/type/file/source.rb +1 -1
- data/lib/puppet/type/schedule.rb +1 -1
- data/lib/puppet/type/scheduled_task.rb +1 -1
- data/lib/puppet/type/tidy.rb +1 -1
- data/lib/puppet/type/zone.rb +126 -253
- data/lib/puppet/util.rb +10 -23
- data/lib/puppet/util/adsi.rb +22 -14
- data/lib/puppet/util/log/destinations.rb +7 -0
- data/lib/puppet/util/log/rate_limited_logger.rb +40 -0
- data/lib/puppet/util/metric.rb +2 -2
- data/lib/puppet/util/monkey_patches.rb +8 -0
- data/lib/puppet/util/platform.rb +7 -0
- data/lib/puppet/util/selinux.rb +31 -36
- data/lib/puppet/util/windows/error.rb +1 -1
- data/lib/puppet/util/windows/process.rb +3 -3
- data/lib/puppet/util/windows/security.rb +7 -7
- data/lib/puppet/util/windows/user.rb +65 -2
- data/lib/puppet/util/zaml.rb +90 -46
- data/lib/puppet/version.rb +1 -1
- data/spec/fixtures/hiera.yaml +9 -0
- data/spec/fixtures/manifests/site.pp +0 -0
- data/spec/integration/defaults_spec.rb +25 -11
- data/spec/integration/faces/ca_spec.rb +11 -16
- data/spec/integration/network/server/webrick_spec.rb +14 -27
- data/spec/integration/node_spec.rb +4 -1
- data/spec/integration/parser/functions/require_spec.rb +3 -3
- data/spec/integration/parser/undef_param_spec.rb +88 -0
- data/spec/integration/provider/mount_spec.rb +4 -1
- data/spec/integration/ssl/certificate_authority_spec.rb +18 -0
- data/spec/lib/puppet_spec/files.rb +3 -3
- data/spec/lib/puppet_spec/settings.rb +0 -1
- data/spec/shared_contexts/platform.rb +8 -0
- data/spec/spec_helper.rb +6 -0
- data/spec/unit/agent/locker_spec.rb +8 -2
- data/spec/unit/application/agent_spec.rb +29 -7
- data/spec/unit/application/apply_spec.rb +1 -1
- data/spec/unit/application/device_spec.rb +18 -1
- data/spec/unit/application/face_base_spec.rb +16 -2
- data/spec/unit/application/kick_spec.rb +8 -0
- data/spec/unit/application/queue_spec.rb +5 -0
- data/spec/unit/application_spec.rb +13 -23
- data/spec/unit/configurer/downloader_spec.rb +2 -11
- data/spec/unit/configurer_spec.rb +6 -0
- data/spec/unit/face/node_spec.rb +1 -1
- data/spec/unit/hiera/backend/puppet_backend_spec.rb +140 -0
- data/spec/unit/hiera/scope_spec.rb +62 -0
- data/spec/unit/hiera_puppet_spec.rb +111 -0
- data/spec/unit/indirector/catalog/active_record_spec.rb +4 -0
- data/spec/unit/indirector/catalog/static_compiler_spec.rb +194 -0
- data/spec/unit/indirector/certificate/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_request/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/certificate_revocation_list/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/facts/active_record_spec.rb +37 -26
- data/spec/unit/indirector/facts/inventory_active_record_spec.rb +5 -0
- data/spec/unit/indirector/hiera_spec.rb +2 -1
- data/spec/unit/indirector/key/disabled_ca_spec.rb +33 -0
- data/spec/unit/indirector/node/active_record_spec.rb +7 -0
- data/spec/unit/indirector/request_spec.rb +22 -0
- data/spec/unit/indirector/resource/active_record_spec.rb +5 -0
- data/spec/unit/module_tool/application_spec.rb +1 -1
- data/spec/unit/network/authentication_spec.rb +86 -0
- data/spec/unit/network/http/connection_spec.rb +21 -0
- data/spec/unit/network/http/handler_spec.rb +12 -0
- data/spec/unit/network/http/rack/rest_spec.rb +7 -0
- data/spec/unit/network/http/webrick_spec.rb +11 -26
- data/spec/unit/network/server_spec.rb +79 -192
- data/spec/unit/node/facts_spec.rb +2 -2
- data/spec/unit/parser/ast/vardef_spec.rb +4 -4
- data/spec/unit/parser/files_spec.rb +3 -0
- data/spec/unit/parser/functions/defined_spec.rb +5 -5
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +1 -1
- data/spec/unit/parser/functions/hiera_array_spec.rb +23 -0
- data/spec/unit/parser/functions/hiera_hash_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_include_spec.rb +19 -0
- data/spec/unit/parser/functions/hiera_spec.rb +21 -0
- data/spec/unit/parser/functions/include_spec.rb +3 -3
- data/spec/unit/parser/functions/realize_spec.rb +3 -3
- data/spec/unit/parser/functions/require_spec.rb +5 -5
- data/spec/unit/parser/functions/shellquote_spec.rb +0 -4
- data/spec/unit/parser/functions_spec.rb +6 -10
- data/spec/unit/parser/lexer_spec.rb +13 -0
- data/spec/unit/parser/scope_spec.rb +16 -1
- data/spec/unit/provider/exec/posix_spec.rb +7 -6
- data/spec/unit/provider/group/groupadd_spec.rb +36 -30
- data/spec/unit/provider/package/pkg_spec.rb +16 -2
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/sshkey/parsed_spec.rb +4 -0
- data/spec/unit/provider/user/user_role_add_spec.rb +125 -126
- data/spec/unit/provider/user/useradd_spec.rb +147 -118
- data/spec/unit/provider/user/windows_adsi_spec.rb +22 -0
- data/spec/unit/provider/zone/solaris_spec.rb +126 -7
- data/spec/unit/provider/zpool/zpool_spec.rb +4 -3
- data/spec/unit/puppet_spec.rb +7 -0
- data/spec/unit/settings/duration_setting_spec.rb +45 -0
- data/spec/unit/settings/terminus_setting_spec.rb +28 -0
- data/spec/unit/settings_spec.rb +21 -23
- data/spec/unit/ssl/base_spec.rb +68 -19
- data/spec/unit/ssl/certificate_authority/interface_spec.rb +19 -30
- data/spec/unit/ssl/certificate_authority_spec.rb +3 -2
- data/spec/unit/ssl/certificate_factory_spec.rb +15 -6
- data/spec/unit/ssl/certificate_request_spec.rb +80 -113
- data/spec/unit/ssl/certificate_revocation_list_spec.rb +1 -1
- data/spec/unit/ssl/certificate_spec.rb +26 -2
- data/spec/unit/ssl/digest_spec.rb +35 -0
- data/spec/unit/ssl/host_spec.rb +73 -27
- data/spec/unit/ssl/key_spec.rb +0 -4
- data/spec/unit/type/exec_spec.rb +1 -1
- data/spec/unit/type/file_spec.rb +2 -1
- data/spec/unit/type/scheduled_task_spec.rb +2 -2
- data/spec/unit/type/zone_spec.rb +52 -10
- data/spec/unit/util/adsi_spec.rb +19 -0
- data/spec/unit/util/checksums_spec.rb +2 -3
- data/spec/unit/util/execution_spec.rb +1 -1
- data/spec/unit/util/log/destinations_spec.rb +1 -0
- data/spec/unit/util/log/rate_limited_logger_spec.rb +51 -0
- data/spec/unit/util/logging_spec.rb +6 -6
- data/spec/unit/util/selinux_spec.rb +24 -32
- data/spec/unit/util/zaml_spec.rb +94 -6
- data/spec/unit/util_spec.rb +17 -0
- data/spec/watchr.rb +2 -6
- data/tasks/{rake/manpages.rake → manpages.rake} +0 -0
- data/tasks/{rake/parser.rake → parser.rake} +0 -0
- metadata +1003 -119
- data/CHANGELOG +0 -9233
- data/conf/osx/preflight +0 -24
- data/lib/puppet/network/http/mongrel.rb +0 -35
- data/lib/puppet/util/config_timeout.rb +0 -24
- data/spec/unit/network/http/mongrel/rest_spec.rb +0 -257
- data/spec/unit/network/http/mongrel_spec.rb +0 -91
- data/spec/unit/network/http_spec.rb +0 -31
- data/spec/unit/util/config_timeout_spec.rb +0 -57
- data/tasks/rake/apple.rake +0 -176
- data/tasks/rake/changelog.rake +0 -15
- data/tasks/rake/ci.rake +0 -22
- data/tasks/rake/dailybuild.rake +0 -9
- data/tasks/rake/gem.rake +0 -63
- data/tasks/rake/git_workflow.rake +0 -134
- data/tasks/rake/metrics.rake +0 -14
- data/tasks/rake/sign.rake +0 -14
- data/tasks/rake/testbranch.rake +0 -16
- data/tasks/rake/yard.rake +0 -11
@@ -29,7 +29,7 @@ class Puppet::Application::Master < Puppet::Application
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def help
|
32
|
-
<<-HELP
|
32
|
+
<<-'HELP'
|
33
33
|
|
34
34
|
puppet-master(8) -- The puppet master daemon
|
35
35
|
========
|
@@ -186,7 +186,7 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
|
|
186
186
|
|
187
187
|
unless options[:rack]
|
188
188
|
require 'puppet/network/server'
|
189
|
-
@daemon.server = Puppet::Network::Server.new()
|
189
|
+
@daemon.server = Puppet::Network::Server.new(Puppet[:bindaddress], Puppet[:masterport])
|
190
190
|
@daemon.daemonize if Puppet[:daemonize]
|
191
191
|
else
|
192
192
|
require 'puppet/network/http/rack'
|
@@ -4,7 +4,7 @@ require 'puppet/util'
|
|
4
4
|
class Puppet::Application::Queue < Puppet::Application
|
5
5
|
|
6
6
|
attr_accessor :daemon
|
7
|
-
|
7
|
+
|
8
8
|
def app_defaults()
|
9
9
|
super.merge( :pidfile => "$rundir/queue.pid" )
|
10
10
|
end
|
@@ -140,6 +140,8 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License
|
|
140
140
|
end
|
141
141
|
|
142
142
|
def setup
|
143
|
+
Puppet.warning "Puppet queue is deprecated. See http://links.puppetlabs.com/puppet-queue-deprecation"
|
144
|
+
|
143
145
|
unless Puppet.features.stomp?
|
144
146
|
raise ArgumentError, "Could not load the 'stomp' library, which must be present for queueing to work. You must install the required library."
|
145
147
|
end
|
data/lib/puppet/configurer.rb
CHANGED
@@ -3,13 +3,11 @@ require 'sync'
|
|
3
3
|
require 'timeout'
|
4
4
|
require 'puppet/network/http_pool'
|
5
5
|
require 'puppet/util'
|
6
|
-
require 'puppet/util/config_timeout'
|
7
6
|
|
8
7
|
class Puppet::Configurer
|
9
8
|
require 'puppet/configurer/fact_handler'
|
10
9
|
require 'puppet/configurer/plugin_handler'
|
11
10
|
|
12
|
-
extend Puppet::Util::ConfigTimeout
|
13
11
|
include Puppet::Configurer::FactHandler
|
14
12
|
include Puppet::Configurer::PluginHandler
|
15
13
|
|
@@ -142,12 +140,18 @@ class Puppet::Configurer
|
|
142
140
|
fact_options = get_facts(options)
|
143
141
|
end
|
144
142
|
|
145
|
-
|
146
|
-
if node.
|
147
|
-
|
148
|
-
|
149
|
-
|
143
|
+
begin
|
144
|
+
if node = Puppet::Node.indirection.find(Puppet[:node_name_value],
|
145
|
+
:environment => @environment, :ignore_cache => true)
|
146
|
+
if node.environment.to_s != @environment
|
147
|
+
Puppet.warning "Local environment: \"#{@environment}\" doesn't match server specified node environment \"#{node.environment}\", switching agent to \"#{node.environment}\"."
|
148
|
+
@environment = node.environment.to_s
|
149
|
+
fact_options = nil
|
150
|
+
end
|
150
151
|
end
|
152
|
+
rescue Puppet::Error, Net::HTTPError => detail
|
153
|
+
Puppet.warning("Unable to fetch my node definition, but the agent run will continue:")
|
154
|
+
Puppet.warning(detail)
|
151
155
|
end
|
152
156
|
|
153
157
|
fact_options = get_facts(options) unless fact_options
|
@@ -1,10 +1,7 @@
|
|
1
1
|
require 'puppet/configurer'
|
2
2
|
require 'puppet/resource/catalog'
|
3
|
-
require 'puppet/util/config_timeout'
|
4
3
|
|
5
4
|
class Puppet::Configurer::Downloader
|
6
|
-
extend Puppet::Util::ConfigTimeout
|
7
|
-
|
8
5
|
attr_reader :name, :path, :source, :ignore
|
9
6
|
|
10
7
|
# Evaluate our download, returning the list of changed values.
|
@@ -13,7 +10,7 @@ class Puppet::Configurer::Downloader
|
|
13
10
|
|
14
11
|
files = []
|
15
12
|
begin
|
16
|
-
::Timeout.timeout(
|
13
|
+
::Timeout.timeout(Puppet[:configtimeout]) do
|
17
14
|
catalog.apply do |trans|
|
18
15
|
trans.changed?.find_all do |resource|
|
19
16
|
yield resource if block_given?
|
data/lib/puppet/daemon.rb
CHANGED
@@ -158,11 +158,11 @@ class Puppet::Daemon
|
|
158
158
|
# input is strange or badly formed by returning 0. Integer will raise,
|
159
159
|
# which we don't want, and we want to protect against -1 or below.
|
160
160
|
next_agent_run = 0
|
161
|
-
agent_run_interval = [Puppet[:runinterval]
|
161
|
+
agent_run_interval = [Puppet[:runinterval], 0].max
|
162
162
|
|
163
163
|
# We may not want to reparse; that can be disable. Fun times.
|
164
164
|
next_reparse = 0
|
165
|
-
reparse_interval = Puppet[:filetimeout]
|
165
|
+
reparse_interval = Puppet[:filetimeout]
|
166
166
|
|
167
167
|
loop do
|
168
168
|
now = Time.now.to_i
|
@@ -182,7 +182,7 @@ class Puppet::Daemon
|
|
182
182
|
|
183
183
|
# The time to the next reparse might have changed, so recalculate
|
184
184
|
# now. That way we react dynamically to reconfiguration.
|
185
|
-
reparse_interval = Puppet[:filetimeout]
|
185
|
+
reparse_interval = Puppet[:filetimeout]
|
186
186
|
|
187
187
|
# Set up the next reparse check based on the new reparse_interval.
|
188
188
|
if reparse_interval > 0
|
@@ -193,7 +193,7 @@ class Puppet::Daemon
|
|
193
193
|
# We should also recalculate the agent run interval, and adjust the
|
194
194
|
# next time it is scheduled to run, just in case. In the event that
|
195
195
|
# we made no change the result will be a zero second adjustment.
|
196
|
-
new_run_interval = [Puppet[:runinterval]
|
196
|
+
new_run_interval = [Puppet[:runinterval], 0].max
|
197
197
|
next_agent_run += agent_run_interval - new_run_interval
|
198
198
|
agent_run_interval = new_run_interval
|
199
199
|
end
|
data/lib/puppet/defaults.rb
CHANGED
@@ -27,20 +27,6 @@ module Puppet
|
|
27
27
|
:default => nil,
|
28
28
|
:desc => "The name of the application, if we are running as one. The\n" +
|
29
29
|
"default is essentially $0 without the path or `.rb`.",
|
30
|
-
},
|
31
|
-
|
32
|
-
## This setting needs to go away. As a first step, we could just make it a first-class property of the Settings
|
33
|
-
## class, instead of treating it as a normal setting. There are places where the Settings class tries to use
|
34
|
-
## the value of run_mode to help in resolving other values, and that is no good for nobody. It would cause
|
35
|
-
## infinite recursion and stack overflows without some chicanery... so, it needs to be cleaned up.
|
36
|
-
##
|
37
|
-
## As a longer term goal I think we should be looking into getting rid of run_mode altogether, but that is going
|
38
|
-
## to be a larger undertaking, as it is being branched on in a lot of places in the current code.
|
39
|
-
##
|
40
|
-
## --cprice 2012-03-16
|
41
|
-
:run_mode => {
|
42
|
-
:default => nil,
|
43
|
-
:desc => "The effective 'run mode' of the application: master, agent, or user.",
|
44
30
|
}
|
45
31
|
)
|
46
32
|
|
@@ -141,7 +127,7 @@ module Puppet
|
|
141
127
|
ENV["PATH"] = "" if ENV["PATH"].nil?
|
142
128
|
ENV["PATH"] = value unless value == "none"
|
143
129
|
paths = ENV["PATH"].split(File::PATH_SEPARATOR)
|
144
|
-
|
130
|
+
Puppet::Util::Platform.default_paths.each do |path|
|
145
131
|
ENV["PATH"] += File::PATH_SEPARATOR + path unless paths.include?(path)
|
146
132
|
end
|
147
133
|
value
|
@@ -225,10 +211,12 @@ module Puppet
|
|
225
211
|
:desc => "The YAML file containing indirector route configuration.",
|
226
212
|
},
|
227
213
|
:node_terminus => {
|
214
|
+
:type => :terminus,
|
228
215
|
:default => "plain",
|
229
216
|
:desc => "Where to find information about nodes.",
|
230
217
|
},
|
231
218
|
:data_binding_terminus => {
|
219
|
+
:type => :terminus,
|
232
220
|
:default => "hiera",
|
233
221
|
:desc => "Where to retrive information about data.",
|
234
222
|
},
|
@@ -238,26 +226,36 @@ module Puppet
|
|
238
226
|
:type => :file,
|
239
227
|
},
|
240
228
|
:catalog_terminus => {
|
229
|
+
:type => :terminus,
|
241
230
|
:default => "compiler",
|
242
231
|
:desc => "Where to get node catalogs. This is useful to change if, for instance,
|
243
232
|
you'd like to pre-compile catalogs and store them in memcached or some other easily-accessed store.",
|
244
233
|
},
|
234
|
+
:catalog_cache_terminus => {
|
235
|
+
:type => :terminus,
|
236
|
+
:default => nil,
|
237
|
+
:desc => "How to store cached catalogs. Valid values are 'json' and 'yaml'. The agent application defaults to 'json'."
|
238
|
+
},
|
245
239
|
:facts_terminus => {
|
246
240
|
:default => 'facter',
|
247
241
|
:desc => "The node facts terminus.",
|
242
|
+
:call_hook => :on_initialize_and_write,
|
248
243
|
:hook => proc do |value|
|
249
244
|
require 'puppet/node/facts'
|
250
245
|
# Cache to YAML if we're uploading facts away
|
251
246
|
if %w[rest inventory_service].include? value.to_s
|
247
|
+
Puppet.info "configuring the YAML fact cache because a remote terminus is active"
|
252
248
|
Puppet::Node::Facts.indirection.cache_class = :yaml
|
253
249
|
end
|
254
250
|
end
|
255
251
|
},
|
256
252
|
:inventory_terminus => {
|
253
|
+
:type => :terminus,
|
257
254
|
:default => "$facts_terminus",
|
258
255
|
:desc => "Should usually be the same as the facts terminus",
|
259
256
|
},
|
260
257
|
:default_file_terminus => {
|
258
|
+
:type => :terminus,
|
261
259
|
:default => "rest",
|
262
260
|
:desc => "The default source for files if no server is given in a
|
263
261
|
uri, e.g. puppet:///file. The default of `rest` causes the file to be
|
@@ -281,10 +279,11 @@ module Puppet
|
|
281
279
|
:desc => "The HTTP proxy port to use for outgoing connections",
|
282
280
|
},
|
283
281
|
:filetimeout => {
|
284
|
-
:default =>
|
285
|
-
:
|
282
|
+
:default => "15s",
|
283
|
+
:type => :duration,
|
284
|
+
:desc => "The minimum time to wait between checking for updates in
|
286
285
|
configuration files. This timeout determines how quickly Puppet checks whether
|
287
|
-
a file (such as manifests or templates) has changed on disk.",
|
286
|
+
a file (such as manifests or templates) has changed on disk. Can be specified as a duration.",
|
288
287
|
},
|
289
288
|
:queue_type => {
|
290
289
|
:default => "stomp",
|
@@ -303,7 +302,7 @@ module Puppet
|
|
303
302
|
:default => false,
|
304
303
|
:type => :boolean,
|
305
304
|
:desc => "Whether to use a queueing system to provide asynchronous database integration.
|
306
|
-
Requires that `puppet queue` be running
|
305
|
+
Requires that `puppet queue` be running.",
|
307
306
|
:hook => proc do |value|
|
308
307
|
if value
|
309
308
|
# This reconfigures the terminii for Node, Facts, and Catalog
|
@@ -311,6 +310,7 @@ module Puppet
|
|
311
310
|
|
312
311
|
# But then we modify the configuration
|
313
312
|
Puppet::Resource::Catalog.indirection.cache_class = :queue
|
313
|
+
Puppet.settings[:catalog_cache_terminus] = :queue
|
314
314
|
else
|
315
315
|
raise "Cannot disable asynchronous storeconfigs in a running process"
|
316
316
|
end
|
@@ -565,6 +565,12 @@ EOT
|
|
565
565
|
:type => :boolean,
|
566
566
|
:desc => "Whether certificate revocation should be supported by downloading a Certificate Revocation List (CRL)
|
567
567
|
to all clients. If enabled, CA chaining will almost definitely not work.",
|
568
|
+
},
|
569
|
+
:certificate_expire_warning => {
|
570
|
+
:default => "60d",
|
571
|
+
:type => :duration,
|
572
|
+
:desc => "The window of time leading up to a certificate's expiration that a notification
|
573
|
+
will be logged. This applies to CA, master, and agent certificates. Can be specified as a duration."
|
568
574
|
}
|
569
575
|
)
|
570
576
|
|
@@ -669,11 +675,8 @@ EOT
|
|
669
675
|
},
|
670
676
|
:ca_ttl => {
|
671
677
|
:default => "5y",
|
672
|
-
:
|
673
|
-
|
674
|
-
'y' (years of 365 days), 'd' (days), 'h' (hours), or
|
675
|
-
's' (seconds). The unit defaults to seconds. Examples are '3600'
|
676
|
-
(one hour) and '1825d', which is the same as '5y' (5 years) ",
|
678
|
+
:type => :duration,
|
679
|
+
:desc => "The default TTL for new certificates. Can be specified as a duration."
|
677
680
|
},
|
678
681
|
:ca_md => {
|
679
682
|
:default => "md5",
|
@@ -713,21 +716,14 @@ EOT
|
|
713
716
|
:pidfile => {
|
714
717
|
:type => :file,
|
715
718
|
:default => "$rundir/${run_mode}.pid",
|
716
|
-
:desc => "The
|
719
|
+
:desc => "The file containing the PID of a running process. " <<
|
720
|
+
"This file is intended to be used by service management " <<
|
721
|
+
"frameworks and monitoring systems to determine if a " <<
|
722
|
+
"puppet process is still in the process table.",
|
717
723
|
},
|
718
724
|
:bindaddress => {
|
719
|
-
:default => "",
|
720
|
-
:desc => "The address a listening server should bind to.
|
721
|
-
default to 127.0.0.1 and WEBrick defaults to 0.0.0.0.",
|
722
|
-
},
|
723
|
-
:servertype => {
|
724
|
-
:default => "webrick", :desc => "The type of server to use. Currently supported
|
725
|
-
options are webrick and mongrel. If you use mongrel, you will need
|
726
|
-
a proxy in front of the process or processes, since Mongrel cannot
|
727
|
-
speak SSL.",
|
728
|
-
|
729
|
-
:call_hook => :on_define_and_write, # Call our hook with the default value, so we always get the correct bind address set.
|
730
|
-
:hook => proc { |value| value == "webrick" ? Puppet.settings[:bindaddress] = "0.0.0.0" : Puppet.settings[:bindaddress] = "127.0.0.1" if Puppet.settings[:bindaddress] == "" }
|
725
|
+
:default => "0.0.0.0",
|
726
|
+
:desc => "The address a listening server should bind to.",
|
731
727
|
}
|
732
728
|
)
|
733
729
|
|
@@ -815,17 +811,15 @@ EOT
|
|
815
811
|
},
|
816
812
|
:ssl_client_header => {
|
817
813
|
:default => "HTTP_X_CLIENT_DN",
|
818
|
-
:desc => "The header containing an authenticated
|
819
|
-
|
820
|
-
|
821
|
-
See http://projects.puppetlabs.com/projects/puppet/wiki/Using_Mongrel for more information.",
|
814
|
+
:desc => "The header containing an authenticated client's SSL DN.
|
815
|
+
This header must be set by the proxy to the authenticated client's SSL
|
816
|
+
DN (e.g., `/CN=puppet.puppetlabs.com`).",
|
822
817
|
},
|
823
818
|
:ssl_client_verify_header => {
|
824
819
|
:default => "HTTP_X_CLIENT_VERIFY",
|
825
|
-
:desc => "The header containing the status
|
826
|
-
|
827
|
-
|
828
|
-
See http://projects.puppetlabs.com/projects/puppet/wiki/Using_Mongrel for more information.",
|
820
|
+
:desc => "The header containing the status message of the client
|
821
|
+
verification. This header must be set by the proxy to 'SUCCESS' if the
|
822
|
+
client successfully authenticated, and anything else otherwise.",
|
829
823
|
},
|
830
824
|
# To make sure this directory is created before we try to use it on the server, we need
|
831
825
|
# it to be in the server section (#1138).
|
@@ -888,8 +882,9 @@ EOT
|
|
888
882
|
},
|
889
883
|
:rrdinterval => {
|
890
884
|
:default => "$runinterval",
|
885
|
+
:type => :duration,
|
891
886
|
:desc => "How often RRD should expect data.
|
892
|
-
This should match how often the hosts report back to the server.",
|
887
|
+
This should match how often the hosts report back to the server. Can be specified as a duration.",
|
893
888
|
}
|
894
889
|
)
|
895
890
|
|
@@ -1008,11 +1003,12 @@ EOT
|
|
1008
1003
|
:desc => "Whether puppet agent should be run in noop mode.",
|
1009
1004
|
},
|
1010
1005
|
:runinterval => {
|
1011
|
-
:default =>
|
1006
|
+
:default => "30m",
|
1007
|
+
:type => :duration,
|
1012
1008
|
:desc => "How often puppet agent applies the client configuration; in seconds.
|
1013
1009
|
Note that a runinterval of 0 means \"run continuously\" rather than
|
1014
1010
|
\"never run.\" If you want puppet agent to never run, you should start
|
1015
|
-
it with the `--no-client` option.",
|
1011
|
+
it with the `--no-client` option. Can be specified as a duration.",
|
1016
1012
|
},
|
1017
1013
|
:listen => {
|
1018
1014
|
:default => false,
|
@@ -1053,10 +1049,11 @@ EOT
|
|
1053
1049
|
can be guaranteed to support this format, but it will be used for all
|
1054
1050
|
classes that support it.",
|
1055
1051
|
},
|
1056
|
-
:
|
1057
|
-
:default => "$statedir/
|
1058
|
-
|
1059
|
-
:desc => "A lock file to indicate that a puppet agent run is currently in progress.
|
1052
|
+
:agent_catalog_run_lockfile => {
|
1053
|
+
:default => "$statedir/agent_catalog_run.lock",
|
1054
|
+
:type => :string, # (#2888) Ensure this file is not added to the settings catalog.
|
1055
|
+
:desc => "A lock file to indicate that a puppet agent catalog run is currently in progress. " +
|
1056
|
+
"The file contains the pid of the process that holds the lock on the catalog run.",
|
1060
1057
|
},
|
1061
1058
|
:agent_disabled_lockfile => {
|
1062
1059
|
:default => "$statedir/agent_disabled.lock",
|
@@ -1094,8 +1091,9 @@ EOT
|
|
1094
1091
|
},
|
1095
1092
|
:splaylimit => {
|
1096
1093
|
:default => "$runinterval",
|
1094
|
+
:type => :duration,
|
1097
1095
|
:desc => "The maximum time to delay before runs. Defaults to being the same as the
|
1098
|
-
run interval.",
|
1096
|
+
run interval. Can be specified as a duration.",
|
1099
1097
|
},
|
1100
1098
|
:splay => {
|
1101
1099
|
:default => false,
|
@@ -1110,10 +1108,11 @@ EOT
|
|
1110
1108
|
:desc => "Where FileBucket files are stored locally."
|
1111
1109
|
},
|
1112
1110
|
:configtimeout => {
|
1113
|
-
:default =>
|
1111
|
+
:default => "2m",
|
1112
|
+
:type => :duration,
|
1114
1113
|
:desc => "How long the client should wait for the configuration to be retrieved
|
1115
1114
|
before considering it a failure. This can help reduce flapping if too
|
1116
|
-
many clients contact the server at one time.",
|
1115
|
+
many clients contact the server at one time. Can be specified as a duration.",
|
1117
1116
|
},
|
1118
1117
|
:report_server => {
|
1119
1118
|
:default => "$server",
|
@@ -1171,10 +1170,12 @@ EOT
|
|
1171
1170
|
compression, but if it supports it, this setting might reduce performance on high-speed LANs.",
|
1172
1171
|
},
|
1173
1172
|
:waitforcert => {
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1173
|
+
:default => "2m",
|
1174
|
+
:type => :duration,
|
1175
|
+
:desc => "The time interval 'puppet agent' should connect to the server
|
1176
|
+
and ask it to sign a certificate request. This is useful for the initial setup of a
|
1177
|
+
puppet client. You can turn off waiting for certificates by specifying a time of 0.
|
1178
|
+
Can be specified as a duration.",
|
1178
1179
|
}
|
1179
1180
|
)
|
1180
1181
|
|
@@ -1465,8 +1466,10 @@ You can adjust the backend using the storeconfigs_backend setting.",
|
|
1465
1466
|
require 'puppet/node'
|
1466
1467
|
require 'puppet/node/facts'
|
1467
1468
|
if value
|
1468
|
-
Puppet.settings[:async_storeconfigs]
|
1469
|
+
if not Puppet.settings[:async_storeconfigs]
|
1469
1470
|
Puppet::Resource::Catalog.indirection.cache_class = :store_configs
|
1471
|
+
Puppet.settings[:catalog_cache_terminus] = :store_configs
|
1472
|
+
end
|
1470
1473
|
Puppet::Node::Facts.indirection.cache_class = :store_configs
|
1471
1474
|
Puppet::Node.indirection.cache_class = :store_configs
|
1472
1475
|
|
@@ -1475,6 +1478,7 @@ You can adjust the backend using the storeconfigs_backend setting.",
|
|
1475
1478
|
end
|
1476
1479
|
},
|
1477
1480
|
:storeconfigs_backend => {
|
1481
|
+
:type => :terminus,
|
1478
1482
|
:default => "active_record",
|
1479
1483
|
:desc => "Configure the backend terminus used for StoreConfigs.
|
1480
1484
|
By default, this uses the ActiveRecord store, which directly talks to the
|
data/lib/puppet/external/dot.rb
CHANGED
@@ -35,7 +35,7 @@ module DOT
|
|
35
35
|
'fontcolor', # default: black; type face color
|
36
36
|
'fontname', # default: Times-Roman; font family
|
37
37
|
'fontsize', # default: 14; point size of label
|
38
|
-
'group', # name of node
|
38
|
+
'group', # name of node's group
|
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
|
@@ -321,6 +321,21 @@ module PSON
|
|
321
321
|
rescue PSON::NestingError
|
322
322
|
raise ArgumentError, "exceed depth limit"
|
323
323
|
end
|
324
|
+
|
325
|
+
|
326
|
+
# Provide a smarter wrapper for changing string encoding that works with
|
327
|
+
# both Ruby 1.8 (iconv) and 1.9 (String#encode). Thankfully they seem to
|
328
|
+
# have compatible input syntax, at least for the encodings we touch.
|
329
|
+
if String.method_defined?("encode")
|
330
|
+
def encode(to, from, string)
|
331
|
+
string.encode(to, from)
|
332
|
+
end
|
333
|
+
else
|
334
|
+
require 'iconv'
|
335
|
+
def encode(to, from, string)
|
336
|
+
Iconv.conv(to, from, string)
|
337
|
+
end
|
338
|
+
end
|
324
339
|
end
|
325
340
|
|
326
341
|
module ::Kernel
|