puppet 6.21.0-x64-mingw32 → 6.24.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/CONTRIBUTING.md +5 -5
- data/Gemfile +1 -1
- data/Gemfile.lock +29 -23
- data/README.md +4 -4
- data/ext/osx/puppet.plist +2 -0
- data/ext/project_data.yaml +3 -2
- data/lib/puppet.rb +3 -3
- data/lib/puppet/application/agent.rb +12 -5
- data/lib/puppet/application/apply.rb +2 -1
- data/lib/puppet/application/device.rb +2 -1
- data/lib/puppet/application/filebucket.rb +1 -0
- data/lib/puppet/application/resource.rb +17 -3
- data/lib/puppet/application/script.rb +2 -1
- data/lib/puppet/application/ssl.rb +12 -0
- data/lib/puppet/configurer/downloader.rb +2 -1
- data/lib/puppet/defaults.rb +27 -5
- data/lib/puppet/environments.rb +26 -1
- data/lib/puppet/face/facts.rb +128 -30
- data/lib/puppet/face/help/action.erb +1 -0
- data/lib/puppet/face/help/face.erb +1 -0
- data/lib/puppet/face/node/clean.rb +11 -0
- data/lib/puppet/file_serving/fileset.rb +14 -2
- data/lib/puppet/file_system/file_impl.rb +1 -1
- data/lib/puppet/file_system/memory_file.rb +8 -1
- data/lib/puppet/file_system/windows.rb +4 -2
- data/lib/puppet/forge.rb +3 -3
- 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/empty.rb +8 -0
- data/lib/puppet/functions/get.rb +5 -5
- data/lib/puppet/functions/group_by.rb +13 -5
- 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/strftime.rb +1 -0
- data/lib/puppet/functions/tree_each.rb +7 -9
- data/lib/puppet/functions/type.rb +4 -4
- data/lib/puppet/functions/unwrap.rb +17 -2
- 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/facts/facter.rb +24 -3
- data/lib/puppet/indirector/file_metadata/rest.rb +1 -0
- data/lib/puppet/indirector/resource/ral.rb +6 -1
- data/lib/puppet/interface/documentation.rb +1 -0
- data/lib/puppet/module_tool/applications/installer.rb +4 -0
- data/lib/puppet/module_tool/errors/shared.rb +17 -0
- data/lib/puppet/network/formats.rb +67 -0
- data/lib/puppet/network/http/factory.rb +4 -0
- data/lib/puppet/parser/functions/fqdn_rand.rb +14 -6
- 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/pops/types/type_mismatch_describer.rb +1 -1
- data/lib/puppet/provider/exec/posix.rb +16 -4
- data/lib/puppet/provider/package/dnfmodule.rb +1 -1
- data/lib/puppet/provider/package/nim.rb +11 -6
- data/lib/puppet/provider/package/pip.rb +15 -3
- data/lib/puppet/provider/parsedfile.rb +3 -0
- data/lib/puppet/provider/service/systemd.rb +14 -4
- data/lib/puppet/provider/service/windows.rb +38 -0
- data/lib/puppet/provider/user/directoryservice.rb +25 -12
- data/lib/puppet/provider/user/useradd.rb +9 -2
- data/lib/puppet/reference/configuration.rb +1 -1
- data/lib/puppet/settings.rb +30 -7
- data/lib/puppet/settings/environment_conf.rb +1 -0
- data/lib/puppet/transaction/additional_resource_generator.rb +1 -1
- data/lib/puppet/type/exec.rb +16 -3
- data/lib/puppet/type/file.rb +19 -1
- data/lib/puppet/type/file/mode.rb +6 -0
- data/lib/puppet/type/file/selcontext.rb +1 -1
- data/lib/puppet/type/service.rb +18 -38
- data/lib/puppet/type/tidy.rb +22 -3
- data/lib/puppet/type/user.rb +38 -20
- data/lib/puppet/util/fact_dif.rb +36 -17
- data/lib/puppet/util/monkey_patches.rb +7 -0
- data/lib/puppet/util/selinux.rb +30 -4
- data/lib/puppet/util/symbolic_file_mode.rb +29 -17
- 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/sid.rb +6 -2
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +360 -280
- data/man/man5/puppet.conf.5 +279 -251
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-catalog.8 +9 -9
- 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 +65 -7
- 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 +7 -7
- 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 +5 -5
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +5 -5
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +5 -1
- data/man/man8/puppet-status.8 +4 -4
- data/man/man8/puppet.8 +2 -2
- 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/oid-key.pem +117 -0
- data/spec/fixtures/ssl/oid.pem +69 -0
- 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/trusted_oid_mapping.yaml +5 -0
- 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/integration/application/filebucket_spec.rb +11 -0
- data/spec/integration/application/module_spec.rb +21 -0
- data/spec/integration/application/plugin_spec.rb +1 -1
- data/spec/integration/application/resource_spec.rb +64 -0
- data/spec/integration/application/ssl_spec.rb +20 -0
- data/spec/integration/environments/settings_interpolation_spec.rb +0 -4
- data/spec/integration/http/client_spec.rb +12 -0
- data/spec/integration/indirector/direct_file_server_spec.rb +1 -3
- data/spec/integration/indirector/facts/facter_spec.rb +90 -36
- data/spec/integration/type/exec_spec.rb +70 -45
- data/spec/integration/util/windows/adsi_spec.rb +18 -0
- data/spec/integration/util/windows/principal_spec.rb +21 -0
- data/spec/integration/util/windows/registry_spec.rb +6 -0
- data/spec/lib/puppet/test_ca.rb +7 -2
- data/spec/lib/puppet_spec/settings.rb +1 -0
- data/spec/spec_helper.rb +11 -1
- data/spec/unit/application/agent_spec.rb +7 -2
- data/spec/unit/application/facts_spec.rb +482 -3
- data/spec/unit/application/ssl_spec.rb +23 -0
- data/spec/unit/configurer/downloader_spec.rb +6 -0
- data/spec/unit/configurer_spec.rb +23 -0
- data/spec/unit/defaults_spec.rb +16 -0
- data/spec/unit/environments_spec.rb +199 -88
- data/spec/unit/face/facts_spec.rb +4 -0
- data/spec/unit/file_serving/fileset_spec.rb +60 -0
- data/spec/unit/file_system_spec.rb +15 -0
- data/spec/unit/functions/assert_type_spec.rb +1 -1
- data/spec/unit/functions/empty_spec.rb +10 -0
- data/spec/unit/functions/unwrap_spec.rb +8 -0
- data/spec/unit/functions4_spec.rb +2 -2
- data/spec/unit/gettext/config_spec.rb +12 -0
- data/spec/unit/http/service/compiler_spec.rb +123 -0
- data/spec/unit/indirector/catalog/compiler_spec.rb +14 -10
- data/spec/unit/indirector/facts/facter_spec.rb +95 -0
- data/spec/unit/indirector/resource/ral_spec.rb +40 -75
- data/spec/unit/module_tool/applications/installer_spec.rb +12 -0
- data/spec/unit/network/formats_spec.rb +41 -0
- data/spec/unit/network/http/factory_spec.rb +19 -0
- data/spec/unit/parser/functions/fqdn_rand_spec.rb +15 -1
- data/spec/unit/parser/templatewrapper_spec.rb +12 -2
- 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/provider/package/dnfmodule_spec.rb +10 -1
- data/spec/unit/provider/package/nim_spec.rb +42 -0
- data/spec/unit/provider/package/pip_spec.rb +37 -0
- data/spec/unit/provider/parsedfile_spec.rb +10 -0
- 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/directoryservice_spec.rb +67 -35
- data/spec/unit/provider/user/useradd_spec.rb +21 -6
- data/spec/unit/resource/catalog_spec.rb +1 -1
- data/spec/unit/settings_spec.rb +97 -56
- data/spec/unit/ssl/state_machine_spec.rb +19 -5
- data/spec/unit/transaction/additional_resource_generator_spec.rb +0 -2
- data/spec/unit/transaction_spec.rb +18 -20
- data/spec/unit/type/exec_spec.rb +76 -29
- data/spec/unit/type/file/selinux_spec.rb +3 -3
- data/spec/unit/type/file/source_spec.rb +4 -4
- data/spec/unit/type/service_spec.rb +59 -188
- data/spec/unit/type/tidy_spec.rb +24 -7
- data/spec/unit/type/user_spec.rb +45 -0
- data/spec/unit/util/selinux_spec.rb +87 -16
- data/spec/unit/util/windows/sid_spec.rb +41 -0
- data/tasks/generate_cert_fixtures.rake +12 -3
- metadata +24 -9
- data/spec/lib/matchers/include.rb +0 -27
- data/spec/lib/matchers/include_spec.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87b64bfb36433e576bca9d3d6ca4f1e3ca8134e45c73d2384a431a2d4875f525
|
4
|
+
data.tar.gz: 4fd577a3c1b0827bbd6ab32d339677ee6e5e7ef1ad15810c87f09f73c628ebbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 889990a066ee1ca4bf5a51097e3140c61171edd9b0a841b15664585db549df120fc2ccfe920371bc4f64ea88d3334fad68f3cd5a4d88dbe1e7b7fe3617379a81
|
7
|
+
data.tar.gz: ca1783d1a2f81c5dca57d7fb7788b8cea037ff6a941e400e6fa288b373efebe0bd5ff17d07820b2c184e404a31b8de5ef7eaf7c316d9331416438951603c9ab9
|
data/CONTRIBUTING.md
CHANGED
@@ -38,12 +38,12 @@ the [puppet-dev mailing list](https://groups.google.com/forum/#!forum/puppet-dev
|
|
38
38
|
## Making Changes
|
39
39
|
|
40
40
|
* Create a topic branch from where you want to base your work.
|
41
|
-
* This is usually the
|
41
|
+
* This is usually the main branch.
|
42
42
|
* Only target release branches if you are certain your fix must be on that
|
43
43
|
branch.
|
44
|
-
* To quickly create a topic branch based on
|
45
|
-
fix/
|
46
|
-
`
|
44
|
+
* To quickly create a topic branch based on main, run `git checkout -b
|
45
|
+
fix/main/my_contribution main`. Please avoid working directly on the
|
46
|
+
`main` branch.
|
47
47
|
* Make commits of logical and atomic units.
|
48
48
|
* Check for unnecessary whitespace with `git diff --check` before committing.
|
49
49
|
* Make sure your commit messages are in the proper format. If the commit
|
@@ -65,7 +65,7 @@ the [puppet-dev mailing list](https://groups.google.com/forum/#!forum/puppet-dev
|
|
65
65
|
why this is a problem, and how the patch fixes the problem when applied.
|
66
66
|
```
|
67
67
|
* Make sure you have added the necessary tests for your changes.
|
68
|
-
* For details on how to run tests, please see [the quickstart guide](https://github.com/puppetlabs/puppet/blob/
|
68
|
+
* For details on how to run tests, please see [the quickstart guide](https://github.com/puppetlabs/puppet/blob/main/docs/quickstart.md)
|
69
69
|
|
70
70
|
## Writing Translatable Code
|
71
71
|
|
data/Gemfile
CHANGED
@@ -56,7 +56,7 @@ group(:development, optional: true) do
|
|
56
56
|
gem 'memory_profiler', require: false, platforms: [:mri]
|
57
57
|
gem 'pry', require: false, platforms: [:ruby]
|
58
58
|
gem "racc", "1.4.9", require: false, platforms: [:ruby]
|
59
|
-
if RUBY_PLATFORM != 'java'
|
59
|
+
if RUBY_PLATFORM != 'java' && RUBY_VERSION.to_f >= 2.5
|
60
60
|
gem 'ruby-prof', '>= 0.16.0', require: false
|
61
61
|
end
|
62
62
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,18 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git://github.com/puppetlabs/packaging
|
3
|
+
revision: 4d6d51947f44bfa2fc282658836c15f69672e757
|
4
|
+
branch: 1.0.x
|
5
|
+
specs:
|
6
|
+
packaging (0.99.78.4.g4d6d519)
|
7
|
+
artifactory (~> 2)
|
8
|
+
csv (= 3.1.5)
|
9
|
+
rake (>= 12.3)
|
10
|
+
release-metrics
|
11
|
+
|
1
12
|
PATH
|
2
13
|
remote: .
|
3
14
|
specs:
|
4
|
-
puppet (6.
|
15
|
+
puppet (6.24.0)
|
5
16
|
CFPropertyList (~> 2.2)
|
6
17
|
concurrent-ruby (~> 1.0)
|
7
18
|
deep_merge (~> 1.0)
|
@@ -17,23 +28,23 @@ GEM
|
|
17
28
|
remote: https://artifactory.delivery.puppetlabs.net/artifactory/api/gems/rubygems/
|
18
29
|
specs:
|
19
30
|
CFPropertyList (2.3.6)
|
20
|
-
addressable (2.
|
31
|
+
addressable (2.8.0)
|
21
32
|
public_suffix (>= 2.0.2, < 5.0)
|
22
33
|
artifactory (2.8.2)
|
23
34
|
ast (2.4.2)
|
24
35
|
coderay (1.1.3)
|
25
|
-
concurrent-ruby (1.1.
|
36
|
+
concurrent-ruby (1.1.9)
|
26
37
|
crack (0.4.5)
|
27
38
|
rexml
|
28
39
|
csv (3.1.5)
|
29
40
|
deep_merge (1.2.1)
|
30
41
|
diff-lcs (1.4.4)
|
31
42
|
docopt (0.6.1)
|
32
|
-
facter (4.
|
43
|
+
facter (4.2.2)
|
33
44
|
hocon (~> 1.3)
|
34
45
|
thor (>= 1.0.1, < 2.0)
|
35
46
|
fast_gettext (1.1.2)
|
36
|
-
ffi (1.
|
47
|
+
ffi (1.15.3)
|
37
48
|
gettext (3.2.9)
|
38
49
|
locale (>= 2.0.5)
|
39
50
|
text (>= 1.3.0)
|
@@ -42,11 +53,11 @@ GEM
|
|
42
53
|
gettext (>= 3.0.2, < 3.3.0)
|
43
54
|
locale
|
44
55
|
hashdiff (1.0.1)
|
45
|
-
hiera (3.
|
46
|
-
hiera-eyaml (3.2.
|
47
|
-
highline
|
56
|
+
hiera (3.7.0)
|
57
|
+
hiera-eyaml (3.2.2)
|
58
|
+
highline
|
48
59
|
optimist
|
49
|
-
highline (
|
60
|
+
highline (2.0.3)
|
50
61
|
hocon (1.3.1)
|
51
62
|
hpricot (0.8.6)
|
52
63
|
httpclient (2.8.3)
|
@@ -60,33 +71,28 @@ GEM
|
|
60
71
|
multi_json (1.15.0)
|
61
72
|
mustache (1.1.1)
|
62
73
|
optimist (3.0.1)
|
63
|
-
packaging (0.99.75)
|
64
|
-
artifactory (~> 2)
|
65
|
-
csv (= 3.1.5)
|
66
|
-
rake (>= 12.3)
|
67
|
-
release-metrics
|
68
74
|
parallel (1.20.1)
|
69
75
|
parser (2.7.2.0)
|
70
76
|
ast (~> 2.4.1)
|
71
77
|
powerpack (0.1.3)
|
72
|
-
pry (0.
|
78
|
+
pry (0.14.1)
|
73
79
|
coderay (~> 1.1)
|
74
80
|
method_source (~> 1.0)
|
75
81
|
public_suffix (4.0.6)
|
76
|
-
puppet-resource_api (1.8.
|
82
|
+
puppet-resource_api (1.8.14)
|
77
83
|
hocon (>= 1.0)
|
78
|
-
puppetserver-ca (1.
|
84
|
+
puppetserver-ca (1.10.0)
|
79
85
|
facter (>= 2.0.1, < 5)
|
80
86
|
racc (1.4.9)
|
81
87
|
rainbow (2.2.2)
|
82
88
|
rake
|
83
89
|
rake (12.3.3)
|
84
90
|
rdiscount (2.2.0.2)
|
85
|
-
rdoc (6.3.
|
91
|
+
rdoc (6.3.2)
|
86
92
|
release-metrics (1.1.0)
|
87
93
|
csv
|
88
94
|
docopt
|
89
|
-
rexml (3.2.
|
95
|
+
rexml (3.2.5)
|
90
96
|
ronn (0.7.3)
|
91
97
|
hpricot (>= 0.8.2)
|
92
98
|
mustache (>= 0.7.0)
|
@@ -116,14 +122,14 @@ GEM
|
|
116
122
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
117
123
|
rubocop-i18n (1.2.0)
|
118
124
|
rubocop (~> 0.49.0)
|
119
|
-
ruby-prof (1.4.
|
125
|
+
ruby-prof (1.4.3)
|
120
126
|
ruby-progressbar (1.11.0)
|
121
|
-
semantic_puppet (1.0.
|
127
|
+
semantic_puppet (1.0.4)
|
122
128
|
text (1.3.1)
|
123
129
|
thor (1.1.0)
|
124
130
|
unicode-display_width (1.7.0)
|
125
131
|
vcr (5.1.0)
|
126
|
-
webmock (3.
|
132
|
+
webmock (3.13.0)
|
127
133
|
addressable (>= 2.3.6)
|
128
134
|
crack (>= 0.3.2)
|
129
135
|
hashdiff (>= 0.4.0, < 2.0.0)
|
@@ -142,7 +148,7 @@ DEPENDENCIES
|
|
142
148
|
memory_profiler
|
143
149
|
minitar (~> 0.9)
|
144
150
|
msgpack (~> 1.2)
|
145
|
-
packaging
|
151
|
+
packaging!
|
146
152
|
pry
|
147
153
|
puppet!
|
148
154
|
puppet-resource_api (~> 1.5)
|
data/README.md
CHANGED
@@ -33,16 +33,16 @@ see the [Quick Start to Developing on Puppet](docs/quickstart.md) guide.
|
|
33
33
|
|
34
34
|
We'd love to get contributions from you! For a quick guide to getting your
|
35
35
|
system setup for developing, take a look at our [Quickstart
|
36
|
-
Guide](https://github.com/puppetlabs/puppet/blob/
|
37
|
-
[Contribution Documents](https://github.com/puppetlabs/puppet/blob/
|
36
|
+
Guide](https://github.com/puppetlabs/puppet/blob/main/docs/quickstart.md). Once you are up and running, take a look at the
|
37
|
+
[Contribution Documents](https://github.com/puppetlabs/puppet/blob/main/CONTRIBUTING.md) to see how to get your changes merged
|
38
38
|
in.
|
39
39
|
|
40
40
|
For more complete docs on developing with Puppet, take a look at the
|
41
|
-
rest of the [developer documents](https://github.com/puppetlabs/puppet/blob/
|
41
|
+
rest of the [developer documents](https://github.com/puppetlabs/puppet/blob/main/docs/index.md).
|
42
42
|
|
43
43
|
## Licensing
|
44
44
|
|
45
|
-
See [LICENSE](https://github.com/puppetlabs/puppet/blob/
|
45
|
+
See [LICENSE](https://github.com/puppetlabs/puppet/blob/main/LICENSE) file. Puppet is licensed by Puppet, Inc. under the Apache license. Puppet, Inc. can be contacted at: info@puppet.com
|
46
46
|
|
47
47
|
## Support
|
48
48
|
|
data/ext/osx/puppet.plist
CHANGED
data/ext/project_data.yaml
CHANGED
@@ -13,6 +13,7 @@ gem_files: '[A-Z]* install.rb bin lib conf man examples ext tasks spec locales'
|
|
13
13
|
gem_test_files: 'spec/**/*'
|
14
14
|
gem_executables: 'puppet'
|
15
15
|
gem_default_executables: 'puppet'
|
16
|
+
gem_license: 'Apache-2.0'
|
16
17
|
gem_forge_project: 'puppet'
|
17
18
|
gem_required_ruby_version: '>= 2.3.0'
|
18
19
|
gem_required_rubygems_version: '> 1.3.1'
|
@@ -41,7 +42,7 @@ gem_platform_dependencies:
|
|
41
42
|
gem_runtime_dependencies:
|
42
43
|
ffi: ['> 1.9.24', '< 2']
|
43
44
|
# win32-xxxx gems are pinned due to PUP-6445
|
44
|
-
win32-dir: '
|
45
|
+
win32-dir: ['>= 0.4.9', '<= 0.7.2']
|
45
46
|
win32-process: '= 0.7.5'
|
46
47
|
# Use of win32-security is deprecated
|
47
48
|
win32-security: '= 0.2.5'
|
@@ -51,7 +52,7 @@ gem_platform_dependencies:
|
|
51
52
|
gem_runtime_dependencies:
|
52
53
|
ffi: ['> 1.9.24', '< 2']
|
53
54
|
# win32-xxxx gems are pinned due to PUP-6445
|
54
|
-
win32-dir: '
|
55
|
+
win32-dir: ['>= 0.4.9', '<= 0.7.2']
|
55
56
|
win32-process: '= 0.7.5'
|
56
57
|
# Use of win32-security is deprecated
|
57
58
|
win32-security: '= 0.2.5'
|
data/lib/puppet.rb
CHANGED
@@ -205,9 +205,9 @@ module Puppet
|
|
205
205
|
|
206
206
|
Facter.add(:agent_specified_environment) do
|
207
207
|
setcode do
|
208
|
-
|
209
|
-
Puppet
|
210
|
-
|
208
|
+
Puppet.settings.set_by_cli(:environment) ||
|
209
|
+
Puppet.settings.set_in_section(:environment, :agent) ||
|
210
|
+
Puppet.settings.set_in_section(:environment, :main)
|
211
211
|
end
|
212
212
|
end
|
213
213
|
end
|
@@ -133,9 +133,12 @@ Some flags are meant specifically for interactive use --- in particular,
|
|
133
133
|
'test', 'tags' and 'fingerprint' are useful.
|
134
134
|
|
135
135
|
'--test' runs once in the foreground with verbose logging, then exits.
|
136
|
-
It also exits if it can't get a valid catalog. `--test` includes the
|
136
|
+
It also exits if it can't get a valid catalog. `--test` includes the
|
137
|
+
'--detailed-exitcodes' option by default and exits with one of the following
|
138
|
+
exit codes:
|
137
139
|
|
138
|
-
* 0: The run succeeded with no changes or failures; the system was already in
|
140
|
+
* 0: The run succeeded with no changes or failures; the system was already in
|
141
|
+
the desired state.
|
139
142
|
* 1: The run failed, or wasn't attempted due to another run already in progress.
|
140
143
|
* 2: The run succeeded, and some resources were changed.
|
141
144
|
* 4: The run succeeded, and some resources failed.
|
@@ -246,7 +249,9 @@ generated by running puppet agent with '--genconfig'.
|
|
246
249
|
'puppet agent' exits after executing this.
|
247
250
|
|
248
251
|
* --evaltrace:
|
249
|
-
Logs each resource as it is being evaluated. This allows you to interactively
|
252
|
+
Logs each resource as it is being evaluated. This allows you to interactively
|
253
|
+
see exactly what is being done. (This is a Puppet setting, and can go in
|
254
|
+
puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)
|
250
255
|
|
251
256
|
* --fingerprint:
|
252
257
|
Display the current certificate or certificate signing request
|
@@ -267,7 +272,8 @@ generated by running puppet agent with '--genconfig'.
|
|
267
272
|
service), 'eventlog' (the Windows Event Log), 'console', or the path to a log
|
268
273
|
file. If debugging or verbosity is enabled, this defaults to 'console'.
|
269
274
|
Otherwise, it defaults to 'syslog' on POSIX systems and 'eventlog' on Windows.
|
270
|
-
Multiple destinations can be set using a comma separated list
|
275
|
+
Multiple destinations can be set using a comma separated list
|
276
|
+
(eg: `/path/file1,console,/path/file2`)"
|
271
277
|
|
272
278
|
A path ending with '.json' will receive structured output in JSON format. The
|
273
279
|
log file will not have an ending ']' automatically written to it due to the
|
@@ -310,7 +316,8 @@ generated by running puppet agent with '--genconfig'.
|
|
310
316
|
'no-splay', and 'show_diff'.
|
311
317
|
|
312
318
|
* --trace
|
313
|
-
Prints stack traces on some errors. (This is a Puppet setting, and can go in
|
319
|
+
Prints stack traces on some errors. (This is a Puppet setting, and can go in
|
320
|
+
puppet.conf. Note the special 'no-' prefix for boolean settings on the command line.)
|
314
321
|
|
315
322
|
* --verbose:
|
316
323
|
Turn on verbose reporting.
|
@@ -113,7 +113,8 @@ configuration options by running puppet with
|
|
113
113
|
Where to send log messages. Choose between 'syslog' (the POSIX syslog
|
114
114
|
service), 'eventlog' (the Windows Event Log), 'console', or the path to a log
|
115
115
|
file. Defaults to 'console'.
|
116
|
-
Multiple destinations can be set using a comma separated list
|
116
|
+
Multiple destinations can be set using a comma separated list
|
117
|
+
(eg: `/path/file1,console,/path/file2`)"
|
117
118
|
|
118
119
|
A path ending with '.json' will receive structured output in JSON format. The
|
119
120
|
log file will not have an ending ']' automatically written to it due to the
|
@@ -155,7 +155,8 @@ you can specify '--server <servername>' as an argument.
|
|
155
155
|
Where to send log messages. Choose between 'syslog' (the POSIX syslog
|
156
156
|
service), 'console', or the path to a log file. If debugging or verbosity is
|
157
157
|
enabled, this defaults to 'console'. Otherwise, it defaults to 'syslog'.
|
158
|
-
Multiple destinations can be set using a comma separated list
|
158
|
+
Multiple destinations can be set using a comma separated list
|
159
|
+
(eg: `/path/file1,console,/path/file2`)"
|
159
160
|
|
160
161
|
A path ending with '.json' will receive structured output in JSON format. The
|
161
162
|
log file will not have an ending ']' automatically written to it due to the
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'puppet/application'
|
2
2
|
|
3
3
|
class Puppet::Application::Resource < Puppet::Application
|
4
|
+
environment_mode :not_required
|
4
5
|
|
5
6
|
attr_accessor :host, :extra_params
|
6
7
|
|
@@ -14,8 +15,9 @@ class Puppet::Application::Resource < Puppet::Application
|
|
14
15
|
option("--to_yaml","-y")
|
15
16
|
|
16
17
|
option("--types", "-t") do |arg|
|
18
|
+
env = Puppet.lookup(:environments).get(Puppet[:environment]) || create_default_environment
|
17
19
|
types = []
|
18
|
-
Puppet::Type.loadall
|
20
|
+
Puppet::Type.typeloader.loadall(env)
|
19
21
|
Puppet::Type.eachtype do |t|
|
20
22
|
next if t.name == :component
|
21
23
|
types << t.name.to_s
|
@@ -101,7 +103,8 @@ configuration options can also be generated by running puppet with
|
|
101
103
|
Print extra information.
|
102
104
|
|
103
105
|
* --to_yaml:
|
104
|
-
Output found resources in yaml format, suitable to use with Hiera and
|
106
|
+
Output found resources in yaml format, suitable to use with Hiera and
|
107
|
+
create_resources.
|
105
108
|
|
106
109
|
EXAMPLE
|
107
110
|
-------
|
@@ -133,7 +136,9 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License
|
|
133
136
|
end
|
134
137
|
|
135
138
|
def main
|
136
|
-
|
139
|
+
# If the specified environment does not exist locally, fall back to the default (production) environment
|
140
|
+
env = Puppet.lookup(:environments).get(Puppet[:environment]) || create_default_environment
|
141
|
+
|
137
142
|
Puppet.override(:current_environment => env, :loaders => Puppet::Pops::Loaders.new(env)) do
|
138
143
|
type, name, params = parse_args(command_line.args)
|
139
144
|
|
@@ -208,6 +213,15 @@ Copyright (c) 2011 Puppet Inc., LLC Licensed under the Apache 2.0 License
|
|
208
213
|
[type, name, params]
|
209
214
|
end
|
210
215
|
|
216
|
+
def create_default_environment
|
217
|
+
Puppet.debug("Specified environment '#{Puppet[:environment]}' does not exist on the filesystem, defaulting to 'production'")
|
218
|
+
Puppet[:environment] = :production
|
219
|
+
basemodulepath = Puppet::Node::Environment.split_path(Puppet[:basemodulepath])
|
220
|
+
modulepath = Puppet[:modulepath]
|
221
|
+
modulepath = (modulepath.nil? || modulepath.empty?) ? basemodulepath : Puppet::Node::Environment.split_path(modulepath)
|
222
|
+
Puppet::Node::Environment.create(Puppet[:environment], modulepath, Puppet::Node::Environment::NO_MANIFEST)
|
223
|
+
end
|
224
|
+
|
211
225
|
def find_or_save_resources(type, name, params)
|
212
226
|
key = local_key(type, name)
|
213
227
|
|
@@ -71,7 +71,8 @@ configuration options can also be generated by running puppet with
|
|
71
71
|
Where to send log messages. Choose between 'syslog' (the POSIX syslog
|
72
72
|
service), 'eventlog' (the Windows Event Log), 'console', or the path to a log
|
73
73
|
file. Defaults to 'console'.
|
74
|
-
Multiple destinations can be set using a comma separated list
|
74
|
+
Multiple destinations can be set using a comma separated list
|
75
|
+
(eg: `/path/file1,console,/path/file2`)"
|
75
76
|
|
76
77
|
A path ending with '.json' will receive structured output in JSON format. The
|
77
78
|
log file will not have an ending ']' automatically written to it due to the
|
@@ -74,6 +74,9 @@ ACTIONS
|
|
74
74
|
`--localca` is specified, then also remove this host's local copy of the
|
75
75
|
CA certificate(s) and CRL bundle. if `--target CERTNAME` is specified, then
|
76
76
|
remove the files for the specified device on this host instead of this host.
|
77
|
+
|
78
|
+
* show:
|
79
|
+
Print the full-text version of this host's certificate.
|
77
80
|
HELP
|
78
81
|
end
|
79
82
|
|
@@ -114,6 +117,7 @@ HELP
|
|
114
117
|
end
|
115
118
|
|
116
119
|
Puppet::SSL::Oids.register_puppet_oids
|
120
|
+
Puppet::SSL::Oids.load_custom_oid_file(Puppet[:trusted_oid_mapping_file])
|
117
121
|
|
118
122
|
certname = Puppet[:certname]
|
119
123
|
action = command_line.args.first
|
@@ -142,11 +146,19 @@ HELP
|
|
142
146
|
end
|
143
147
|
@machine.ensure_client_certificate
|
144
148
|
Puppet.notice(_("Completed SSL initialization"))
|
149
|
+
when 'show'
|
150
|
+
show(certname)
|
145
151
|
else
|
146
152
|
raise Puppet::Error, _("Unknown action '%{action}'") % { action: action }
|
147
153
|
end
|
148
154
|
end
|
149
155
|
|
156
|
+
def show(certname)
|
157
|
+
password = @cert_provider.load_private_key_password
|
158
|
+
ssl_context = @ssl_provider.load_context(certname: certname, password: password)
|
159
|
+
puts ssl_context.client_cert.to_text
|
160
|
+
end
|
161
|
+
|
150
162
|
def submit_request(ssl_context)
|
151
163
|
key = @cert_provider.load_private_key(Puppet[:certname])
|
152
164
|
unless key
|
data/lib/puppet/defaults.rb
CHANGED
@@ -58,6 +58,18 @@ module Puppet
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
def self.default_cadir
|
62
|
+
return "" if Puppet::Util::Platform.windows?
|
63
|
+
old_ca_dir = "#{Puppet[:ssldir]}/ca"
|
64
|
+
new_ca_dir = '/etc/puppetlabs/puppetserver/ca'
|
65
|
+
|
66
|
+
if File.exist?("#{new_ca_dir}/ca_crt.pem")
|
67
|
+
new_ca_dir
|
68
|
+
else
|
69
|
+
old_ca_dir
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
61
73
|
############################################################################################
|
62
74
|
# NOTE: For information about the available values for the ":type" property of settings,
|
63
75
|
# see the docs for Settings.define_settings
|
@@ -866,8 +878,8 @@ names.
|
|
866
878
|
**Note:** The list of alternate names is locked in when the server's
|
867
879
|
certificate is signed. If you need to change the list later, you can't just
|
868
880
|
change this setting; you also need to regenerate the certificate. For more
|
869
|
-
information on that process, see the
|
870
|
-
(https://puppet.com/docs/puppet/latest/ssl_regenerate_certificates.html).
|
881
|
+
information on that process, see the
|
882
|
+
[cert regen docs](https://puppet.com/docs/puppet/latest/ssl_regenerate_certificates.html).
|
871
883
|
|
872
884
|
To see all the alternate names your servers are using, log into your CA server
|
873
885
|
and run `puppetserver ca list --all`, then check the output for `(alt names: ...)`.
|
@@ -1085,6 +1097,14 @@ EOT
|
|
1085
1097
|
certificate revocation checking and does not attempt to download the CRL.
|
1086
1098
|
EOT
|
1087
1099
|
},
|
1100
|
+
:ciphers => {
|
1101
|
+
:default => 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256',
|
1102
|
+
:type => :string,
|
1103
|
+
:desc => "The list of ciphersuites for TLS connections initiated by puppet. The
|
1104
|
+
default value is chosen to support TLS 1.0 and up, but can be made
|
1105
|
+
more restrictive if needed. The ciphersuites must be specified in OpenSSL
|
1106
|
+
format, not IANA."
|
1107
|
+
},
|
1088
1108
|
:key_type => {
|
1089
1109
|
:default => 'rsa',
|
1090
1110
|
:type => :enum,
|
@@ -1142,7 +1162,7 @@ EOT
|
|
1142
1162
|
:desc => "The name to use the Certificate Authority certificate.",
|
1143
1163
|
},
|
1144
1164
|
:cadir => {
|
1145
|
-
:default =>
|
1165
|
+
:default => lambda { default_cadir },
|
1146
1166
|
:type => :directory,
|
1147
1167
|
:desc => "The root directory for the certificate authority.",
|
1148
1168
|
},
|
@@ -1497,7 +1517,9 @@ EOT
|
|
1497
1517
|
See the report reference for information on the built-in report
|
1498
1518
|
handlers; custom report handlers can also be loaded from modules.
|
1499
1519
|
(Report handlers are loaded from the lib directory, at
|
1500
|
-
`puppet/reports/NAME.rb`.)
|
1520
|
+
`puppet/reports/NAME.rb`.)
|
1521
|
+
|
1522
|
+
To turn off reports entirely, set this to `none`",
|
1501
1523
|
},
|
1502
1524
|
:reportdir => {
|
1503
1525
|
:default => "$vardir/reports",
|
@@ -1760,7 +1782,7 @@ EOT
|
|
1760
1782
|
},
|
1761
1783
|
:agent_disabled_lockfile => {
|
1762
1784
|
:default => "$statedir/agent_disabled.lock",
|
1763
|
-
:type => :
|
1785
|
+
:type => :string,
|
1764
1786
|
:desc => "A lock file to indicate that puppet agent runs have been administratively
|
1765
1787
|
disabled. File contains a JSON object with state information.",
|
1766
1788
|
},
|