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
data/lib/puppet/node.rb
CHANGED
@@ -99,7 +99,7 @@ class Puppet::Node
|
|
99
99
|
@parameters[name] = value unless @parameters.include?(name)
|
100
100
|
end
|
101
101
|
|
102
|
-
@parameters["environment"] ||= self.environment.name.to_s
|
102
|
+
@parameters["environment"] ||= self.environment.name.to_s
|
103
103
|
end
|
104
104
|
|
105
105
|
# Calculate the list of names we might use for looking
|
data/lib/puppet/node/facts.rb
CHANGED
@@ -436,7 +436,7 @@ class Puppet::Parser::Compiler
|
|
436
436
|
# Set the node's parameters into the top-scope as variables.
|
437
437
|
def set_node_parameters
|
438
438
|
node.parameters.each do |param, value|
|
439
|
-
@topscope[param] = value
|
439
|
+
@topscope[param.to_s] = value
|
440
440
|
end
|
441
441
|
|
442
442
|
# These might be nil.
|
@@ -52,8 +52,19 @@ module Puppet::Parser::Functions
|
|
52
52
|
raise Puppet::DevError, "Invalid statement type #{ftype.inspect}"
|
53
53
|
end
|
54
54
|
|
55
|
+
# the block must be installed as a method because it may use "return",
|
56
|
+
# which is not allowed from procs.
|
57
|
+
real_fname = "real_function_#{name}"
|
58
|
+
environment_module.send(:define_method, real_fname, &block)
|
59
|
+
|
55
60
|
fname = "function_#{name}"
|
56
|
-
environment_module.send(:define_method, fname
|
61
|
+
environment_module.send(:define_method, fname) do |*args|
|
62
|
+
if args[0].is_a? Array
|
63
|
+
self.send(real_fname, args[0])
|
64
|
+
else
|
65
|
+
raise ArgumentError, "custom functions must be called with a single array that contains the arguments. For example, function_example([1]) instead of function_example(1)"
|
66
|
+
end
|
67
|
+
end
|
57
68
|
|
58
69
|
# Someday we'll support specifying an arity, but for now, nope
|
59
70
|
#functions[name] = {:arity => arity, :type => ftype}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module Puppet::Parser::Functions
|
2
|
+
newfunction(:hiera_include) do |*args|
|
3
|
+
require 'hiera_puppet'
|
4
|
+
key, default, override = HieraPuppet.parse_args(args)
|
5
|
+
answer = HieraPuppet.lookup(key, default, self, override, :array)
|
6
|
+
|
7
|
+
method = Puppet::Parser::Functions.function(:include)
|
8
|
+
send(method, answer)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
@@ -24,12 +24,7 @@
|
|
24
24
|
# other dealings in this Software without prior written authorization
|
25
25
|
# from Thomas Bellman.
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
Safe = 'a-zA-Z0-9@%_+=:,./-' # Safe unquoted
|
30
|
-
Dangerous = '!"`$\\' # Unsafe inside double quotes
|
31
|
-
|
32
|
-
newfunction(:shellquote, :type => :rvalue, :doc => "\
|
27
|
+
Puppet::Parser::Functions.newfunction(:shellquote, :type => :rvalue, :doc => "\
|
33
28
|
Quote and concatenate arguments for use in Bourne shell.
|
34
29
|
|
35
30
|
Each argument is quoted separately, and then all are concatenated
|
@@ -39,31 +34,28 @@ module Puppet::Parser::Functions
|
|
39
34
|
shellquote instead of having to specify each argument
|
40
35
|
individually in the call.
|
41
36
|
") \
|
42
|
-
|
37
|
+
do |args|
|
38
|
+
safe = 'a-zA-Z0-9@%_+=:,./-' # Safe unquoted
|
39
|
+
dangerous = '!"`$\\' # Unsafe inside double quotes
|
43
40
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
word.each_byte do |c|
|
58
|
-
c = c.chr
|
59
|
-
r += "\\" if Dangerous.include?(c)
|
60
|
-
r += c
|
61
|
-
end
|
62
|
-
r += '"'
|
63
|
-
result << r
|
41
|
+
result = []
|
42
|
+
args.flatten.each do |word|
|
43
|
+
if word.length != 0 and word.count(safe) == word.length
|
44
|
+
result << word
|
45
|
+
elsif word.count(dangerous) == 0
|
46
|
+
result << ('"' + word + '"')
|
47
|
+
elsif word.count("'") == 0
|
48
|
+
result << ("'" + word + "'")
|
49
|
+
else
|
50
|
+
r = '"'
|
51
|
+
word.each_byte do |c|
|
52
|
+
r += "\\" if dangerous.include?(c.chr)
|
53
|
+
r += c.chr
|
64
54
|
end
|
55
|
+
r += '"'
|
56
|
+
result << r
|
65
57
|
end
|
66
|
-
|
67
|
-
return result.join(" ")
|
68
58
|
end
|
59
|
+
|
60
|
+
return result.join(" ")
|
69
61
|
end
|
data/lib/puppet/parser/lexer.rb
CHANGED
@@ -487,7 +487,7 @@ class Puppet::Parser::Lexer
|
|
487
487
|
|
488
488
|
# we've encountered the start of a string...
|
489
489
|
# slurp in the rest of the string and return it
|
490
|
-
def slurpstring(terminators,escapes=%w{ \\ $ ' " n t s }+["\n"],ignore_invalid_escapes=false)
|
490
|
+
def slurpstring(terminators,escapes=%w{ \\ $ ' " r n t s }+["\n"],ignore_invalid_escapes=false)
|
491
491
|
# we search for the next quote that isn't preceded by a
|
492
492
|
# backslash; the caret is there to match empty strings
|
493
493
|
str = @scanner.scan_until(/([^\\]|^|[^\\])([\\]{2})*[#{terminators}]/) or lex_error "Unclosed quote after '#{last}' in '#{rest}'"
|
@@ -496,6 +496,7 @@ class Puppet::Parser::Lexer
|
|
496
496
|
ch = $1
|
497
497
|
if escapes.include? ch
|
498
498
|
case ch
|
499
|
+
when 'r'; "\r"
|
499
500
|
when 'n'; "\n"
|
500
501
|
when 't'; "\t"
|
501
502
|
when 's'; " "
|
data/lib/puppet/parser/scope.rb
CHANGED
@@ -236,6 +236,10 @@ class Puppet::Parser::Scope
|
|
236
236
|
end
|
237
237
|
|
238
238
|
def lookupvar(name, options = {})
|
239
|
+
unless name.is_a? String
|
240
|
+
raise Puppet::DevError, "Scope variable name is a #{name.class}, not a string"
|
241
|
+
end
|
242
|
+
|
239
243
|
# Save the originating scope for the request
|
240
244
|
options[:origin] = self unless options[:origin]
|
241
245
|
table = ephemeral?(name) ? @ephemeral.last : @symtable
|
@@ -327,6 +331,10 @@ class Puppet::Parser::Scope
|
|
327
331
|
# It's preferred that you use self[]= instead of this; only use this
|
328
332
|
# when you need to set options.
|
329
333
|
def setvar(name, value, options = {})
|
334
|
+
unless name.is_a? String
|
335
|
+
raise Puppet::DevError, "Scope variable name is a #{name.class}, not a string"
|
336
|
+
end
|
337
|
+
|
330
338
|
table = options[:ephemeral] ? @ephemeral.last : @symtable
|
331
339
|
if table.include?(name)
|
332
340
|
if options[:append]
|
@@ -5,7 +5,7 @@ Puppet::Type.type(:exec).provide :windows, :parent => Puppet::Provider::Exec do
|
|
5
5
|
confine :operatingsystem => :windows
|
6
6
|
defaultfor :operatingsystem => :windows
|
7
7
|
|
8
|
-
desc <<-EOT
|
8
|
+
desc <<-'EOT'
|
9
9
|
Execute external binaries on Windows systems. As with the `posix`
|
10
10
|
provider, this provider directly calls the command with the arguments
|
11
11
|
given, without passing it through a shell or performing any interpolation.
|
@@ -7,7 +7,7 @@ Puppet::Type.type(:group).provide :groupadd, :parent => Puppet::Provider::NameSe
|
|
7
7
|
|
8
8
|
commands :add => "groupadd", :delete => "groupdel", :modify => "groupmod"
|
9
9
|
|
10
|
-
has_feature :system_groups
|
10
|
+
has_feature :system_groups unless %w{HP-UX Solaris}.include? Facter.value(:operatingsystem)
|
11
11
|
|
12
12
|
verify :gid, "GID must be an integer" do |value|
|
13
13
|
value.is_a? Integer
|
@@ -21,10 +21,9 @@ Puppet::Type.type(:group).provide :groupadd, :parent => Puppet::Provider::NameSe
|
|
21
21
|
end
|
22
22
|
end
|
23
23
|
cmd << "-o" if @resource.allowdupe?
|
24
|
-
cmd << "-r" if @resource.system?
|
24
|
+
cmd << "-r" if @resource.system? and self.class.system_groups?
|
25
25
|
cmd << @resource[:name]
|
26
26
|
|
27
27
|
cmd
|
28
28
|
end
|
29
29
|
end
|
30
|
-
|
@@ -17,6 +17,8 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
17
17
|
|
18
18
|
has_feature :upgradable
|
19
19
|
|
20
|
+
has_feature :holdable
|
21
|
+
|
20
22
|
commands :pkg => "/usr/bin/pkg"
|
21
23
|
|
22
24
|
confine :osfamily => :solaris
|
@@ -34,14 +36,25 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
34
36
|
# if not the field is -, else we dont know what we are doing and exit with
|
35
37
|
# out doing more damage.
|
36
38
|
def self.ifo_flag(flags)
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
(
|
40
|
+
case flags[0..0]
|
41
|
+
when 'i'
|
42
|
+
{:status => 'installed'}
|
43
|
+
when '-'
|
44
|
+
{:status => 'known'}
|
45
|
+
else
|
46
|
+
raise ArgumentError, 'Unknown format %s: %s[%s]' % [self.name, flags, flags[0..0]]
|
47
|
+
end
|
48
|
+
).merge(
|
49
|
+
case flags[1..1]
|
50
|
+
when 'f'
|
51
|
+
{:ensure => 'held'}
|
52
|
+
when '-'
|
53
|
+
{}
|
54
|
+
else
|
55
|
+
raise ArgumentError, 'Unknown format %s: %s[%s]' % [self.name, flags, flags[1..1]]
|
56
|
+
end
|
57
|
+
)
|
45
58
|
end
|
46
59
|
|
47
60
|
# The UFOXI field is the field present in the older pkg
|
@@ -51,6 +64,7 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
51
64
|
# f_rozen(n/i) o_bsolete x_cluded(n/i) i_constrained(n/i)
|
52
65
|
# note that u_pdate flag may not be trustable due to constraints.
|
53
66
|
# so we dont rely on it
|
67
|
+
# Frozen was never implemented in UFOXI so skipping frozen here.
|
54
68
|
def self.ufoxi_flag(flags)
|
55
69
|
{}
|
56
70
|
end
|
@@ -82,7 +96,7 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
82
96
|
{:name => $1, :ensure => $2}.merge ifo_flag($3)
|
83
97
|
|
84
98
|
# x11/wm/fvwm (fvwm.org) 2.6.1-3 i--
|
85
|
-
when /^(\S+) \((.+)\) +(\S+) +(
|
99
|
+
when /^(\S+) \((.+)\) +(\S+) +(...)$/
|
86
100
|
{:name => $1, :publisher => $2, :ensure => $3}.merge ifo_flag($4)
|
87
101
|
|
88
102
|
# NAME (PUBLISHER) VERSION STATE UFOXI (dvd:052adf36c3f4)
|
@@ -99,6 +113,15 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
99
113
|
end).merge({:provider => self.name})
|
100
114
|
end
|
101
115
|
|
116
|
+
def hold
|
117
|
+
pkg(:freeze, @resource[:name])
|
118
|
+
end
|
119
|
+
|
120
|
+
def unhold
|
121
|
+
r = exec_cmd(command(:pkg), 'unfreeze', @resource[:name])
|
122
|
+
raise Puppet::Error, "Unable to unfreeze #{r[:out]}" unless [0,4].include? r[:exit]
|
123
|
+
end
|
124
|
+
|
102
125
|
# Return the version of the package. Note that the bug
|
103
126
|
# http://defect.opensolaris.org/bz/show_bug.cgi?id=19159%
|
104
127
|
# notes that we can't use -Ha for the same even though the manual page reads that way.
|
@@ -119,10 +142,14 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
119
142
|
def install(nofail = false)
|
120
143
|
name = @resource[:name]
|
121
144
|
should = @resource[:ensure]
|
145
|
+
# always unhold if explicitly told to install/update
|
146
|
+
self.unhold
|
122
147
|
unless should.is_a? Symbol
|
123
148
|
name += "@#{should}"
|
124
149
|
is = self.query
|
125
|
-
|
150
|
+
unless is[:ensure].to_sym == :absent
|
151
|
+
self.uninstall if Puppet::Util::Package.versioncmp(should, is[:ensure]) < 0
|
152
|
+
end
|
126
153
|
end
|
127
154
|
r = exec_cmd(command(:pkg), 'install', '--accept', name)
|
128
155
|
return r if nofail
|
@@ -2,7 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# author Brice Figureau <brice-puppet@daysofwonder.com>
|
4
4
|
Puppet::Type.type(:service).provide :daemontools, :parent => :base do
|
5
|
-
desc <<-EOT
|
5
|
+
desc <<-'EOT'
|
6
6
|
Daemontools service management.
|
7
7
|
|
8
8
|
This provider manages daemons supervised by D.J. Bernstein daemontools.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'facter/util/plist'
|
2
2
|
Puppet::Type.type(:service).provide :launchd, :parent => :base do
|
3
|
-
desc <<-EOT
|
3
|
+
desc <<-'EOT'
|
4
4
|
This provider manages jobs with `launchd`, which is the default service
|
5
5
|
framework for Mac OS X (and may be available for use on other platforms).
|
6
6
|
|
@@ -48,7 +48,7 @@ Puppet::Type.type(:service).provide :redhat, :parent => :init, :source => :init
|
|
48
48
|
# Don't support them specifying runlevels; always use the runlevels
|
49
49
|
# in the init scripts.
|
50
50
|
def enable
|
51
|
-
|
51
|
+
output = chkconfig(@resource[:name], :on)
|
52
52
|
rescue Puppet::ExecutionFailure => detail
|
53
53
|
raise Puppet::Error, "Could not enable #{self.name}: #{detail}"
|
54
54
|
end
|
@@ -21,7 +21,8 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ
|
|
21
21
|
value !~ /\s/
|
22
22
|
end
|
23
23
|
|
24
|
-
has_features :manages_homedir, :allows_duplicates, :manages_expiry
|
24
|
+
has_features :manages_homedir, :allows_duplicates, :manages_expiry
|
25
|
+
has_features :system_users unless %w{HP-UX Solaris}.include? Facter.value(:operatingsystem)
|
25
26
|
|
26
27
|
has_features :manages_passwords, :manages_password_age if Puppet.features.libshadow?
|
27
28
|
|
@@ -33,7 +34,7 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ
|
|
33
34
|
cmd = []
|
34
35
|
if @resource.managehome?
|
35
36
|
cmd << "-m"
|
36
|
-
elsif %w{Fedora RedHat CentOS OEL OVS}.include?(Facter.value(
|
37
|
+
elsif %w{Fedora RedHat CentOS OEL OVS}.include?(Facter.value(:operatingsystem))
|
37
38
|
cmd << "-M"
|
38
39
|
end
|
39
40
|
cmd
|
@@ -49,7 +50,11 @@ Puppet::Type.type(:user).provide :useradd, :parent => Puppet::Provider::NameServ
|
|
49
50
|
end
|
50
51
|
|
51
52
|
def check_system_users
|
52
|
-
|
53
|
+
if self.class.system_users? and resource.system?
|
54
|
+
["-r"]
|
55
|
+
else
|
56
|
+
[]
|
57
|
+
end
|
53
58
|
end
|
54
59
|
|
55
60
|
def add_properties
|
@@ -28,6 +28,10 @@ Puppet::Type.type(:user).provide :windows_adsi do
|
|
28
28
|
[:comment, :home, :groups].each do |prop|
|
29
29
|
send("#{prop}=", @resource[prop]) if @resource[prop]
|
30
30
|
end
|
31
|
+
|
32
|
+
if @resource.managehome?
|
33
|
+
Puppet::Util::Windows::User.load_profile(@resource[:name], @resource[:password])
|
34
|
+
end
|
31
35
|
end
|
32
36
|
|
33
37
|
def exists?
|
@@ -35,7 +39,14 @@ Puppet::Type.type(:user).provide :windows_adsi do
|
|
35
39
|
end
|
36
40
|
|
37
41
|
def delete
|
42
|
+
# lookup sid before we delete account
|
43
|
+
sid = uid if @resource.managehome?
|
44
|
+
|
38
45
|
Puppet::Util::ADSI::User.delete(@resource[:name])
|
46
|
+
|
47
|
+
if sid
|
48
|
+
Puppet::Util::ADSI::UserProfile.delete(sid)
|
49
|
+
end
|
39
50
|
end
|
40
51
|
|
41
52
|
# Only flush if we created or modified a user, not deleted
|
@@ -37,11 +37,38 @@ Puppet::Type.type(:zfs).provide(:zfs) do
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
|
40
|
+
PARAMETER_UNSET_OR_NOT_AVAILABLE = '-'
|
41
|
+
|
42
|
+
# http://docs.oracle.com/cd/E19963-01/html/821-1448/gbscy.html
|
43
|
+
# shareiscsi (added in build 120) was removed from S11 build 136
|
44
|
+
# aclmode was removed from S11 in build 139 but it may have been added back
|
45
|
+
# http://webcache.googleusercontent.com/search?q=cache:-p74K0DVsdwJ:developers.slashdot.org/story/11/11/09/2343258/solaris-11-released+&cd=13
|
46
|
+
[:aclmode, :shareiscsi].each do |field|
|
47
|
+
# The zfs commands use the property value '-' to indicate that the
|
48
|
+
# property is not set. We make use of this value to indicate that the
|
49
|
+
# property is not set since it is not avaliable. Conversely, if these
|
50
|
+
# properties are attempted to be unset, and resulted in an error, our
|
51
|
+
# best bet is to catch the exception and continue.
|
52
|
+
define_method(field) do
|
53
|
+
begin
|
54
|
+
zfs(:get, "-H", "-o", "value", field, @resource[:name]).strip
|
55
|
+
rescue
|
56
|
+
PARAMETER_UNSET_OR_NOT_AVAILABLE
|
57
|
+
end
|
58
|
+
end
|
59
|
+
define_method(field.to_s + "=") do |should|
|
60
|
+
begin
|
61
|
+
zfs(:set, "#{field}=#{should}", @resource[:name])
|
62
|
+
rescue
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
[:aclinherit, :atime, :canmount, :checksum,
|
41
68
|
:compression, :copies, :dedup, :devices, :exec, :logbias,
|
42
69
|
:mountpoint, :nbmand, :primarycache, :quota, :readonly,
|
43
70
|
:recordsize, :refquota, :refreservation, :reservation,
|
44
|
-
:secondarycache, :setuid, :
|
71
|
+
:secondarycache, :setuid, :sharenfs, :sharesmb,
|
45
72
|
:snapdir, :version, :volsize, :vscan, :xattr, :zoned].each do |field|
|
46
73
|
define_method(field) do
|
47
74
|
zfs(:get, "-H", "-o", "value", field, @resource[:name]).strip
|