puppet 6.19.1-x64-mingw32 → 6.23.0-x64-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 +2 -16
- data/Gemfile +3 -1
- data/Gemfile.lock +51 -40
- data/ext/osx/puppet.plist +2 -0
- data/ext/project_data.yaml +2 -2
- data/lib/puppet/application.rb +10 -6
- data/lib/puppet/application/agent.rb +12 -4
- data/lib/puppet/application/apply.rb +4 -2
- data/lib/puppet/application/device.rb +2 -0
- data/lib/puppet/application/filebucket.rb +2 -2
- data/lib/puppet/application/resource.rb +2 -1
- data/lib/puppet/application/script.rb +2 -0
- data/lib/puppet/application/ssl.rb +11 -0
- data/lib/puppet/application_support.rb +7 -0
- data/lib/puppet/configurer.rb +28 -18
- data/lib/puppet/configurer/downloader.rb +2 -1
- data/lib/puppet/defaults.rb +51 -23
- data/lib/puppet/environments.rb +54 -55
- data/lib/puppet/face/config.rb +10 -0
- data/lib/puppet/face/epp.rb +12 -2
- data/lib/puppet/face/facts.rb +158 -0
- data/lib/puppet/ffi/posix.rb +10 -0
- data/lib/puppet/ffi/posix/constants.rb +14 -0
- data/lib/puppet/ffi/posix/functions.rb +24 -0
- data/lib/puppet/file_serving/fileset.rb +14 -2
- data/lib/puppet/file_system/memory_file.rb +8 -1
- data/lib/puppet/file_system/windows.rb +2 -0
- data/lib/puppet/functions/all.rb +1 -1
- data/lib/puppet/functions/camelcase.rb +1 -1
- data/lib/puppet/functions/capitalize.rb +2 -2
- data/lib/puppet/functions/downcase.rb +2 -2
- data/lib/puppet/functions/epp.rb +1 -0
- data/lib/puppet/functions/get.rb +5 -5
- data/lib/puppet/functions/group_by.rb +13 -5
- data/lib/puppet/functions/inline_epp.rb +1 -0
- data/lib/puppet/functions/lest.rb +1 -1
- data/lib/puppet/functions/new.rb +100 -100
- data/lib/puppet/functions/partition.rb +12 -4
- data/lib/puppet/functions/require.rb +5 -5
- data/lib/puppet/functions/sort.rb +3 -3
- data/lib/puppet/functions/tree_each.rb +7 -9
- data/lib/puppet/functions/type.rb +4 -4
- data/lib/puppet/functions/upcase.rb +2 -2
- data/lib/puppet/http/resolver/server_list.rb +15 -4
- data/lib/puppet/http/service/compiler.rb +69 -0
- data/lib/puppet/http/service/file_server.rb +2 -1
- data/lib/puppet/indirector/catalog/compiler.rb +1 -0
- data/lib/puppet/indirector/fact_search.rb +60 -0
- data/lib/puppet/indirector/facts/facter.rb +24 -3
- data/lib/puppet/indirector/facts/json.rb +27 -0
- data/lib/puppet/indirector/facts/yaml.rb +3 -58
- data/lib/puppet/indirector/file_metadata/rest.rb +1 -0
- data/lib/puppet/indirector/json.rb +5 -1
- data/lib/puppet/indirector/node/json.rb +8 -0
- data/lib/puppet/indirector/report/json.rb +34 -0
- data/lib/puppet/module_tool/applications/installer.rb +48 -2
- data/lib/puppet/module_tool/errors/shared.rb +17 -2
- data/lib/puppet/network/formats.rb +69 -1
- data/lib/puppet/network/http/factory.rb +4 -0
- data/lib/puppet/pal/pal_impl.rb +70 -17
- data/lib/puppet/parser/ast/leaf.rb +3 -2
- data/lib/puppet/parser/functions/fqdn_rand.rb +14 -6
- data/lib/puppet/parser/templatewrapper.rb +1 -1
- data/lib/puppet/pops/evaluator/deferred_resolver.rb +5 -3
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +22 -3
- data/lib/puppet/pops/model/ast_transformer.rb +1 -1
- data/lib/puppet/pops/types/p_sem_ver_type.rb +8 -2
- data/lib/puppet/pops/types/p_sensitive_type.rb +10 -0
- data/lib/puppet/property/list.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +13 -8
- data/lib/puppet/provider/package/apt.rb +34 -2
- data/lib/puppet/provider/package/aptitude.rb +6 -0
- data/lib/puppet/provider/package/dnfmodule.rb +1 -1
- data/lib/puppet/provider/package/nim.rb +11 -6
- data/lib/puppet/provider/service/debian.rb +2 -0
- data/lib/puppet/provider/service/systemd.rb +14 -4
- data/lib/puppet/provider/service/windows.rb +38 -0
- data/lib/puppet/provider/user/aix.rb +2 -2
- data/lib/puppet/provider/user/directoryservice.rb +25 -12
- data/lib/puppet/provider/user/useradd.rb +62 -8
- data/lib/puppet/reference/configuration.rb +7 -6
- data/lib/puppet/settings.rb +33 -28
- data/lib/puppet/settings/alias_setting.rb +37 -0
- data/lib/puppet/settings/base_setting.rb +26 -2
- data/lib/puppet/settings/environment_conf.rb +1 -0
- data/lib/puppet/transaction/additional_resource_generator.rb +1 -1
- data/lib/puppet/type/file.rb +19 -1
- data/lib/puppet/type/file/selcontext.rb +1 -1
- data/lib/puppet/type/package.rb +3 -3
- data/lib/puppet/type/service.rb +18 -38
- data/lib/puppet/type/tidy.rb +21 -2
- data/lib/puppet/type/user.rb +38 -20
- data/lib/puppet/util/autoload.rb +1 -8
- data/lib/puppet/util/fact_dif.rb +81 -0
- data/lib/puppet/util/monkey_patches.rb +7 -0
- data/lib/puppet/util/posix.rb +54 -5
- data/lib/puppet/util/rubygems.rb +5 -1
- data/lib/puppet/util/selinux.rb +30 -4
- data/lib/puppet/util/windows/adsi.rb +46 -0
- data/lib/puppet/util/windows/api_types.rb +1 -1
- data/lib/puppet/util/windows/principal.rb +9 -2
- data/lib/puppet/util/windows/service.rb +1 -1
- data/lib/puppet/util/windows/sid.rb +4 -2
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +372 -288
- data/man/man5/puppet.conf.5 +282 -254
- data/man/man8/puppet-agent.8 +2 -2
- data/man/man8/puppet-apply.8 +2 -2
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +2 -2
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +90 -1
- data/man/man8/puppet-filebucket.8 +3 -3
- 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 +4 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +4 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +2 -2
- data/man/man8/puppet-ssl.8 +5 -1
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/integration/application/agent/cached_deferred_catalog.json +91 -0
- data/spec/fixtures/ssl/127.0.0.1-key.pem +107 -57
- data/spec/fixtures/ssl/127.0.0.1.pem +52 -31
- data/spec/fixtures/ssl/bad-basic-constraints.pem +57 -35
- data/spec/fixtures/ssl/bad-int-basic-constraints.pem +57 -35
- data/spec/fixtures/ssl/ca.pem +57 -35
- data/spec/fixtures/ssl/crl.pem +28 -18
- data/spec/fixtures/ssl/ec-key.pem +11 -11
- data/spec/fixtures/ssl/ec.pem +33 -24
- data/spec/fixtures/ssl/encrypted-ec-key.pem +12 -12
- data/spec/fixtures/ssl/encrypted-key.pem +108 -58
- data/spec/fixtures/ssl/intermediate-agent-crl.pem +28 -19
- data/spec/fixtures/ssl/intermediate-agent.pem +57 -36
- data/spec/fixtures/ssl/intermediate-crl.pem +31 -21
- data/spec/fixtures/ssl/intermediate.pem +57 -36
- data/spec/fixtures/ssl/pluto-key.pem +107 -57
- data/spec/fixtures/ssl/pluto.pem +52 -30
- data/spec/fixtures/ssl/request-key.pem +107 -57
- data/spec/fixtures/ssl/request.pem +47 -26
- data/spec/fixtures/ssl/revoked-key.pem +107 -57
- data/spec/fixtures/ssl/revoked.pem +52 -30
- data/spec/fixtures/ssl/signed-key.pem +107 -57
- data/spec/fixtures/ssl/signed.pem +52 -30
- data/spec/fixtures/ssl/tampered-cert.pem +52 -30
- data/spec/fixtures/ssl/tampered-csr.pem +47 -26
- data/spec/fixtures/ssl/unknown-127.0.0.1-key.pem +107 -57
- data/spec/fixtures/ssl/unknown-127.0.0.1.pem +50 -29
- data/spec/fixtures/ssl/unknown-ca-key.pem +107 -57
- data/spec/fixtures/ssl/unknown-ca.pem +55 -33
- data/spec/fixtures/unit/provider/service/systemd/list_unit_files_services_vendor_preset +9 -0
- data/spec/fixtures/unit/provider/user/aix/aix_passwd_file.out +4 -0
- data/spec/integration/application/agent_spec.rb +160 -3
- data/spec/integration/application/apply_spec.rb +19 -0
- data/spec/integration/application/plugin_spec.rb +1 -1
- data/spec/integration/application/resource_spec.rb +30 -0
- data/spec/integration/defaults_spec.rb +0 -7
- data/spec/integration/environments/setting_hooks_spec.rb +1 -1
- data/spec/integration/http/client_spec.rb +12 -0
- data/spec/integration/indirector/direct_file_server_spec.rb +1 -3
- data/spec/integration/resource/type_collection_spec.rb +2 -6
- data/spec/integration/transaction_spec.rb +4 -9
- data/spec/integration/util/windows/adsi_spec.rb +21 -1
- data/spec/integration/util/windows/principal_spec.rb +21 -0
- data/spec/integration/util/windows/registry_spec.rb +6 -10
- data/spec/lib/puppet/test_ca.rb +2 -2
- data/spec/lib/puppet_spec/settings.rb +6 -1
- data/spec/spec_helper.rb +12 -5
- data/spec/unit/agent_spec.rb +8 -6
- data/spec/unit/application/agent_spec.rb +7 -3
- data/spec/unit/application/config_spec.rb +224 -4
- data/spec/unit/application/facts_spec.rb +482 -3
- data/spec/unit/application/filebucket_spec.rb +0 -2
- data/spec/unit/application/ssl_spec.rb +23 -0
- data/spec/unit/application_spec.rb +51 -9
- data/spec/unit/configurer/downloader_spec.rb +6 -0
- data/spec/unit/configurer_spec.rb +23 -0
- data/spec/unit/confine/feature_spec.rb +1 -1
- data/spec/unit/confine_spec.rb +8 -2
- data/spec/unit/defaults_spec.rb +36 -1
- data/spec/unit/environments_spec.rb +221 -68
- data/spec/unit/face/config_spec.rb +27 -32
- data/spec/unit/face/facts_spec.rb +4 -0
- data/spec/unit/face/node_spec.rb +0 -11
- data/spec/unit/file_serving/configuration/parser_spec.rb +0 -1
- data/spec/unit/file_serving/fileset_spec.rb +60 -0
- data/spec/unit/file_serving/metadata_spec.rb +3 -3
- data/spec/unit/file_serving/terminus_helper_spec.rb +11 -4
- data/spec/unit/file_system_spec.rb +9 -0
- data/spec/unit/forge/module_release_spec.rb +2 -7
- data/spec/unit/functions/inline_epp_spec.rb +26 -1
- data/spec/unit/gettext/config_spec.rb +12 -0
- data/spec/unit/http/service/compiler_spec.rb +172 -0
- data/spec/unit/http/service_spec.rb +1 -1
- data/spec/unit/indirector/catalog/compiler_spec.rb +14 -10
- data/spec/unit/indirector/face_spec.rb +0 -1
- data/spec/unit/indirector/facts/facter_spec.rb +95 -1
- data/spec/unit/indirector/facts/json_spec.rb +255 -0
- data/spec/unit/indirector/file_bucket_file/selector_spec.rb +26 -8
- data/spec/unit/indirector/indirection_spec.rb +8 -12
- data/spec/unit/indirector/key/file_spec.rb +0 -1
- data/spec/unit/indirector/node/json_spec.rb +33 -0
- data/spec/{integration/indirector/report/yaml.rb → unit/indirector/report/json_spec.rb} +13 -24
- data/spec/unit/indirector/report/yaml_spec.rb +72 -8
- data/spec/unit/indirector_spec.rb +2 -2
- data/spec/unit/module_tool/applications/installer_spec.rb +66 -0
- data/spec/unit/network/authconfig_spec.rb +0 -3
- data/spec/unit/network/formats_spec.rb +41 -0
- data/spec/unit/network/http/api/indirected_routes_spec.rb +0 -9
- data/spec/unit/network/http/factory_spec.rb +19 -0
- data/spec/unit/network/http/handler_spec.rb +0 -5
- data/spec/unit/parser/compiler_spec.rb +3 -19
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +15 -1
- data/spec/unit/parser/resource_spec.rb +14 -8
- data/spec/unit/parser/templatewrapper_spec.rb +4 -3
- data/spec/unit/pops/evaluator/deferred_resolver_spec.rb +20 -0
- data/spec/unit/pops/types/p_sem_ver_type_spec.rb +18 -0
- data/spec/unit/pops/types/p_sensitive_type_spec.rb +18 -0
- data/spec/unit/property_spec.rb +1 -0
- data/spec/unit/provider/group/groupadd_spec.rb +5 -2
- data/spec/unit/provider/nameservice_spec.rb +66 -65
- data/spec/unit/provider/package/apt_spec.rb +28 -23
- data/spec/unit/provider/package/aptitude_spec.rb +1 -1
- data/spec/unit/provider/package/base_spec.rb +6 -5
- data/spec/unit/provider/package/dnfmodule_spec.rb +10 -1
- data/spec/unit/provider/package/nim_spec.rb +42 -0
- data/spec/unit/provider/package/pacman_spec.rb +18 -12
- data/spec/unit/provider/package/pip_spec.rb +6 -11
- data/spec/unit/provider/package/pkgdmg_spec.rb +0 -4
- data/spec/unit/provider/service/init_spec.rb +1 -0
- data/spec/unit/provider/service/openwrt_spec.rb +3 -1
- data/spec/unit/provider/service/systemd_spec.rb +53 -8
- data/spec/unit/provider/service/windows_spec.rb +202 -0
- data/spec/unit/provider/user/aix_spec.rb +5 -0
- data/spec/unit/provider/user/directoryservice_spec.rb +67 -35
- data/spec/unit/provider/user/hpux_spec.rb +1 -1
- data/spec/unit/provider/user/pw_spec.rb +2 -0
- data/spec/unit/provider/user/useradd_spec.rb +71 -3
- data/spec/unit/provider_spec.rb +8 -10
- data/spec/unit/puppet_pal_catalog_spec.rb +45 -0
- data/spec/unit/resource/capability_finder_spec.rb +6 -1
- data/spec/unit/resource/catalog_spec.rb +1 -1
- data/spec/unit/resource/type_spec.rb +1 -1
- data/spec/unit/resource_spec.rb +11 -10
- data/spec/unit/settings_spec.rb +419 -242
- data/spec/unit/ssl/base_spec.rb +0 -1
- data/spec/unit/ssl/host_spec.rb +0 -5
- data/spec/unit/ssl/ssl_provider_spec.rb +14 -8
- data/spec/unit/ssl/state_machine_spec.rb +19 -5
- data/spec/unit/transaction/additional_resource_generator_spec.rb +3 -9
- data/spec/unit/transaction/event_manager_spec.rb +14 -11
- data/spec/unit/transaction_spec.rb +18 -11
- data/spec/unit/type/file/content_spec.rb +0 -1
- data/spec/unit/type/file/selinux_spec.rb +3 -5
- data/spec/unit/type/file_spec.rb +0 -6
- data/spec/unit/type/group_spec.rb +13 -6
- data/spec/unit/type/resources_spec.rb +7 -7
- data/spec/unit/type/service_spec.rb +60 -189
- data/spec/unit/type/tidy_spec.rb +17 -8
- data/spec/unit/type/user_spec.rb +45 -0
- data/spec/unit/type_spec.rb +2 -2
- data/spec/unit/util/at_fork_spec.rb +2 -2
- data/spec/unit/util/autoload_spec.rb +5 -1
- data/spec/unit/util/backups_spec.rb +1 -2
- data/spec/unit/util/execution_spec.rb +15 -11
- data/spec/unit/util/inifile_spec.rb +6 -14
- data/spec/unit/util/log_spec.rb +8 -7
- data/spec/unit/util/logging_spec.rb +3 -3
- data/spec/unit/util/posix_spec.rb +363 -15
- data/spec/unit/util/rubygems_spec.rb +2 -2
- data/spec/unit/util/selinux_spec.rb +163 -68
- data/spec/unit/util/storage_spec.rb +3 -1
- data/spec/unit/util/suidmanager_spec.rb +44 -41
- data/spec/unit/util/windows/sid_spec.rb +6 -0
- data/spec/unit/util_spec.rb +13 -6
- data/tasks/generate_cert_fixtures.rake +2 -2
- metadata +33 -16
- data/spec/integration/application/config_spec.rb +0 -74
- data/spec/lib/matchers/include.rb +0 -27
- data/spec/lib/matchers/include_spec.rb +0 -32
- data/spec/unit/face/catalog_spec.rb +0 -6
- data/spec/unit/face/module_spec.rb +0 -3
@@ -6,21 +6,30 @@ Certificate:
|
|
6
6
|
Issuer: CN=Unknown CA
|
7
7
|
Validity
|
8
8
|
Not Before: Jan 1 00:00:00 1970 GMT
|
9
|
-
Not After :
|
9
|
+
Not After : Apr 18 18:46:23 2031 GMT
|
10
10
|
Subject: CN=Unknown CA
|
11
11
|
Subject Public Key Info:
|
12
12
|
Public Key Algorithm: rsaEncryption
|
13
|
-
RSA Public-Key: (
|
13
|
+
RSA Public-Key: (2048 bit)
|
14
14
|
Modulus:
|
15
|
-
00:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
15
|
+
00:ea:16:4c:26:71:56:ac:35:bb:2b:f6:1b:18:58:
|
16
|
+
16:0f:1c:39:3f:4d:02:e4:b2:a7:8b:bd:fe:99:57:
|
17
|
+
f2:a5:a8:15:01:79:0d:1d:f6:d9:12:db:d5:26:a2:
|
18
|
+
f6:58:af:4b:2c:aa:46:7a:53:63:9f:1f:1a:9e:1c:
|
19
|
+
fc:9a:8e:20:c8:c8:c8:db:4d:50:8d:4e:19:83:a1:
|
20
|
+
9d:54:49:26:7b:3a:e0:77:1d:7d:88:01:80:46:32:
|
21
|
+
70:47:16:08:71:de:12:94:67:fd:71:1f:41:56:93:
|
22
|
+
15:91:68:bd:05:3b:67:96:1f:7a:4d:d5:1e:b6:ac:
|
23
|
+
41:1f:f0:ce:d3:2d:96:d9:7c:ad:cd:be:b3:32:66:
|
24
|
+
18:03:2c:83:98:f1:e8:96:6f:85:0f:e1:1f:93:d0:
|
25
|
+
f9:09:43:8c:b1:ea:43:26:32:a5:c6:d2:32:75:2d:
|
26
|
+
ed:72:9d:bf:3a:bb:f3:4e:d0:0c:ac:ba:6b:fd:7f:
|
27
|
+
66:d8:12:40:4e:49:e7:d4:ec:70:03:71:37:cb:5e:
|
28
|
+
cc:d3:4f:f3:d2:cc:e2:39:eb:79:6c:71:e5:d1:0e:
|
29
|
+
45:4c:7a:3d:6f:39:e8:16:e7:de:60:eb:01:e7:80:
|
30
|
+
4e:42:1d:1c:33:0a:eb:f9:10:2c:5c:ed:0c:58:0b:
|
31
|
+
8c:fd:6d:f4:19:49:8a:a2:81:ab:04:b0:cb:7a:61:
|
32
|
+
1f:d3
|
24
33
|
Exponent: 65537 (0x10001)
|
25
34
|
X509v3 extensions:
|
26
35
|
X509v3 Basic Constraints: critical
|
@@ -28,32 +37,45 @@ Certificate:
|
|
28
37
|
X509v3 Key Usage: critical
|
29
38
|
Certificate Sign, CRL Sign
|
30
39
|
X509v3 Subject Key Identifier:
|
31
|
-
|
40
|
+
16:C5:98:B8:84:0B:0A:43:CB:5A:D2:E0:55:C0:64:AB:89:F8:50:FD
|
32
41
|
Netscape Comment:
|
33
42
|
Puppet Server Internal Certificate
|
34
43
|
X509v3 Authority Key Identifier:
|
35
|
-
keyid:
|
44
|
+
keyid:16:C5:98:B8:84:0B:0A:43:CB:5A:D2:E0:55:C0:64:AB:89:F8:50:FD
|
36
45
|
|
37
46
|
Signature Algorithm: sha256WithRSAEncryption
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
47
|
+
7d:0b:a0:2e:d4:fb:6b:29:04:d6:86:4e:89:94:4c:b5:d4:f7:
|
48
|
+
79:5a:38:95:51:9a:80:03:82:93:c8:a7:4e:93:4a:4b:41:1a:
|
49
|
+
85:f3:46:57:e1:70:50:ad:bb:4e:b9:d6:0c:00:e5:9e:4c:f7:
|
50
|
+
26:3b:88:61:27:ad:fa:39:a7:36:e1:62:87:7a:dc:7d:f9:f6:
|
51
|
+
c1:ee:bc:db:f7:65:a1:b0:2a:06:ae:4b:cb:99:82:f5:8e:38:
|
52
|
+
51:ac:c9:92:33:b9:7b:50:8b:c6:72:36:d3:f2:73:7d:58:13:
|
53
|
+
00:21:4d:c6:70:9d:eb:70:58:bf:dc:34:94:7e:bc:ef:17:2d:
|
54
|
+
9d:00:bd:55:f9:48:11:c0:8f:88:ea:a8:7c:5d:fb:88:fd:8c:
|
55
|
+
b4:00:1d:61:a7:4b:2a:90:ef:96:c1:28:2a:a0:95:ad:bb:b3:
|
56
|
+
af:3a:d5:93:1c:54:d7:c5:5b:26:a3:24:87:df:bd:68:74:fa:
|
57
|
+
e6:07:4e:13:b9:5f:54:19:ae:da:00:8c:ca:d6:ff:b7:94:6b:
|
58
|
+
4f:ff:71:ca:2b:7d:ee:7e:32:ff:03:3e:60:a4:30:d4:7d:9c:
|
59
|
+
ab:97:0e:f7:80:ee:69:c0:28:a8:ec:6b:89:05:38:64:34:e8:
|
60
|
+
b2:e9:f3:a1:85:e7:3d:e1:64:3c:86:e4:fd:44:4f:3b:2a:f8:
|
61
|
+
d2:b4:93:22
|
46
62
|
-----BEGIN CERTIFICATE-----
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
63
|
+
MIIDPTCCAiWgAwIBAgIBADANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDDApVbmtu
|
64
|
+
b3duIENBMB4XDTcwMDEwMTAwMDAwMFoXDTMxMDQxODE4NDYyM1owFTETMBEGA1UE
|
65
|
+
AwwKVW5rbm93biBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOoW
|
66
|
+
TCZxVqw1uyv2GxhYFg8cOT9NAuSyp4u9/plX8qWoFQF5DR322RLb1Sai9livSyyq
|
67
|
+
RnpTY58fGp4c/JqOIMjIyNtNUI1OGYOhnVRJJns64HcdfYgBgEYycEcWCHHeEpRn
|
68
|
+
/XEfQVaTFZFovQU7Z5Yfek3VHrasQR/wztMtltl8rc2+szJmGAMsg5jx6JZvhQ/h
|
69
|
+
H5PQ+QlDjLHqQyYypcbSMnUt7XKdvzq7807QDKy6a/1/ZtgSQE5J59TscANxN8te
|
70
|
+
zNNP89LM4jnreWxx5dEORUx6PW856Bbn3mDrAeeATkIdHDMK6/kQLFztDFgLjP1t
|
71
|
+
9BlJiqKBqwSwy3phH9MCAwEAAaOBlzCBlDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud
|
72
|
+
DwEB/wQEAwIBBjAdBgNVHQ4EFgQUFsWYuIQLCkPLWtLgVcBkq4n4UP0wMQYJYIZI
|
73
|
+
AYb4QgENBCQWIlB1cHBldCBTZXJ2ZXIgSW50ZXJuYWwgQ2VydGlmaWNhdGUwHwYD
|
74
|
+
VR0jBBgwFoAUFsWYuIQLCkPLWtLgVcBkq4n4UP0wDQYJKoZIhvcNAQELBQADggEB
|
75
|
+
AH0LoC7U+2spBNaGTomUTLXU93laOJVRmoADgpPIp06TSktBGoXzRlfhcFCtu065
|
76
|
+
1gwA5Z5M9yY7iGEnrfo5pzbhYod63H359sHuvNv3ZaGwKgauS8uZgvWOOFGsyZIz
|
77
|
+
uXtQi8ZyNtPyc31YEwAhTcZwnetwWL/cNJR+vO8XLZ0AvVX5SBHAj4jqqHxd+4j9
|
78
|
+
jLQAHWGnSyqQ75bBKCqgla27s6861ZMcVNfFWyajJIffvWh0+uYHThO5X1QZrtoA
|
79
|
+
jMrW/7eUa0//ccorfe5+Mv8DPmCkMNR9nKuXDveA7mnAKKjsa4kFOGQ06LLp86GF
|
80
|
+
5z3hZDyG5P1ETzsq+NK0kyI=
|
59
81
|
-----END CERTIFICATE-----
|
@@ -0,0 +1,9 @@
|
|
1
|
+
UNIT FILE STATE VENDOR PRESET
|
2
|
+
arp-ethers.service disabled disabled
|
3
|
+
auditd.service enabled enabled
|
4
|
+
dbus.service enabled disabled
|
5
|
+
udev.service enabled-runtime disabled
|
6
|
+
umountfs.service linked-runtime disabled
|
7
|
+
umountnfs.service masked disabled
|
8
|
+
umountroot.service masked-runtime disabled
|
9
|
+
urandom.service indirect enabled
|
@@ -100,10 +100,10 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
context 'rich data' do
|
103
|
-
it "
|
103
|
+
it "calls a deferred 4x function" do
|
104
104
|
catalog_handler = -> (req, res) {
|
105
105
|
catalog = compile_to_catalog(<<-MANIFEST, node)
|
106
|
-
notify { '
|
106
|
+
notify { 'deferred4x':
|
107
107
|
message => Deferred('join', [[1,2,3], ':'])
|
108
108
|
}
|
109
109
|
MANIFEST
|
@@ -118,7 +118,66 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
|
|
118
118
|
agent.command_line.args << '--test'
|
119
119
|
agent.run
|
120
120
|
}.to exit_with(2)
|
121
|
-
.and output(%r{Notice: /Stage\[main\]/Main/Notify\[
|
121
|
+
.and output(%r{Notice: /Stage\[main\]/Main/Notify\[deferred4x\]/message: defined 'message' as '1:2:3'}).to_stdout
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
it "calls a deferred 3x function" do
|
126
|
+
catalog_handler = -> (req, res) {
|
127
|
+
catalog = compile_to_catalog(<<-MANIFEST, node)
|
128
|
+
notify { 'deferred3x':
|
129
|
+
message => Deferred('sprintf', ['%s', 'I am deferred'])
|
130
|
+
}
|
131
|
+
MANIFEST
|
132
|
+
|
133
|
+
res.body = formatter.render(catalog)
|
134
|
+
res['Content-Type'] = formatter.mime
|
135
|
+
}
|
136
|
+
|
137
|
+
server.start_server(mounts: {catalog: catalog_handler}) do |port|
|
138
|
+
Puppet[:serverport] = port
|
139
|
+
expect {
|
140
|
+
agent.command_line.args << '--test'
|
141
|
+
agent.run
|
142
|
+
}.to exit_with(2)
|
143
|
+
.and output(%r{Notice: /Stage\[main\]/Main/Notify\[deferred3x\]/message: defined 'message' as 'I am deferred'}).to_stdout
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
it "re-evaluates a deferred function in a cached catalog" do
|
148
|
+
Puppet[:report] = false
|
149
|
+
Puppet[:use_cached_catalog] = true
|
150
|
+
Puppet[:usecacheonfailure] = false
|
151
|
+
|
152
|
+
catalog_dir = File.join(Puppet[:client_datadir], 'catalog')
|
153
|
+
Puppet::FileSystem.mkpath(catalog_dir)
|
154
|
+
cached_catalog_path = "#{File.join(catalog_dir, Puppet[:certname])}.json"
|
155
|
+
|
156
|
+
# our catalog contains a deferred function that calls `binary_file`
|
157
|
+
# to read `source`. The function returns a Binary object, whose
|
158
|
+
# base64 value is printed to stdout
|
159
|
+
source = tmpfile('deferred_source')
|
160
|
+
catalog = File.read(my_fixture('cached_deferred_catalog.json'))
|
161
|
+
catalog.gsub!('__SOURCE_PATH__', source)
|
162
|
+
File.write(cached_catalog_path, catalog)
|
163
|
+
|
164
|
+
# verify we get a different result each time the deferred function
|
165
|
+
# is evaluated, and reads `source`.
|
166
|
+
{
|
167
|
+
'1234' => 'MTIzNA==',
|
168
|
+
'5678' => 'NTY3OA=='
|
169
|
+
}.each_pair do |content, base64|
|
170
|
+
File.write(source, content)
|
171
|
+
|
172
|
+
expect {
|
173
|
+
agent.command_line.args << '-t'
|
174
|
+
agent.run
|
175
|
+
|
176
|
+
}.to exit_with(2)
|
177
|
+
.and output(/Notice: #{base64}/).to_stdout
|
178
|
+
|
179
|
+
# reset state so we can run again
|
180
|
+
Puppet::Application.clear!
|
122
181
|
end
|
123
182
|
end
|
124
183
|
|
@@ -476,4 +535,102 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
|
|
476
535
|
th.kill # kill thread so we don't wait too much
|
477
536
|
end
|
478
537
|
end
|
538
|
+
|
539
|
+
context 'cached catalogs' do
|
540
|
+
it 'falls back to a cached catalog' do
|
541
|
+
catalog_handler = -> (req, res) {
|
542
|
+
catalog = compile_to_catalog(<<-MANIFEST, node)
|
543
|
+
notify { 'a message': }
|
544
|
+
MANIFEST
|
545
|
+
|
546
|
+
res.body = formatter.render(catalog)
|
547
|
+
res['Content-Type'] = formatter.mime
|
548
|
+
}
|
549
|
+
|
550
|
+
server.start_server(mounts: {catalog: catalog_handler}) do |port|
|
551
|
+
Puppet[:serverport] = port
|
552
|
+
expect {
|
553
|
+
agent.command_line.args << '--test'
|
554
|
+
agent.run
|
555
|
+
}.to exit_with(2)
|
556
|
+
.and output(%r{Caching catalog for #{Puppet[:certname]}}).to_stdout
|
557
|
+
end
|
558
|
+
|
559
|
+
# reset state so we can run again
|
560
|
+
Puppet::Application.clear!
|
561
|
+
|
562
|
+
# --test above turns off `usecacheonfailure` so re-enable here
|
563
|
+
Puppet[:usecacheonfailure] = true
|
564
|
+
|
565
|
+
# run agent without server
|
566
|
+
expect {
|
567
|
+
agent.command_line.args << '--no-daemonize' << '--onetime' << '--server' << '127.0.0.1'
|
568
|
+
agent.run
|
569
|
+
}.to exit_with(2)
|
570
|
+
.and output(a_string_matching(
|
571
|
+
/Using cached catalog from environment 'production'/
|
572
|
+
).and matching(
|
573
|
+
/Notify\[a message\]\/message:/
|
574
|
+
)).to_stdout
|
575
|
+
.and output(/the agent run will continue/).to_stderr
|
576
|
+
end
|
577
|
+
|
578
|
+
it 'preserves the old cached catalog if validation fails with the old one' do
|
579
|
+
catalog_handler = -> (req, res) {
|
580
|
+
catalog = compile_to_catalog(<<-MANIFEST, node)
|
581
|
+
exec { 'unqualified_command': }
|
582
|
+
MANIFEST
|
583
|
+
|
584
|
+
res.body = formatter.render(catalog)
|
585
|
+
res['Content-Type'] = formatter.mime
|
586
|
+
}
|
587
|
+
|
588
|
+
server.start_server(mounts: {catalog: catalog_handler}) do |port|
|
589
|
+
Puppet[:serverport] = port
|
590
|
+
expect {
|
591
|
+
agent.command_line.args << '--test'
|
592
|
+
agent.run
|
593
|
+
}.to exit_with(1)
|
594
|
+
.and output(/Using configured environment/).to_stdout
|
595
|
+
.and output(%r{Validation of Exec\[unqualified_command\] failed: 'unqualified_command' is not qualified and no path was specified}).to_stderr
|
596
|
+
end
|
597
|
+
|
598
|
+
# cached catalog should not be updated
|
599
|
+
cached_catalog = "#{File.join(Puppet[:client_datadir], 'catalog', Puppet[:certname])}.json"
|
600
|
+
expect(File).to_not be_exist(cached_catalog)
|
601
|
+
end
|
602
|
+
end
|
603
|
+
|
604
|
+
context "reporting" do
|
605
|
+
it "stores a finalized report" do
|
606
|
+
catalog_handler = -> (req, res) {
|
607
|
+
catalog = compile_to_catalog(<<-MANIFEST, node)
|
608
|
+
notify { 'foo':
|
609
|
+
require => Notify['bar']
|
610
|
+
}
|
611
|
+
|
612
|
+
notify { 'bar':
|
613
|
+
require => Notify['foo']
|
614
|
+
}
|
615
|
+
MANIFEST
|
616
|
+
|
617
|
+
res.body = formatter.render(catalog)
|
618
|
+
res['Content-Type'] = formatter.mime
|
619
|
+
}
|
620
|
+
|
621
|
+
server.start_server(mounts: {catalog: catalog_handler}) do |port|
|
622
|
+
Puppet[:serverport] = port
|
623
|
+
expect {
|
624
|
+
agent.command_line.args << '--test'
|
625
|
+
agent.run
|
626
|
+
}.to exit_with(1)
|
627
|
+
.and output(%r{Applying configuration}).to_stdout
|
628
|
+
.and output(%r{Found 1 dependency cycle}).to_stderr
|
629
|
+
|
630
|
+
report = Puppet::Transaction::Report.convert_from(:yaml, File.read(Puppet[:lastrunreport]))
|
631
|
+
expect(report.status).to eq("failed")
|
632
|
+
expect(report.metrics).to_not be_empty
|
633
|
+
end
|
634
|
+
end
|
635
|
+
end
|
479
636
|
end
|
@@ -663,4 +663,23 @@ class amod::bad_type {
|
|
663
663
|
end
|
664
664
|
end
|
665
665
|
end
|
666
|
+
|
667
|
+
context 'rich data' do
|
668
|
+
it "calls a deferred 4x function" do
|
669
|
+
apply.command_line.args = ['-e', 'notify { "deferred3x": message => Deferred("join", [[1,2,3], ":"]) }']
|
670
|
+
|
671
|
+
expect {
|
672
|
+
apply.run
|
673
|
+
}.to exit_with(0) # for some reason apply returns 0 instead of 2
|
674
|
+
.and output(%r{Notice: /Stage\[main\]/Main/Notify\[deferred3x\]/message: defined 'message' as '1:2:3'}).to_stdout
|
675
|
+
end
|
676
|
+
|
677
|
+
it "calls a deferred 3x function" do
|
678
|
+
apply.command_line.args = ['-e', 'notify { "deferred4x": message => Deferred("sprintf", ["%s", "I am deferred"]) }']
|
679
|
+
expect {
|
680
|
+
apply.run
|
681
|
+
}.to exit_with(0) # for some reason apply returns 0 instead of 2
|
682
|
+
.and output(%r{Notice: /Stage\[main\]/Main/Notify\[deferred4x\]/message: defined 'message' as 'I am deferred'}).to_stdout
|
683
|
+
end
|
684
|
+
end
|
666
685
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'puppet_spec/files'
|
3
|
+
|
4
|
+
describe "puppet resource", unless: Puppet::Util::Platform.jruby? do
|
5
|
+
include PuppetSpec::Files
|
6
|
+
|
7
|
+
let(:resource) { Puppet::Application[:resource] }
|
8
|
+
|
9
|
+
describe "when handling file and tidy types" do
|
10
|
+
let!(:dir) { dir_containing('testdir', 'testfile' => 'contents') }
|
11
|
+
|
12
|
+
it 'does not raise when generating file resources' do
|
13
|
+
resource.command_line.args = ['file', dir, 'ensure=directory', 'recurse=true']
|
14
|
+
|
15
|
+
expect {
|
16
|
+
resource.run
|
17
|
+
}.to output(/ensure.+=> 'directory'/).to_stdout
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'correctly cleans up a given path' do
|
21
|
+
resource.command_line.args = ['tidy', dir, 'rmdirs=true', 'recurse=true']
|
22
|
+
|
23
|
+
expect {
|
24
|
+
resource.run
|
25
|
+
}.to output(/Notice: \/File\[#{dir}\]\/ensure: removed/).to_stdout
|
26
|
+
|
27
|
+
expect(Puppet::FileSystem.exist?(dir)).to be false
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -36,13 +36,6 @@ describe "Puppet defaults" do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
describe "when setting the :serverport" do
|
40
|
-
it "should also set the :masterport to the same value" do
|
41
|
-
Puppet.settings[:serverport] = 9000
|
42
|
-
expect(Puppet.settings[:masterport]).to eq(9000)
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
39
|
describe "when setting the :factpath" do
|
47
40
|
it "should add the :factpath to Facter's search paths" do
|
48
41
|
expect(Facter).to receive(:search).with("/my/fact/path")
|
@@ -12,7 +12,7 @@ describe "setting hooks" do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "accesses correct directory environment settings after initializing a setting with an on_write hook" do
|
15
|
-
expect(Puppet.settings.setting(:
|
15
|
+
expect(Puppet.settings.setting(:strict).call_hook).to eq(:on_write_only)
|
16
16
|
|
17
17
|
File.open(File.join(confdir, "puppet.conf"), "w:UTF-8") do |f|
|
18
18
|
f.puts("environmentpath=#{environmentpath}")
|
@@ -151,4 +151,16 @@ describe Puppet::HTTP::Client, unless: Puppet::Util::Platform.jruby? do
|
|
151
151
|
end
|
152
152
|
end
|
153
153
|
end
|
154
|
+
|
155
|
+
context 'ciphersuites' do
|
156
|
+
it "does not connect when using an SSLv3 ciphersuite", :if => Puppet::Util::Package.versioncmp(OpenSSL::OPENSSL_LIBRARY_VERSION.split[1], '1.1.1e') > 0 do
|
157
|
+
Puppet[:ciphers] = "DES-CBC3-SHA"
|
158
|
+
|
159
|
+
https_server.start_server do |port|
|
160
|
+
expect {
|
161
|
+
client.get(URI("https://127.0.0.1:#{port}"), options: {ssl_context: root_context})
|
162
|
+
}.to raise_error(Puppet::HTTP::ConnectionError, /no cipher match|sslv3 alert handshake failure/)
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
154
166
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'matchers/include'
|
3
2
|
|
4
3
|
require 'puppet/indirector/file_content/file'
|
5
4
|
require 'puppet/indirector/file_metadata/file'
|
@@ -30,7 +29,6 @@ end
|
|
30
29
|
|
31
30
|
describe Puppet::Indirector::DirectFileServer, " when interacting with FileServing::Fileset and the model" do
|
32
31
|
include PuppetSpec::Files
|
33
|
-
include Matchers::Include
|
34
32
|
|
35
33
|
matcher :file_with_content do |name, content|
|
36
34
|
match do |actual|
|
@@ -52,7 +50,7 @@ describe Puppet::Indirector::DirectFileServer, " when interacting with FileServi
|
|
52
50
|
terminus = Puppet::Indirector::FileContent::File.new
|
53
51
|
request = terminus.indirection.request(:search, Puppet::Util.path_to_uri(path).to_s, nil, :recurse => true)
|
54
52
|
|
55
|
-
expect(terminus.search(request)).to
|
53
|
+
expect(terminus.search(request)).to contain_exactly(
|
56
54
|
file_with_content(File.join(path, "one"), "one content"),
|
57
55
|
file_with_content(File.join(path, "two"), "two content"),
|
58
56
|
directory_named(path))
|