puppet 6.4.5-x86-mingw32 → 6.5.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CODEOWNERS +10 -10
- data/Gemfile +6 -6
- data/Gemfile.lock +46 -52
- data/ext/build_defaults.yaml +0 -1
- data/ext/project_data.yaml +3 -3
- data/ext/regexp_nodes/regexp_nodes.rb +4 -4
- data/ext/solaris/smf/puppet.xml +0 -2
- data/ext/windows/eventlog/Rakefile +32 -0
- data/ext/windows/eventlog/puppetres.dll +0 -0
- data/ext/windows/eventlog/puppetres.mc +18 -0
- data/ext/windows/service/daemon.rb +8 -38
- data/install.rb +24 -6
- data/lib/puppet.rb +3 -1
- data/lib/puppet/application.rb +1 -1
- data/lib/puppet/application/agent.rb +11 -34
- data/lib/puppet/application/apply.rb +6 -6
- data/lib/puppet/application/describe.rb +9 -3
- data/lib/puppet/application/device.rb +4 -14
- data/lib/puppet/application/doc.rb +1 -1
- data/lib/puppet/application/lookup.rb +2 -2
- data/lib/puppet/application/resource.rb +4 -4
- data/lib/puppet/application/script.rb +2 -2
- data/lib/puppet/application/ssl.rb +10 -9
- data/lib/puppet/configurer.rb +30 -86
- data/lib/puppet/configurer/downloader.rb +6 -2
- data/lib/puppet/defaults.rb +50 -44
- data/lib/puppet/error.rb +14 -9
- data/lib/puppet/face/catalog.rb +20 -1
- data/lib/puppet/face/config.rb +48 -10
- data/lib/puppet/face/facts.rb +1 -1
- data/lib/puppet/face/help.rb +1 -1
- data/lib/puppet/face/module/list.rb +5 -5
- data/lib/puppet/face/module/search.rb +1 -1
- data/lib/puppet/face/module/uninstall.rb +1 -1
- data/lib/puppet/face/module/upgrade.rb +1 -1
- data/lib/puppet/face/parser.rb +48 -9
- data/lib/puppet/face/plugin.rb +2 -9
- data/lib/puppet/file_serving/http_metadata.rb +1 -1
- data/lib/puppet/file_system.rb +12 -2
- data/lib/puppet/file_system/file_impl.rb +6 -3
- data/lib/puppet/file_system/memory_file.rb +1 -1
- data/lib/puppet/file_system/posix.rb +2 -3
- data/lib/puppet/forge.rb +3 -3
- data/lib/puppet/functions.rb +2 -1
- data/lib/puppet/functions/camelcase.rb +2 -2
- data/lib/puppet/functions/epp.rb +4 -4
- data/lib/puppet/functions/find_file.rb +9 -9
- data/lib/puppet/functions/inline_epp.rb +5 -5
- data/lib/puppet/functions/regsubst.rb +6 -8
- data/lib/puppet/gettext/module_translations.rb +1 -1
- data/lib/puppet/graph/rb_tree_map.rb +2 -2
- data/lib/puppet/graph/simple_graph.rb +3 -4
- data/lib/puppet/indirector/catalog/compiler.rb +5 -11
- data/lib/puppet/indirector/file_bucket_file/file.rb +1 -1
- data/lib/puppet/indirector/hiera.rb +0 -2
- data/lib/puppet/indirector/resource/ral.rb +3 -1
- data/lib/puppet/indirector/resource/validator.rb +1 -1
- data/lib/puppet/interface.rb +1 -2
- data/lib/puppet/loaders.rb +1 -0
- data/lib/puppet/metatype/manager.rb +1 -1
- data/lib/puppet/module.rb +1 -1
- data/lib/puppet/module/task.rb +4 -20
- data/lib/puppet/module_tool/applications/installer.rb +1 -1
- data/lib/puppet/module_tool/applications/uninstaller.rb +3 -3
- data/lib/puppet/module_tool/metadata.rb +1 -1
- data/lib/puppet/module_tool/shared_behaviors.rb +4 -4
- data/lib/puppet/module_tool/tar/mini.rb +2 -12
- data/lib/puppet/network/http/api/indirected_routes.rb +11 -12
- data/lib/puppet/network/http/connection.rb +12 -10
- data/lib/puppet/network/http/factory.rb +11 -1
- data/lib/puppet/network/http/pool.rb +0 -2
- data/lib/puppet/network/http/site.rb +1 -1
- data/lib/puppet/network/resolver.rb +2 -2
- data/lib/puppet/node/environment.rb +2 -4
- data/lib/puppet/pal/pal_impl.rb +2 -2
- data/lib/puppet/parser/ast.rb +1 -1
- data/lib/puppet/parser/ast/resourceparam.rb +1 -1
- data/lib/puppet/parser/functions.rb +1 -1
- data/lib/puppet/parser/functions/epp.rb +3 -3
- data/lib/puppet/parser/functions/fail.rb +8 -1
- data/lib/puppet/parser/functions/inline_epp.rb +5 -5
- data/lib/puppet/parser/scope.rb +7 -8
- data/lib/puppet/pops/evaluator/collectors/catalog_collector.rb +1 -1
- data/lib/puppet/pops/evaluator/collectors/exported_collector.rb +1 -1
- data/lib/puppet/pops/evaluator/external_syntax_support.rb +2 -3
- data/lib/puppet/pops/evaluator/runtime3_support.rb +4 -4
- data/lib/puppet/pops/loader/null_loader.rb +60 -0
- data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +6 -4
- data/lib/puppet/pops/loader/task_instantiator.rb +0 -4
- data/lib/puppet/pops/loaders.rb +1 -1
- data/lib/puppet/pops/lookup/hiera_config.rb +0 -1
- data/lib/puppet/pops/lookup/sub_lookup.rb +1 -1
- data/lib/puppet/pops/merge_strategy.rb +18 -22
- data/lib/puppet/pops/parser/heredoc_support.rb +1 -1
- data/lib/puppet/pops/parser/interpolation_support.rb +4 -4
- data/lib/puppet/pops/parser/locator.rb +1 -1
- data/lib/puppet/pops/parser/pn_parser.rb +16 -17
- data/lib/puppet/pops/puppet_stack.rb +49 -51
- data/lib/puppet/pops/types/p_sensitive_type.rb +1 -1
- data/lib/puppet/pops/types/string_converter.rb +10 -10
- data/lib/puppet/pops/types/types.rb +6 -5
- data/lib/puppet/property.rb +1 -1
- data/lib/puppet/property/ensure.rb +1 -1
- data/lib/puppet/provider/exec.rb +2 -6
- data/lib/puppet/provider/file/posix.rb +0 -5
- data/lib/puppet/provider/nameservice.rb +3 -10
- data/lib/puppet/provider/nameservice/directoryservice.rb +1 -1
- data/lib/puppet/provider/nameservice/pw.rb +2 -2
- data/lib/puppet/provider/package.rb +0 -2
- data/lib/puppet/provider/package/apt.rb +1 -5
- data/lib/puppet/provider/package/dnf.rb +1 -1
- data/lib/puppet/provider/package/dpkg.rb +18 -34
- data/lib/puppet/provider/package/openbsd.rb +1 -1
- data/lib/puppet/provider/package/pip.rb +13 -37
- data/lib/puppet/provider/package/portage.rb +4 -4
- data/lib/puppet/provider/package/puppet_gem.rb +1 -1
- data/lib/puppet/provider/package/rpm.rb +18 -56
- data/lib/puppet/provider/package/windows/package.rb +1 -1
- data/lib/puppet/provider/package/yum.rb +5 -9
- data/lib/puppet/provider/package_targetable.rb +4 -7
- data/lib/puppet/provider/parsedfile.rb +1 -1
- data/lib/puppet/provider/service/daemontools.rb +9 -9
- data/lib/puppet/provider/service/launchd.rb +5 -20
- data/lib/puppet/provider/service/openbsd.rb +1 -1
- data/lib/puppet/provider/service/rcng.rb +2 -2
- data/lib/puppet/provider/service/runit.rb +8 -2
- data/lib/puppet/provider/service/systemd.rb +19 -14
- data/lib/puppet/provider/service/windows.rb +0 -8
- data/lib/puppet/provider/user/directoryservice.rb +1 -1
- data/lib/puppet/provider/user/hpux.rb +1 -1
- data/lib/puppet/provider/user/pw.rb +3 -12
- data/lib/puppet/provider/user/user_role_add.rb +1 -5
- data/lib/puppet/provider/user/useradd.rb +20 -45
- data/lib/puppet/provider/user/windows_adsi.rb +5 -4
- data/lib/puppet/reference/configuration.rb +3 -3
- data/lib/puppet/reference/indirection.rb +2 -2
- data/lib/puppet/reference/metaparameter.rb +3 -1
- data/lib/puppet/reference/providers.rb +3 -1
- data/lib/puppet/reference/type.rb +9 -3
- data/lib/puppet/reports.rb +1 -1
- data/lib/puppet/resource.rb +1 -18
- data/lib/puppet/resource/catalog.rb +1 -1
- data/lib/puppet/rest/routes.rb +30 -17
- data/lib/puppet/settings.rb +3 -43
- data/lib/puppet/settings/environment_conf.rb +0 -1
- data/lib/puppet/ssl/certificate_request.rb +12 -2
- data/lib/puppet/ssl/host.rb +2 -2
- data/lib/puppet/ssl/oids.rb +1 -1
- data/lib/puppet/ssl/ssl_provider.rb +11 -5
- data/lib/puppet/ssl/state_machine.rb +102 -98
- data/lib/puppet/test/test_helper.rb +1 -0
- data/lib/puppet/transaction.rb +11 -33
- data/lib/puppet/transaction/report.rb +1 -1
- data/lib/puppet/type.rb +4 -2
- data/lib/puppet/type/exec.rb +17 -23
- data/lib/puppet/type/file.rb +39 -11
- data/lib/puppet/type/file/data_sync.rb +1 -5
- data/lib/puppet/type/group.rb +2 -4
- data/lib/puppet/type/notify.rb +3 -4
- data/lib/puppet/type/package.rb +3 -20
- data/lib/puppet/type/schedule.rb +1 -1
- data/lib/puppet/type/service.rb +3 -8
- data/lib/puppet/type/user.rb +2 -4
- data/lib/puppet/util.rb +29 -39
- data/lib/puppet/util/command_line/trollop.rb +1 -1
- data/lib/puppet/util/execution.rb +3 -4
- data/lib/puppet/util/http_proxy.rb +19 -27
- data/lib/puppet/util/log.rb +2 -2
- data/lib/puppet/util/log/destinations.rb +2 -2
- data/lib/puppet/util/logging.rb +20 -32
- data/lib/puppet/util/metric.rb +2 -2
- data/lib/puppet/util/monkey_patches.rb +33 -0
- data/lib/puppet/util/pidlock.rb +2 -3
- data/lib/puppet/util/provider_features.rb +4 -2
- data/lib/puppet/util/rdoc.rb +1 -1
- data/lib/puppet/util/reference.rb +1 -1
- data/lib/puppet/util/resource_template.rb +1 -1
- data/lib/puppet/util/selinux.rb +2 -8
- data/lib/puppet/util/skip_tags.rb +4 -0
- data/lib/puppet/util/windows/adsi.rb +18 -48
- data/lib/puppet/util/windows/process.rb +8 -8
- data/lib/puppet/util/windows/registry.rb +5 -7
- data/lib/puppet/util/windows/security.rb +0 -2
- data/lib/puppet/util/windows/service.rb +4 -149
- data/lib/puppet/util/windows/sid.rb +0 -1
- data/lib/puppet/vendor.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet/x509/cert_provider.rb +81 -24
- data/locales/puppet.pot +462 -482
- data/man/man5/puppet.conf.5 +43 -44
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +3 -3
- data/man/man8/puppet-catalog.8 +31 -3
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-key.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-man.8 +1 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +1 -1
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +3 -3
- data/spec/fixtures/ssl/127.0.0.1-key.pem +56 -56
- data/spec/fixtures/ssl/127.0.0.1.pem +27 -27
- data/spec/fixtures/ssl/bad-basic-constraints.pem +32 -32
- data/spec/fixtures/ssl/bad-int-basic-constraints.pem +30 -30
- data/spec/fixtures/ssl/ca.pem +30 -30
- data/spec/fixtures/ssl/crl.pem +15 -15
- data/spec/fixtures/ssl/ec-key.pem +18 -0
- data/spec/fixtures/ssl/ec.pem +40 -0
- data/spec/fixtures/ssl/encrypted-ec-key.pem +21 -0
- data/spec/fixtures/ssl/encrypted-key.pem +57 -57
- data/spec/fixtures/ssl/intermediate-agent-crl.pem +16 -16
- data/spec/fixtures/ssl/intermediate-agent.pem +33 -33
- data/spec/fixtures/ssl/intermediate-crl.pem +17 -17
- data/spec/fixtures/ssl/intermediate.pem +31 -31
- data/spec/fixtures/ssl/pluto-key.pem +56 -56
- data/spec/fixtures/ssl/pluto.pem +28 -28
- data/spec/fixtures/ssl/request-key.pem +56 -56
- data/spec/fixtures/ssl/request.pem +24 -24
- data/spec/fixtures/ssl/revoked-key.pem +56 -56
- data/spec/fixtures/ssl/revoked.pem +25 -25
- data/spec/fixtures/ssl/signed-key.pem +56 -56
- data/spec/fixtures/ssl/signed.pem +25 -25
- data/spec/fixtures/ssl/tampered-cert.pem +27 -27
- data/spec/fixtures/ssl/tampered-csr.pem +24 -24
- data/spec/fixtures/unit/pops/loaders/loaders/mix_4x_and_3x_functions/usee/lib/puppet/parser/functions/func_with_syntax_error.rb +9 -0
- data/spec/fixtures/vcr/cassettes/Puppet_Network_HTTP_Connection/when_handling_requests/_request_get/should_yield_to_the_block.yml +24 -0
- data/spec/fixtures/vcr/cassettes/Puppet_Network_HTTP_Connection/when_handling_requests/_request_head/should_yield_to_the_block.yml +24 -0
- data/spec/fixtures/vcr/cassettes/Puppet_Network_HTTP_Connection/when_handling_requests/_request_post/should_yield_to_the_block.yml +24 -0
- data/spec/integration/configurer_spec.rb +0 -52
- data/spec/integration/provider/service/init_spec.rb +1 -0
- data/spec/integration/provider/service/systemd_spec.rb +5 -8
- data/spec/integration/type/file_spec.rb +38 -28
- data/spec/integration/util/execution_spec.rb +0 -27
- data/spec/lib/puppet/certificate_factory.rb +2 -2
- data/spec/lib/puppet/test_ca.rb +17 -4
- data/spec/lib/puppet_spec/fixtures.rb +4 -0
- data/spec/spec_helper.rb +0 -28
- data/spec/unit/application/agent_spec.rb +34 -67
- data/spec/unit/application/device_spec.rb +1 -27
- data/spec/unit/application/ssl_spec.rb +60 -35
- data/spec/unit/configurer_spec.rb +399 -395
- data/spec/unit/defaults_spec.rb +4 -4
- data/spec/unit/face/facts_spec.rb +0 -9
- data/spec/unit/face/parser_spec.rb +69 -22
- data/spec/unit/face/plugin_spec.rb +0 -8
- data/spec/unit/file_system_spec.rb +30 -1
- data/spec/unit/forge/forge_spec.rb +3 -1
- data/spec/unit/forge/repository_spec.rb +3 -1
- data/spec/unit/indirector/catalog/compiler_spec.rb +5 -62
- data/spec/unit/indirector/resource/ral_spec.rb +4 -4
- data/spec/unit/module_tool/tar/mini_spec.rb +1 -1
- data/spec/unit/network/http/api/indirected_routes_spec.rb +10 -25
- data/spec/unit/network/http/connection_spec.rb +145 -119
- data/spec/unit/network/http/factory_spec.rb +5 -27
- data/spec/unit/parser/scope_spec.rb +0 -10
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +3 -8
- data/spec/unit/pops/loaders/loaders_spec.rb +4 -0
- data/spec/unit/pops/loaders/module_loaders_spec.rb +0 -37
- data/spec/unit/pops/types/types_spec.rb +27 -0
- data/spec/unit/provider/exec_spec.rb +0 -209
- data/spec/unit/provider/package/aptrpm_spec.rb +1 -1
- data/spec/unit/provider/package/dnf_spec.rb +0 -7
- data/spec/unit/provider/package/dpkg_spec.rb +80 -240
- data/spec/unit/provider/package/pip_spec.rb +8 -61
- data/spec/unit/provider/package/portage_spec.rb +4 -4
- data/spec/unit/provider/package/rpm_spec.rb +16 -150
- data/spec/unit/provider/package/yum_spec.rb +0 -7
- data/spec/unit/provider/service/daemontools_spec.rb +0 -24
- data/spec/unit/provider/service/launchd_spec.rb +0 -28
- data/spec/unit/provider/service/runit_spec.rb +0 -24
- data/spec/unit/provider/service/systemd_spec.rb +25 -39
- data/spec/unit/provider/service/windows_spec.rb +0 -20
- data/spec/unit/provider/user/hpux_spec.rb +2 -2
- data/spec/unit/provider/user/pw_spec.rb +0 -37
- data/spec/unit/provider/user/useradd_spec.rb +0 -88
- data/spec/unit/resource_spec.rb +1 -26
- data/spec/unit/ssl/host_spec.rb +5 -0
- data/spec/unit/ssl/ssl_provider_spec.rb +36 -11
- data/spec/unit/ssl/state_machine_spec.rb +233 -158
- data/spec/unit/transaction_spec.rb +0 -64
- data/spec/unit/type/exec_spec.rb +12 -15
- data/spec/unit/type/file/content_spec.rb +3 -9
- data/spec/unit/type/file/source_spec.rb +4 -4
- data/spec/unit/type/file_spec.rb +15 -11
- data/spec/unit/type/package_spec.rb +0 -5
- data/spec/unit/type/schedule_spec.rb +1 -3
- data/spec/unit/type/service_spec.rb +0 -16
- data/spec/unit/util/execution_spec.rb +0 -16
- data/spec/unit/util/http_proxy_spec.rb +21 -151
- data/spec/unit/util/ldap/manager_spec.rb +0 -15
- data/spec/unit/util/log/destinations_spec.rb +3 -7
- data/spec/unit/util/log_spec.rb +138 -0
- data/spec/unit/util/logging_spec.rb +0 -200
- data/spec/unit/util/pidlock_spec.rb +0 -26
- data/spec/unit/util/skip_tags_spec.rb +14 -0
- data/spec/unit/util/windows/adsi_spec.rb +0 -51
- data/spec/unit/util/windows/service_spec.rb +0 -9
- data/spec/unit/util_spec.rb +10 -0
- data/spec/unit/x509/cert_provider_spec.rb +82 -43
- data/tasks/generate_cert_fixtures.rake +13 -1
- data/tasks/manpages.rake +0 -1
- metadata +28 -22
- data/ext/cert_inspector +0 -140
- data/ext/envpuppet +0 -139
- data/ext/envpuppet.bat +0 -14
- data/ext/puppet-test +0 -476
- data/ext/pure_ruby_dsl/dsl_test.rb +0 -7
- data/ext/upload_facts.rb +0 -119
- data/lib/puppet/provider/package/dnfmodule.rb +0 -87
- data/spec/fixtures/unit/provider/package/dnfmodule/dnf-module-list-installed.txt +0 -11
- data/spec/integration/type/notify_spec.rb +0 -46
- data/spec/unit/provider/package/dnfmodule_spec.rb +0 -186
- data/spec/unit/provider/package_targetable_spec.rb +0 -60
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8ca2d51059fc5a472a81d48065a2d2a722ed3a312e3f6e4cc2e86583c8b82fd
|
4
|
+
data.tar.gz: f1263a9b05c8ee69dfbb9db1cf255fc8771143ba882e54acc1d82aed17a4956f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f3235066b08076b626e312f516e19c0c1d3daf43b8fb45af672a96d6e2b296aa29c6d551cb5cb04ecb9702fa555db08719e42881a057af8ad3c8d37f2d0dff0
|
7
|
+
data.tar.gz: 166ecacc0140a26036d9b54fdeaae536636463db5dd97c884fed2a9267f92eb4abed2fabca287abc1baea068d3df869972007c00bd166769f4063a8e09db38f9
|
data/CODEOWNERS
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# default to platform-core
|
2
|
-
* @puppetlabs/platform-core
|
2
|
+
* @puppetlabs/platform-core
|
3
3
|
|
4
|
-
#
|
5
|
-
/lib/puppet/type/group @puppetlabs/
|
6
|
-
/lib/puppet/type/package @puppetlabs/
|
7
|
-
/lib/puppet/type/service @puppetlabs/
|
8
|
-
/lib/puppet/type/user @puppetlabs/
|
9
|
-
/lib/puppet/provider/group @puppetlabs/
|
10
|
-
/lib/puppet/provider/package @puppetlabs/
|
11
|
-
/lib/puppet/provider/service @puppetlabs/
|
12
|
-
/lib/puppet/provider/user @puppetlabs/
|
4
|
+
# platform-os
|
5
|
+
/lib/puppet/type/group @puppetlabs/platform-os
|
6
|
+
/lib/puppet/type/package @puppetlabs/platform-os
|
7
|
+
/lib/puppet/type/service @puppetlabs/platform-os
|
8
|
+
/lib/puppet/type/user @puppetlabs/platform-os
|
9
|
+
/lib/puppet/provider/group @puppetlabs/platform-os
|
10
|
+
/lib/puppet/provider/package @puppetlabs/platform-os
|
11
|
+
/lib/puppet/provider/service @puppetlabs/platform-os
|
12
|
+
/lib/puppet/provider/user @puppetlabs/platform-os
|
13
13
|
|
14
14
|
# language
|
15
15
|
/lib/puppet/datatypes @puppetlabs/language
|
data/Gemfile
CHANGED
@@ -20,11 +20,11 @@ gem "puppet-resource_api", *location_for(ENV['RESOURCE_API_LOCATION'] || ["~> 1.
|
|
20
20
|
|
21
21
|
group(:features) do
|
22
22
|
gem 'diff-lcs', '~> 1.3', require: false
|
23
|
-
gem 'hiera-eyaml',
|
23
|
+
gem 'hiera-eyaml', require: false
|
24
24
|
gem 'hocon', '~> 1.0', require: false
|
25
25
|
# requires native libshadow headers/libs
|
26
|
-
#gem '
|
27
|
-
gem 'minitar', '~> 0.
|
26
|
+
# gem 'libshadow', '~> 1.0', require: false, platforms: [:ruby]
|
27
|
+
gem 'minitar', '~> 0.6', require: false
|
28
28
|
gem 'msgpack', '~> 1.2', require: false
|
29
29
|
gem 'rdoc', '~> 6.0', require: false, platforms: [:ruby]
|
30
30
|
# requires native augeas headers/libs
|
@@ -40,8 +40,8 @@ group(:test) do
|
|
40
40
|
gem "rspec", "~> 3.1", require: false
|
41
41
|
gem "rspec-its", "~> 1.1", require: false
|
42
42
|
gem "rspec-collection_matchers", "~> 1.1", require: false
|
43
|
-
gem 'vcr', '~>
|
44
|
-
gem 'webmock', '~>
|
43
|
+
gem 'vcr', '~> 2.9', require: false
|
44
|
+
gem 'webmock', '~> 1.24', require: false
|
45
45
|
gem 'yard', require: false
|
46
46
|
|
47
47
|
gem 'rubocop', '~> 0.49', require: false, platforms: [:ruby]
|
@@ -66,7 +66,7 @@ group(:documentation) do
|
|
66
66
|
gem 'ronn', '~> 0.7.3', require: false, platforms: [:ruby]
|
67
67
|
end
|
68
68
|
|
69
|
-
if File.
|
69
|
+
if File.exists? "#{__FILE__}.local"
|
70
70
|
eval(File.read("#{__FILE__}.local"), binding)
|
71
71
|
end
|
72
72
|
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
puppet (6.
|
4
|
+
puppet (6.5.0)
|
5
5
|
CFPropertyList (~> 2.2)
|
6
6
|
facter (>= 2.4.0, < 4)
|
7
|
-
fast_gettext (~> 1.1
|
7
|
+
fast_gettext (~> 1.1)
|
8
8
|
hiera (>= 3.2.1, < 4)
|
9
9
|
httpclient (~> 2.8)
|
10
10
|
locale (~> 2.1)
|
@@ -15,91 +15,85 @@ GEM
|
|
15
15
|
remote: https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems/
|
16
16
|
specs:
|
17
17
|
CFPropertyList (2.3.6)
|
18
|
-
addressable (2.
|
19
|
-
public_suffix (>= 2.0.2, <
|
18
|
+
addressable (2.6.0)
|
19
|
+
public_suffix (>= 2.0.2, < 4.0)
|
20
20
|
artifactory (2.8.2)
|
21
21
|
ast (2.4.0)
|
22
22
|
coderay (1.1.2)
|
23
23
|
crack (0.4.3)
|
24
24
|
safe_yaml (~> 1.0.0)
|
25
|
-
csv (3.1.2)
|
26
25
|
diff-lcs (1.3)
|
27
|
-
|
28
|
-
facter (2.5.6)
|
26
|
+
facter (2.5.1)
|
29
27
|
fast_gettext (1.1.2)
|
30
28
|
gettext (3.2.9)
|
31
29
|
locale (>= 2.0.5)
|
32
30
|
text (>= 1.3.0)
|
33
|
-
gettext-setup (0.
|
31
|
+
gettext-setup (0.30)
|
34
32
|
fast_gettext (~> 1.1.0)
|
35
|
-
gettext (>= 3.0.2
|
33
|
+
gettext (>= 3.0.2)
|
36
34
|
locale
|
37
|
-
hashdiff (
|
38
|
-
hiera (3.
|
39
|
-
hiera-eyaml (3.
|
35
|
+
hashdiff (0.4.0)
|
36
|
+
hiera (3.5.0)
|
37
|
+
hiera-eyaml (3.0.0)
|
40
38
|
highline (~> 1.6.19)
|
41
39
|
optimist
|
42
40
|
highline (1.6.21)
|
43
|
-
hocon (1.
|
41
|
+
hocon (1.2.5)
|
44
42
|
hpricot (0.8.6)
|
45
43
|
httpclient (2.8.3)
|
46
44
|
json-schema (2.8.1)
|
47
45
|
addressable (>= 2.4)
|
48
46
|
locale (2.1.2)
|
49
|
-
memory_profiler (0.9.
|
47
|
+
memory_profiler (0.9.13)
|
50
48
|
method_source (0.9.2)
|
51
|
-
minitar (0.
|
52
|
-
msgpack (1.
|
53
|
-
multi_json (1.
|
54
|
-
mustache (1.1.
|
49
|
+
minitar (0.8)
|
50
|
+
msgpack (1.2.10)
|
51
|
+
multi_json (1.13.1)
|
52
|
+
mustache (1.1.0)
|
55
53
|
optimist (3.0.0)
|
56
|
-
packaging (0.99.
|
54
|
+
packaging (0.99.35)
|
57
55
|
artifactory (~> 2)
|
58
|
-
rake (
|
59
|
-
|
60
|
-
|
61
|
-
parser (2.7.0.2)
|
56
|
+
rake (~> 12.3)
|
57
|
+
parallel (1.17.0)
|
58
|
+
parser (2.6.3.0)
|
62
59
|
ast (~> 2.4.0)
|
63
60
|
powerpack (0.1.2)
|
64
61
|
pry (0.12.2)
|
65
62
|
coderay (~> 1.1.0)
|
66
63
|
method_source (~> 0.9.0)
|
67
|
-
public_suffix (
|
68
|
-
puppet-resource_api (1.8.
|
64
|
+
public_suffix (3.1.0)
|
65
|
+
puppet-resource_api (1.8.3)
|
69
66
|
hocon (>= 1.0)
|
70
|
-
puppetserver-ca (1.
|
67
|
+
puppetserver-ca (1.3.1)
|
71
68
|
facter (>= 2.0.1, < 4)
|
72
69
|
racc (1.4.9)
|
73
70
|
rainbow (2.2.2)
|
74
71
|
rake
|
75
|
-
rake (12.3.
|
72
|
+
rake (12.3.2)
|
76
73
|
rdiscount (2.2.0.1)
|
77
|
-
rdoc (6.
|
78
|
-
release-metrics (1.1.0)
|
79
|
-
csv
|
80
|
-
docopt
|
74
|
+
rdoc (6.1.1)
|
81
75
|
ronn (0.7.3)
|
82
76
|
hpricot (>= 0.8.2)
|
83
77
|
mustache (>= 0.7.0)
|
84
78
|
rdiscount (>= 1.5.8)
|
85
|
-
rspec (3.
|
86
|
-
rspec-core (~> 3.
|
87
|
-
rspec-expectations (~> 3.
|
88
|
-
rspec-mocks (~> 3.
|
89
|
-
rspec-collection_matchers (1.
|
79
|
+
rspec (3.8.0)
|
80
|
+
rspec-core (~> 3.8.0)
|
81
|
+
rspec-expectations (~> 3.8.0)
|
82
|
+
rspec-mocks (~> 3.8.0)
|
83
|
+
rspec-collection_matchers (1.1.3)
|
90
84
|
rspec-expectations (>= 2.99.0.beta1)
|
91
|
-
rspec-core (3.
|
92
|
-
rspec-support (~> 3.
|
93
|
-
rspec-expectations (3.
|
85
|
+
rspec-core (3.8.1)
|
86
|
+
rspec-support (~> 3.8.0)
|
87
|
+
rspec-expectations (3.8.4)
|
94
88
|
diff-lcs (>= 1.2.0, < 2.0)
|
95
|
-
rspec-support (~> 3.
|
89
|
+
rspec-support (~> 3.8.0)
|
96
90
|
rspec-its (1.3.0)
|
97
91
|
rspec-core (>= 3.0.0)
|
98
92
|
rspec-expectations (>= 3.0.0)
|
99
|
-
rspec-mocks (3.
|
93
|
+
rspec-mocks (3.8.1)
|
100
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
101
|
-
rspec-support (~> 3.
|
102
|
-
rspec-support (3.
|
95
|
+
rspec-support (~> 3.8.0)
|
96
|
+
rspec-support (3.8.2)
|
103
97
|
rubocop (0.49.1)
|
104
98
|
parallel (~> 1.10)
|
105
99
|
parser (>= 2.3.3.1, < 3.0)
|
@@ -109,18 +103,18 @@ GEM
|
|
109
103
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
110
104
|
rubocop-i18n (1.2.0)
|
111
105
|
rubocop (~> 0.49.0)
|
112
|
-
ruby-prof (
|
106
|
+
ruby-prof (0.18.0)
|
113
107
|
ruby-progressbar (1.10.1)
|
114
108
|
safe_yaml (1.0.5)
|
115
109
|
semantic_puppet (1.0.2)
|
116
110
|
text (1.3.1)
|
117
111
|
unicode-display_width (1.6.0)
|
118
|
-
vcr (
|
119
|
-
webmock (
|
112
|
+
vcr (2.9.3)
|
113
|
+
webmock (1.24.6)
|
120
114
|
addressable (>= 2.3.6)
|
121
115
|
crack (>= 0.3.2)
|
122
|
-
hashdiff
|
123
|
-
yard (0.9.
|
116
|
+
hashdiff
|
117
|
+
yard (0.9.19)
|
124
118
|
|
125
119
|
PLATFORMS
|
126
120
|
ruby
|
@@ -132,7 +126,7 @@ DEPENDENCIES
|
|
132
126
|
hocon (~> 1.0)
|
133
127
|
json-schema (~> 2.0)
|
134
128
|
memory_profiler
|
135
|
-
minitar (~> 0.
|
129
|
+
minitar (~> 0.6)
|
136
130
|
msgpack (~> 1.2)
|
137
131
|
packaging (~> 0.99)
|
138
132
|
pry
|
@@ -150,9 +144,9 @@ DEPENDENCIES
|
|
150
144
|
rubocop-i18n (~> 1.2.0)
|
151
145
|
ruby-prof (>= 0.16.0)
|
152
146
|
semantic_puppet (~> 1.0)
|
153
|
-
vcr (~>
|
154
|
-
webmock (~>
|
147
|
+
vcr (~> 2.9)
|
148
|
+
webmock (~> 1.24)
|
155
149
|
yard
|
156
150
|
|
157
151
|
BUNDLED WITH
|
158
|
-
1.
|
152
|
+
1.16.5
|
data/ext/build_defaults.yaml
CHANGED
data/ext/project_data.yaml
CHANGED
@@ -20,7 +20,7 @@ gem_runtime_dependencies:
|
|
20
20
|
facter: ['> 2.0.1', '< 4']
|
21
21
|
hiera: ['>= 3.2.1', '< 4']
|
22
22
|
semantic_puppet: '~> 1.0'
|
23
|
-
fast_gettext: '~> 1.1
|
23
|
+
fast_gettext: '~> 1.1'
|
24
24
|
locale: '~> 2.1'
|
25
25
|
multi_json: '~> 1.10'
|
26
26
|
httpclient: '~> 2.8'
|
@@ -44,7 +44,7 @@ gem_platform_dependencies:
|
|
44
44
|
# Use of win32-security is deprecated
|
45
45
|
win32-security: '= 0.2.5'
|
46
46
|
win32-service: '= 0.8.8'
|
47
|
-
minitar: '~> 0.
|
47
|
+
minitar: '~> 0.6.1'
|
48
48
|
x64-mingw32:
|
49
49
|
gem_runtime_dependencies:
|
50
50
|
ffi: '~> 1.9.25'
|
@@ -54,7 +54,7 @@ gem_platform_dependencies:
|
|
54
54
|
# Use of win32-security is deprecated
|
55
55
|
win32-security: '= 0.2.5'
|
56
56
|
win32-service: '= 0.8.8'
|
57
|
-
minitar: '~> 0.
|
57
|
+
minitar: '~> 0.6.1'
|
58
58
|
bundle_platforms:
|
59
59
|
universal-darwin: all
|
60
60
|
x86-mingw32: mingw
|
@@ -159,7 +159,7 @@ class ExternalNode
|
|
159
159
|
log("list of patterns for #{filepath}: #{patternlist}")
|
160
160
|
|
161
161
|
if matchthis =~ Regexp.union(patternlist)
|
162
|
-
log("matched #{
|
162
|
+
log("matched #{$~.to_s} in #{matchthis}, returning true")
|
163
163
|
return true
|
164
164
|
|
165
165
|
else # hostname didn't match anything in patternlist
|
@@ -181,7 +181,7 @@ class ExternalNode
|
|
181
181
|
log("Attempting to match [#{@hostname}] in [#{filepath}]")
|
182
182
|
if matched_in_patternfile?(filepath,@hostname)
|
183
183
|
@classes << patternfile.to_s
|
184
|
-
log("Appended #{patternfile} to classes instance variable")
|
184
|
+
log("Appended #{patternfile.to_s} to classes instance variable")
|
185
185
|
end
|
186
186
|
end
|
187
187
|
end
|
@@ -198,7 +198,7 @@ class ExternalNode
|
|
198
198
|
log("Attempting to match [#{@hostname}] in [#{filepath}]")
|
199
199
|
if matched_in_patternfile?(filepath,@hostname)
|
200
200
|
@environment = patternfile.to_s
|
201
|
-
log("Wrote #{patternfile} to environment instance variable")
|
201
|
+
log("Wrote #{patternfile.to_s} to environment instance variable")
|
202
202
|
end
|
203
203
|
end
|
204
204
|
end
|
@@ -230,7 +230,7 @@ class ExternalNode
|
|
230
230
|
log("Attempting to match [#{@hostname}] in [#{secondlevel}]")
|
231
231
|
if matched_in_patternfile?(secondlevel, @hostname)
|
232
232
|
@parameters[ parametername.to_s ] = patternfile.to_s
|
233
|
-
log("Set @parameters[#{parametername}] = #{patternfile}")
|
233
|
+
log("Set @parameters[#{parametername.to_s}] = #{patternfile.to_s}")
|
234
234
|
end
|
235
235
|
end
|
236
236
|
end
|
data/ext/solaris/smf/puppet.xml
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'fileutils'
|
4
|
+
require 'rbconfig'
|
5
|
+
|
6
|
+
BASENAME = "puppetres"
|
7
|
+
|
8
|
+
task :default do
|
9
|
+
sh 'rake -T'
|
10
|
+
end
|
11
|
+
|
12
|
+
desc 'Build puppet eventlog message dll'
|
13
|
+
task :dist => ['out', "#{BASENAME}.dll"]
|
14
|
+
|
15
|
+
directory 'out'
|
16
|
+
|
17
|
+
rule '.rc' => '.mc' do |t|
|
18
|
+
sh "mc -b -r out -h out #{t.source}"
|
19
|
+
end
|
20
|
+
|
21
|
+
rule '.res' => '.rc' do |t|
|
22
|
+
sh "rc -nologo -r -fo out/#{t.name} out/#{t.source}"
|
23
|
+
end
|
24
|
+
|
25
|
+
rule '.dll' => '.res' do |t|
|
26
|
+
sh "link -nologo -dll -noentry -machine:x86 -out:out/#{t.name} out/#{t.source}"
|
27
|
+
end
|
28
|
+
|
29
|
+
desc 'Delete generated files'
|
30
|
+
task :clean do
|
31
|
+
FileUtils.rm_rf('out')
|
32
|
+
end
|
Binary file
|
@@ -15,7 +15,6 @@ class WindowsDaemon < Win32::Daemon
|
|
15
15
|
|
16
16
|
@run_thread = nil
|
17
17
|
@LOG_TO_FILE = false
|
18
|
-
@loglevel = 0
|
19
18
|
LOG_FILE = File.expand_path(File.join(Dir::COMMON_APPDATA, 'PuppetLabs', 'puppet', 'var', 'log', 'windows.log'))
|
20
19
|
LEVELS = [:debug, :info, :notice, :warning, :err, :alert, :emerg, :crit]
|
21
20
|
LEVELS.each do |level|
|
@@ -38,9 +37,7 @@ class WindowsDaemon < Win32::Daemon
|
|
38
37
|
FileUtils.mkdir_p(File.dirname(LOG_FILE))
|
39
38
|
args = args.gsub("--logtofile","")
|
40
39
|
end
|
41
|
-
|
42
|
-
base_dir = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
43
|
-
load_env(base_dir)
|
40
|
+
basedir = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
44
41
|
|
45
42
|
# The puppet installer registers a 'Puppet' event source. For the moment events will be logged with this key, but
|
46
43
|
# it may be a good idea to split the Service and Puppet events later so it's easier to read in the windows Event Log.
|
@@ -57,29 +54,25 @@ class WindowsDaemon < Win32::Daemon
|
|
57
54
|
# )
|
58
55
|
# end
|
59
56
|
|
60
|
-
puppet = File.join(
|
61
|
-
|
62
|
-
ruby_puppet_cmd = "\"#{ruby}\" \"#{puppet}\""
|
63
|
-
|
64
|
-
unless File.exist?(puppet)
|
57
|
+
puppet = File.join(basedir, 'bin', 'puppet.bat')
|
58
|
+
unless File.exists?(puppet)
|
65
59
|
log_err("File not found: '#{puppet}'")
|
66
60
|
return
|
67
61
|
end
|
68
62
|
log_debug("Using '#{puppet}'")
|
69
63
|
|
70
64
|
cmdline_debug = argsv.index('--debug') ? :debug : nil
|
71
|
-
@loglevel = parse_log_level(
|
65
|
+
@loglevel = parse_log_level(puppet, cmdline_debug)
|
72
66
|
log_notice('Service started')
|
73
67
|
|
74
68
|
service = self
|
75
69
|
@run_thread = Thread.new do
|
76
70
|
begin
|
77
71
|
while service.running? do
|
78
|
-
runinterval = service.parse_runinterval(
|
79
|
-
|
72
|
+
runinterval = service.parse_runinterval(puppet)
|
80
73
|
if service.state == RUNNING or service.state == IDLE
|
81
74
|
service.log_notice("Executing agent with arguments: #{args}")
|
82
|
-
pid = Process.create(:command_line => "#{
|
75
|
+
pid = Process.create(:command_line => "\"#{puppet}\" agent --onetime #{args}", :creation_flags => CREATE_NEW_CONSOLE).process_id
|
83
76
|
service.log_debug("Process created: #{pid}")
|
84
77
|
else
|
85
78
|
service.log_debug("Service is paused. Not invoking Puppet agent")
|
@@ -160,7 +153,7 @@ class WindowsDaemon < Win32::Daemon
|
|
160
153
|
|
161
154
|
def parse_runinterval(puppet_path)
|
162
155
|
begin
|
163
|
-
runinterval = %x{ #{puppet_path} agent --configprint runinterval }.to_i
|
156
|
+
runinterval = %x{ "#{puppet_path}" agent --configprint runinterval }.to_i
|
164
157
|
if runinterval == 0
|
165
158
|
runinterval = 1800
|
166
159
|
log_err("Failed to determine runinterval, defaulting to #{runinterval} seconds")
|
@@ -175,7 +168,7 @@ class WindowsDaemon < Win32::Daemon
|
|
175
168
|
|
176
169
|
def parse_log_level(puppet_path,cmdline_debug)
|
177
170
|
begin
|
178
|
-
loglevel = %x{ #{puppet_path} agent --configprint log_level}.chomp
|
171
|
+
loglevel = %x{ "#{puppet_path}" agent --configprint log_level}.chomp
|
179
172
|
unless loglevel
|
180
173
|
loglevel = :notice
|
181
174
|
log_err("Failed to determine loglevel, defaulting to #{loglevel}")
|
@@ -187,29 +180,6 @@ class WindowsDaemon < Win32::Daemon
|
|
187
180
|
|
188
181
|
LEVELS.index(cmdline_debug ? cmdline_debug : loglevel.to_sym)
|
189
182
|
end
|
190
|
-
|
191
|
-
private
|
192
|
-
|
193
|
-
def load_env(base_dir)
|
194
|
-
begin
|
195
|
-
# ENV that uses backward slashes
|
196
|
-
ENV['FACTER_env_windows_installdir'] = base_dir.tr('/', '\\')
|
197
|
-
ENV['PL_BASEDIR'] = base_dir.tr('/', '\\')
|
198
|
-
ENV['PUPPET_DIR'] = File.join(base_dir, 'puppet').tr('/', '\\')
|
199
|
-
ENV['OPENSSL_CONF'] = File.join(base_dir, 'puppet', 'ssl', 'openssl.cnf').tr('/', '\\')
|
200
|
-
ENV['SSL_CERT_DIR'] = File.join(base_dir, 'puppet', 'ssl', 'certs').tr('/', '\\')
|
201
|
-
ENV['SSL_CERT_FILE'] = File.join(base_dir, 'puppet', 'ssl', 'cert.pem').tr('/', '\\')
|
202
|
-
ENV['Path'] = [
|
203
|
-
File.join(base_dir, 'puppet', 'bin'),
|
204
|
-
File.join(base_dir, 'bin'),
|
205
|
-
].join(';').tr('/', '\\') + ';' + ENV['Path']
|
206
|
-
|
207
|
-
# ENV that uses forward slashes
|
208
|
-
ENV['RUBYLIB'] = "#{File.join(base_dir, 'puppet','lib')};#{ENV['RUBYLIB']}"
|
209
|
-
rescue => e
|
210
|
-
log_exception(e)
|
211
|
-
end
|
212
|
-
end
|
213
183
|
end
|
214
184
|
|
215
185
|
if __FILE__ == $0
|