puppet 8.8.1 → 8.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -1
- data/Gemfile.lock +49 -39
- data/README.md +1 -1
- data/ext/project_data.yaml +12 -0
- data/ext/windows/service/daemon.rb +1 -1
- data/install.rb +3 -74
- data/lib/puppet/application/apply.rb +1 -0
- data/lib/puppet/application/filebucket.rb +6 -4
- data/lib/puppet/application/resource.rb +5 -1
- data/lib/puppet/application/ssl.rb +4 -4
- data/lib/puppet/configurer.rb +1 -1
- data/lib/puppet/daemon.rb +13 -1
- data/lib/puppet/defaults.rb +66 -54
- data/lib/puppet/face/catalog.rb +24 -8
- data/lib/puppet/face/help.rb +43 -23
- data/lib/puppet/feature/telnet.rb +1 -5
- data/lib/puppet/functions/capitalize.rb +1 -1
- data/lib/puppet/functions/find_file.rb +4 -0
- data/lib/puppet/functions/hiera.rb +1 -0
- data/lib/puppet/functions/index.rb +2 -2
- data/lib/puppet/functions/lookup.rb +1 -1
- data/lib/puppet/functions/new.rb +1 -1
- data/lib/puppet/functions/regsubst.rb +1 -1
- data/lib/puppet/functions/unique.rb +3 -2
- data/lib/puppet/functions/yaml_data.rb +1 -0
- data/lib/puppet/interface/action_manager.rb +1 -1
- data/lib/puppet/provider/package/pacman.rb +9 -10
- data/lib/puppet/provider/package/pip.rb +1 -1
- data/lib/puppet/provider/service/systemd.rb +1 -0
- data/lib/puppet/reference/configuration.rb +6 -1
- data/lib/puppet/resource/type.rb +15 -1
- data/lib/puppet/resource.rb +1 -1
- data/lib/puppet/scheduler/splay_job.rb +14 -3
- data/lib/puppet/settings.rb +2 -2
- data/lib/puppet/ssl/state_machine.rb +2 -2
- data/lib/puppet/transaction/resource_harness.rb +7 -3
- data/lib/puppet/type/exec.rb +3 -4
- data/lib/puppet/type/file/checksum.rb +4 -2
- data/lib/puppet/type/file/ctime.rb +2 -2
- data/lib/puppet/type/file/mtime.rb +2 -2
- data/lib/puppet/type/file/selcontext.rb +6 -6
- data/lib/puppet/type/package.rb +4 -3
- data/lib/puppet/type/tidy.rb +3 -1
- data/lib/puppet/type/user.rb +1 -1
- data/lib/puppet/util/checksums.rb +1 -0
- data/lib/puppet/util/profiler/aggregate.rb +2 -2
- data/lib/puppet/util/profiler/wall_clock.rb +2 -2
- data/lib/puppet/util/reference.rb +0 -1
- data/lib/puppet/util/selinux.rb +26 -14
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet.rb +5 -1
- data/locales/puppet.pot +75 -75
- data/man/man5/puppet.conf.5 +20 -20
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +2 -1
- data/man/man8/puppet-catalog.8 +5 -2
- 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 +10 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-lookup.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 +3 -3
- data/man/man8/puppet.8 +128 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13db1bd28ba512989060bbff5576c45f394f3fd89a4b60941b161787d892d5ed
|
4
|
+
data.tar.gz: 4c741afa9d710ceaaa60298f944af7acd3fed67a4ab7ff21f5da9f14eef011a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc0a5354f5c639cac584d9b189e375e91c31102f02cb7e86fde6ee05bda21b18d5b0f63da615b91f57397db121e0004f1abe36566d9063c3672e6337df7b9868
|
7
|
+
data.tar.gz: 91a753017be09f6c56c8ee5e3a47f97ba736c8c852021c1eea862173b69c9ca6839ea742924f818ae3bcd465fac080c5b86694000c45c376a19f29586cc12b5a
|
data/Gemfile
CHANGED
@@ -43,6 +43,7 @@ group(:test) do
|
|
43
43
|
# 1.16.0 - 1.16.2 are broken on Windows
|
44
44
|
gem 'ffi', '>= 1.15.5', '< 1.17.0', '!= 1.16.0', '!= 1.16.1', '!= 1.16.2', require: false
|
45
45
|
gem "json-schema", "~> 2.0", require: false
|
46
|
+
gem "racc", "1.5.2", require: false
|
46
47
|
gem "rake", *location_for(ENV['RAKE_LOCATION'] || '~> 13.0')
|
47
48
|
gem "rspec", "~> 3.1", require: false
|
48
49
|
gem "rspec-expectations", ["~> 3.9", "!= 3.9.3"]
|
@@ -62,7 +63,6 @@ end
|
|
62
63
|
group(:development, optional: true) do
|
63
64
|
gem 'memory_profiler', require: false, platforms: [:mri]
|
64
65
|
gem 'pry', require: false, platforms: [:ruby]
|
65
|
-
gem "racc", "1.5.2", require: false, platforms: [:ruby]
|
66
66
|
if RUBY_PLATFORM != 'java'
|
67
67
|
gem 'ruby-prof', '>= 0.16.0', require: false
|
68
68
|
end
|
@@ -75,6 +75,8 @@ end
|
|
75
75
|
group(:documentation, optional: true) do
|
76
76
|
gem 'gettext-setup', '~> 1.0', require: false, platforms: [:ruby]
|
77
77
|
gem 'ronn', '~> 0.7.3', require: false, platforms: [:ruby]
|
78
|
+
gem 'puppet-strings', require: false, platforms: [:ruby]
|
79
|
+
gem 'pandoc-ruby', require: false, platforms: [:ruby]
|
78
80
|
end
|
79
81
|
|
80
82
|
if File.exist? "#{__FILE__}.local"
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
puppet (8.
|
4
|
+
puppet (8.10.0)
|
5
5
|
concurrent-ruby (~> 1.0)
|
6
6
|
deep_merge (~> 1.0)
|
7
7
|
facter (>= 4.3.0, < 5)
|
@@ -27,7 +27,7 @@ GEM
|
|
27
27
|
base64 (0.2.0)
|
28
28
|
bigdecimal (3.1.8)
|
29
29
|
coderay (1.1.3)
|
30
|
-
concurrent-ruby (1.3.
|
30
|
+
concurrent-ruby (1.3.4)
|
31
31
|
crack (1.0.0)
|
32
32
|
bigdecimal
|
33
33
|
rexml
|
@@ -39,13 +39,14 @@ GEM
|
|
39
39
|
rake (>= 12.0.0, < 14.0.0)
|
40
40
|
docopt (0.6.1)
|
41
41
|
erubi (1.13.0)
|
42
|
-
facter (4.
|
42
|
+
facter (4.10.0)
|
43
43
|
hocon (~> 1.3)
|
44
44
|
thor (>= 1.0.1, < 1.3)
|
45
|
-
faraday (2.
|
46
|
-
faraday-net_http (>= 2.0, < 3.
|
45
|
+
faraday (2.12.0)
|
46
|
+
faraday-net_http (>= 2.0, < 3.4)
|
47
|
+
json
|
47
48
|
logger
|
48
|
-
faraday-net_http (3.
|
49
|
+
faraday-net_http (3.3.0)
|
49
50
|
net-http
|
50
51
|
fast_gettext (2.4.0)
|
51
52
|
prime
|
@@ -62,22 +63,22 @@ GEM
|
|
62
63
|
fast_gettext (~> 2.1)
|
63
64
|
gettext (~> 3.4)
|
64
65
|
locale
|
65
|
-
google-apis-core (0.15.
|
66
|
+
google-apis-core (0.15.1)
|
66
67
|
addressable (~> 2.5, >= 2.5.1)
|
67
68
|
googleauth (~> 1.9)
|
68
|
-
httpclient (>= 2.8.
|
69
|
+
httpclient (>= 2.8.3, < 3.a)
|
69
70
|
mini_mime (~> 1.0)
|
71
|
+
mutex_m
|
70
72
|
representable (~> 3.0)
|
71
73
|
retriable (>= 2.0, < 4.a)
|
72
|
-
rexml
|
73
74
|
google-apis-iamcredentials_v1 (0.21.0)
|
74
75
|
google-apis-core (>= 0.15.0, < 2.a)
|
75
|
-
google-apis-storage_v1 (0.
|
76
|
+
google-apis-storage_v1 (0.47.0)
|
76
77
|
google-apis-core (>= 0.15.0, < 2.a)
|
77
|
-
google-cloud-core (1.7.
|
78
|
+
google-cloud-core (1.7.1)
|
78
79
|
google-cloud-env (>= 1.0, < 3.a)
|
79
80
|
google-cloud-errors (~> 1.0)
|
80
|
-
google-cloud-env (2.
|
81
|
+
google-cloud-env (2.2.1)
|
81
82
|
faraday (>= 1.0, < 3.a)
|
82
83
|
google-cloud-errors (1.4.0)
|
83
84
|
google-cloud-storage (1.52.0)
|
@@ -89,14 +90,14 @@ GEM
|
|
89
90
|
google-cloud-core (~> 1.6)
|
90
91
|
googleauth (~> 1.9)
|
91
92
|
mini_mime (~> 1.0)
|
92
|
-
googleauth (1.11.
|
93
|
+
googleauth (1.11.1)
|
93
94
|
faraday (>= 1.0, < 3.a)
|
94
95
|
google-cloud-env (~> 2.1)
|
95
96
|
jwt (>= 1.4, < 3.0)
|
96
97
|
multi_json (~> 1.11)
|
97
98
|
os (>= 0.9, < 2.0)
|
98
99
|
signet (>= 0.16, < 2.a)
|
99
|
-
hashdiff (1.1.
|
100
|
+
hashdiff (1.1.1)
|
100
101
|
hiera-eyaml (4.1.0)
|
101
102
|
highline (~> 2.1)
|
102
103
|
optimist (~> 3.1)
|
@@ -107,32 +108,36 @@ GEM
|
|
107
108
|
json (2.7.2)
|
108
109
|
json-schema (2.8.1)
|
109
110
|
addressable (>= 2.4)
|
110
|
-
jwt (2.
|
111
|
+
jwt (2.9.3)
|
111
112
|
base64
|
112
113
|
language_server-protocol (3.17.0.3)
|
113
114
|
locale (2.1.4)
|
114
|
-
logger (1.6.
|
115
|
-
memory_profiler (1.0
|
115
|
+
logger (1.6.1)
|
116
|
+
memory_profiler (1.1.0)
|
116
117
|
method_source (1.1.0)
|
117
118
|
mini_mime (1.1.5)
|
118
|
-
minitar (0.
|
119
|
-
msgpack (1.7.
|
119
|
+
minitar (0.12.1)
|
120
|
+
msgpack (1.7.3)
|
120
121
|
multi_json (1.15.0)
|
121
122
|
mustache (1.1.1)
|
123
|
+
mutex_m (0.2.0)
|
122
124
|
net-http (0.4.1)
|
123
125
|
uri
|
124
126
|
nkf (0.2.0)
|
125
127
|
optimist (3.1.0)
|
126
128
|
os (1.1.4)
|
127
|
-
packaging (0.
|
129
|
+
packaging (0.122.2)
|
128
130
|
artifactory (~> 3)
|
129
131
|
csv (>= 3.1.5)
|
130
132
|
google-cloud-storage
|
131
133
|
googleauth
|
132
134
|
rake (>= 12.3)
|
133
135
|
release-metrics
|
134
|
-
|
135
|
-
|
136
|
+
retriable (~> 3.1, >= 3.1.2)
|
137
|
+
rexml
|
138
|
+
pandoc-ruby (2.1.10)
|
139
|
+
parallel (1.26.3)
|
140
|
+
parser (3.3.5.0)
|
136
141
|
ast (~> 2.4.1)
|
137
142
|
racc
|
138
143
|
prime (0.1.2)
|
@@ -144,6 +149,9 @@ GEM
|
|
144
149
|
public_suffix (6.0.1)
|
145
150
|
puppet-resource_api (1.9.0)
|
146
151
|
hocon (>= 1.0)
|
152
|
+
puppet-strings (4.1.3)
|
153
|
+
rgen (~> 0.9)
|
154
|
+
yard (~> 0.9, < 0.9.37)
|
147
155
|
puppetserver-ca (2.7.0)
|
148
156
|
facter (>= 2.0.1, < 5)
|
149
157
|
racc (1.5.2)
|
@@ -160,8 +168,8 @@ GEM
|
|
160
168
|
trailblazer-option (>= 0.1.1, < 0.2.0)
|
161
169
|
uber (< 0.2.0)
|
162
170
|
retriable (3.1.2)
|
163
|
-
rexml (3.3.
|
164
|
-
|
171
|
+
rexml (3.3.8)
|
172
|
+
rgen (0.9.1)
|
165
173
|
ronn (0.7.3)
|
166
174
|
hpricot (>= 0.8.2)
|
167
175
|
mustache (>= 0.7.0)
|
@@ -170,30 +178,29 @@ GEM
|
|
170
178
|
rspec-core (~> 3.13.0)
|
171
179
|
rspec-expectations (~> 3.13.0)
|
172
180
|
rspec-mocks (~> 3.13.0)
|
173
|
-
rspec-core (3.13.
|
181
|
+
rspec-core (3.13.1)
|
174
182
|
rspec-support (~> 3.13.0)
|
175
|
-
rspec-expectations (3.13.
|
183
|
+
rspec-expectations (3.13.3)
|
176
184
|
diff-lcs (>= 1.2.0, < 2.0)
|
177
185
|
rspec-support (~> 3.13.0)
|
178
186
|
rspec-its (1.3.0)
|
179
187
|
rspec-core (>= 3.0.0)
|
180
188
|
rspec-expectations (>= 3.0.0)
|
181
|
-
rspec-mocks (3.13.
|
189
|
+
rspec-mocks (3.13.2)
|
182
190
|
diff-lcs (>= 1.2.0, < 2.0)
|
183
191
|
rspec-support (~> 3.13.0)
|
184
192
|
rspec-support (3.13.1)
|
185
|
-
rubocop (1.
|
193
|
+
rubocop (1.67.0)
|
186
194
|
json (~> 2.3)
|
187
195
|
language_server-protocol (>= 3.17.0)
|
188
196
|
parallel (~> 1.10)
|
189
197
|
parser (>= 3.3.0.2)
|
190
198
|
rainbow (>= 2.2.2, < 4.0)
|
191
199
|
regexp_parser (>= 2.4, < 3.0)
|
192
|
-
|
193
|
-
rubocop-ast (>= 1.31.1, < 2.0)
|
200
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
194
201
|
ruby-progressbar (~> 1.7)
|
195
202
|
unicode-display_width (>= 2.4.0, < 3.0)
|
196
|
-
rubocop-ast (1.
|
203
|
+
rubocop-ast (1.32.3)
|
197
204
|
parser (>= 3.3.1.0)
|
198
205
|
rubocop-capybara (2.21.0)
|
199
206
|
rubocop (~> 1.41)
|
@@ -201,7 +208,7 @@ GEM
|
|
201
208
|
rubocop (~> 1.61)
|
202
209
|
rubocop-i18n (3.0.0)
|
203
210
|
rubocop (~> 1.0)
|
204
|
-
rubocop-performance (1.
|
211
|
+
rubocop-performance (1.22.1)
|
205
212
|
rubocop (>= 1.48.1, < 2.0)
|
206
213
|
rubocop-ast (>= 1.31.1, < 2.0)
|
207
214
|
rubocop-rake (0.6.0)
|
@@ -223,23 +230,24 @@ GEM
|
|
223
230
|
jwt (>= 1.5, < 3.0)
|
224
231
|
multi_json (~> 1.10)
|
225
232
|
singleton (0.2.0)
|
226
|
-
strscan (3.1.0)
|
227
233
|
syslog (0.1.2)
|
228
234
|
text (1.3.1)
|
229
235
|
thor (1.2.2)
|
230
236
|
trailblazer-option (0.1.2)
|
231
237
|
uber (0.1.0)
|
232
|
-
unicode-display_width (2.
|
233
|
-
uri (0.13.
|
234
|
-
vcr (6.
|
235
|
-
|
238
|
+
unicode-display_width (2.6.0)
|
239
|
+
uri (0.13.1)
|
240
|
+
vcr (6.3.1)
|
241
|
+
base64
|
242
|
+
webmock (3.24.0)
|
236
243
|
addressable (>= 2.8.0)
|
237
244
|
crack (>= 0.3.2)
|
238
245
|
hashdiff (>= 0.4.0, < 2.0.0)
|
239
|
-
webrick (1.8.
|
246
|
+
webrick (1.8.2)
|
240
247
|
yard (0.9.36)
|
241
248
|
|
242
249
|
PLATFORMS
|
250
|
+
ruby
|
243
251
|
x86_64-linux
|
244
252
|
|
245
253
|
DEPENDENCIES
|
@@ -255,9 +263,11 @@ DEPENDENCIES
|
|
255
263
|
minitar (~> 0.9)
|
256
264
|
msgpack (~> 1.2)
|
257
265
|
packaging (~> 0.113)
|
266
|
+
pandoc-ruby
|
258
267
|
pry
|
259
268
|
puppet!
|
260
269
|
puppet-resource_api (~> 1.5)
|
270
|
+
puppet-strings
|
261
271
|
puppetserver-ca (~> 2.0)
|
262
272
|
racc (= 1.5.2)
|
263
273
|
rake (~> 13.0)
|
@@ -280,4 +290,4 @@ DEPENDENCIES
|
|
280
290
|
yard
|
281
291
|
|
282
292
|
BUNDLED WITH
|
283
|
-
2.
|
293
|
+
2.5.19
|
data/README.md
CHANGED
@@ -34,7 +34,7 @@ see the [Quick Start to Developing on Puppet](docs/quickstart.md) guide.
|
|
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
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/
|
37
|
+
[Contribution Documents](https://github.com/puppetlabs/.github/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
|
data/ext/project_data.yaml
CHANGED
@@ -179,7 +179,7 @@ class WindowsDaemon < Puppet::Util::Windows::Daemon
|
|
179
179
|
|
180
180
|
def parse_log_level(puppet_path, cmdline_debug)
|
181
181
|
begin
|
182
|
-
loglevel =
|
182
|
+
loglevel = "notice"
|
183
183
|
unless loglevel && respond_to?("log_#{loglevel}")
|
184
184
|
loglevel = :notice
|
185
185
|
log_err("Failed to determine loglevel, defaulting to #{loglevel}")
|
data/install.rb
CHANGED
@@ -36,14 +36,6 @@ require 'tempfile'
|
|
36
36
|
require 'optparse'
|
37
37
|
require 'ostruct'
|
38
38
|
|
39
|
-
begin
|
40
|
-
require 'rdoc/rdoc'
|
41
|
-
$haverdoc = true
|
42
|
-
rescue LoadError
|
43
|
-
puts "Missing rdoc; skipping documentation"
|
44
|
-
$haverdoc = false
|
45
|
-
end
|
46
|
-
|
47
39
|
PREREQS = %w{openssl facter cgi}
|
48
40
|
MIN_FACTER_VERSION = 1.5
|
49
41
|
|
@@ -140,25 +132,9 @@ def prepare_installation
|
|
140
132
|
InstallOptions.check_prereqs = true
|
141
133
|
InstallOptions.batch_files = true
|
142
134
|
|
143
|
-
# Only try to do docs if we're sure they have rdoc
|
144
|
-
if $haverdoc
|
145
|
-
InstallOptions.rdoc = true
|
146
|
-
InstallOptions.ri = true
|
147
|
-
else
|
148
|
-
InstallOptions.rdoc = false
|
149
|
-
InstallOptions.ri = false
|
150
|
-
end
|
151
|
-
|
152
|
-
|
153
135
|
ARGV.options do |opts|
|
154
136
|
opts.banner = "Usage: #{File.basename($0)} [options]"
|
155
137
|
opts.separator ""
|
156
|
-
opts.on('--[no-]rdoc', 'Prevents the creation of RDoc output.', 'Default on.') do |onrdoc|
|
157
|
-
InstallOptions.rdoc = onrdoc
|
158
|
-
end
|
159
|
-
opts.on('--[no-]ri', 'Prevents the creation of RI output.', 'Default off on mswin32.') do |onri|
|
160
|
-
InstallOptions.ri = onri
|
161
|
-
end
|
162
138
|
opts.on('--[no-]configs', 'Prevents the installation of config files', 'Default off.') do |ontest|
|
163
139
|
InstallOptions.configs = ontest
|
164
140
|
end
|
@@ -205,14 +181,8 @@ def prepare_installation
|
|
205
181
|
InstallOptions.batch_files = false
|
206
182
|
end
|
207
183
|
opts.on('--quick', 'Performs a quick installation. Only the', 'installation is done.') do |quick|
|
208
|
-
InstallOptions.rdoc = false
|
209
|
-
InstallOptions.ri = false
|
210
|
-
InstallOptions.configs = true
|
211
|
-
end
|
212
|
-
opts.on('--full', 'Performs a full installation. All', 'optional installation steps are run.') do |full|
|
213
|
-
InstallOptions.rdoc = true
|
214
|
-
InstallOptions.ri = true
|
215
184
|
InstallOptions.configs = true
|
185
|
+
warn "--quick is deprecated. Use --configs"
|
216
186
|
end
|
217
187
|
opts.separator("")
|
218
188
|
opts.on_tail('--help', "Shows this help text.") do
|
@@ -223,9 +193,6 @@ def prepare_installation
|
|
223
193
|
opts.parse!
|
224
194
|
end
|
225
195
|
|
226
|
-
version = [RbConfig::CONFIG["MAJOR"], RbConfig::CONFIG["MINOR"]].join(".")
|
227
|
-
libdir = File.join(RbConfig::CONFIG["libdir"], "ruby", version)
|
228
|
-
|
229
196
|
# Mac OS X 10.5 and higher declare bindir
|
230
197
|
# /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
|
231
198
|
# which is not generally where people expect executables to be installed
|
@@ -312,7 +279,8 @@ def prepare_installation
|
|
312
279
|
if sitelibdir.nil?
|
313
280
|
sitelibdir = $LOAD_PATH.find { |x| x =~ /site_ruby/ }
|
314
281
|
if sitelibdir.nil?
|
315
|
-
|
282
|
+
version = [RbConfig::CONFIG["MAJOR"], RbConfig::CONFIG["MINOR"]].join(".")
|
283
|
+
sitelibdir = File.join(RbConfig::CONFIG["libdir"], "ruby", version, "site_ruby")
|
316
284
|
elsif sitelibdir !~ Regexp.quote(version)
|
317
285
|
sitelibdir = File.join(sitelibdir, version)
|
318
286
|
end
|
@@ -328,10 +296,6 @@ def prepare_installation
|
|
328
296
|
# This is the new way forward
|
329
297
|
if not InstallOptions.destdir.nil?
|
330
298
|
destdir = InstallOptions.destdir
|
331
|
-
# To be deprecated once people move over to using --destdir option
|
332
|
-
elsif not ENV['DESTDIR'].nil?
|
333
|
-
destdir = ENV['DESTDIR']
|
334
|
-
warn "DESTDIR is deprecated. Use --destdir instead."
|
335
299
|
else
|
336
300
|
destdir = ''
|
337
301
|
end
|
@@ -362,7 +326,6 @@ def prepare_installation
|
|
362
326
|
InstallOptions.codedir = codedir
|
363
327
|
InstallOptions.config_dir = configdir
|
364
328
|
InstallOptions.bin_dir = bindir
|
365
|
-
InstallOptions.lib_dir = libdir
|
366
329
|
InstallOptions.man_dir = mandir
|
367
330
|
InstallOptions.var_dir = vardir
|
368
331
|
InstallOptions.public_dir = publicdir
|
@@ -381,36 +344,6 @@ def join(basedir, dir)
|
|
381
344
|
"#{basedir}#{dir}"
|
382
345
|
end
|
383
346
|
|
384
|
-
##
|
385
|
-
# Build the rdoc documentation. Also, try to build the RI documentation.
|
386
|
-
#
|
387
|
-
def build_rdoc(files)
|
388
|
-
return unless $haverdoc
|
389
|
-
begin
|
390
|
-
r = RDoc::RDoc.new
|
391
|
-
r.document(["--main", "README", "--title", "Puppet -- Site Configuration Management", "--line-numbers"] + files)
|
392
|
-
rescue RDoc::RDocError => e
|
393
|
-
$stderr.puts e.message
|
394
|
-
rescue Exception => e
|
395
|
-
$stderr.puts "Couldn't build RDoc documentation\n#{e.message}"
|
396
|
-
end
|
397
|
-
end
|
398
|
-
|
399
|
-
def build_ri(files)
|
400
|
-
return unless $haverdoc
|
401
|
-
return if $osname == "windows"
|
402
|
-
begin
|
403
|
-
ri = RDoc::RDoc.new
|
404
|
-
#ri.document(["--ri-site", "--merge"] + files)
|
405
|
-
ri.document(["--ri-site"] + files)
|
406
|
-
rescue RDoc::RDocError => e
|
407
|
-
$stderr.puts e.message
|
408
|
-
rescue Exception => e
|
409
|
-
$stderr.puts "Couldn't build Ri documentation\n#{e.message}"
|
410
|
-
$stderr.puts "Continuing with install..."
|
411
|
-
end
|
412
|
-
end
|
413
|
-
|
414
347
|
##
|
415
348
|
# Install file(s) from ./bin to RbConfig::CONFIG['bindir']. Patch it on the way
|
416
349
|
# to insert a #! line; on a Unix install, the command is named as expected
|
@@ -476,8 +409,6 @@ FileUtils.cd File.dirname(__FILE__) do
|
|
476
409
|
# Set these values to what you want installed.
|
477
410
|
configs = glob(%w{conf/puppet.conf conf/hiera.yaml})
|
478
411
|
bins = glob(%w{bin/*})
|
479
|
-
#rdoc = glob(%w{bin/* lib/**/*.rb README* }).reject { |e| e=~ /\.(bat|cmd)$/ }
|
480
|
-
#ri = glob(%w{bin/*.rb lib/**/*.rb}).reject { |e| e=~ /\.(bat|cmd)$/ }
|
481
412
|
man = glob(%w{man/man[0-9]/*})
|
482
413
|
libs = glob(%w{lib/**/*})
|
483
414
|
locales = glob(%w{locales/**/*})
|
@@ -488,8 +419,6 @@ FileUtils.cd File.dirname(__FILE__) do
|
|
488
419
|
windows_bins = glob(%w{ext/windows/*bat})
|
489
420
|
end
|
490
421
|
|
491
|
-
#build_rdoc(rdoc) if InstallOptions.rdoc
|
492
|
-
#build_ri(ri) if InstallOptions.ri
|
493
422
|
do_configs(configs, InstallOptions.config_dir) if InstallOptions.configs
|
494
423
|
do_bins(bins, InstallOptions.bin_dir)
|
495
424
|
do_bins(windows_bins, InstallOptions.bin_dir, 'ext/windows/') if $osname == "windows" && InstallOptions.batch_files
|
@@ -153,6 +153,7 @@ class Puppet::Application::Apply < Puppet::Application
|
|
153
153
|
|
154
154
|
EXAMPLE
|
155
155
|
-------
|
156
|
+
$ puppet apply -e 'notify { "hello world": }'
|
156
157
|
$ puppet apply -l /tmp/manifest.log manifest.pp
|
157
158
|
$ puppet apply --modulepath=/root/dev/modules -e "include ntpd::server"
|
158
159
|
$ puppet apply --catalog catalog.json
|
@@ -76,10 +76,11 @@ class Puppet::Application::Filebucket < Puppet::Application
|
|
76
76
|
use your local file bucket by specifying '--local', or by specifying
|
77
77
|
'--bucket' with a local path.
|
78
78
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
79
|
+
**Important**: When you enable and use the backup option, and by extension
|
80
|
+
the filebucket resource, you must ensure that sufficient disk space is
|
81
|
+
available for the file backups. Generally, you can provide the disk space
|
82
|
+
by using one of the following two options:
|
83
|
+
|
83
84
|
- Use a `find` command and `crontab` entry to retain only the last X days
|
84
85
|
of file backups. For example:
|
85
86
|
|
@@ -187,6 +188,7 @@ class Puppet::Application::Filebucket < Puppet::Application
|
|
187
188
|
|
188
189
|
$ puppet filebucket -l -t "2015-05-11 09:30:00" list
|
189
190
|
d43a6ecaa892a1962398ac9170ea9bf2 2015-05-11 09:27:56 /tmp/TestFile
|
191
|
+
|
190
192
|
## Manage files in a specific local filebucket
|
191
193
|
$ puppet filebucket -b /tmp/TestBucket backup /tmp/TestFile2
|
192
194
|
/tmp/TestFile2: d41d8cd98f00b204e9800998ecf8427e
|
@@ -146,7 +146,11 @@ class Puppet::Application::Resource < Puppet::Application
|
|
146
146
|
# If the specified environment does not exist locally, fall back to the default (production) environment
|
147
147
|
env = Puppet.lookup(:environments).get(Puppet[:environment]) || create_default_environment
|
148
148
|
|
149
|
-
Puppet.override(
|
149
|
+
Puppet.override(
|
150
|
+
current_environment: env,
|
151
|
+
loaders: Puppet::Pops::Loaders.new(env),
|
152
|
+
stringify_rich: true
|
153
|
+
) do
|
150
154
|
type, name, params = parse_args(command_line.args)
|
151
155
|
|
152
156
|
raise _("Editing with Yaml output is not supported") if options[:edit] and options[:to_yaml]
|
@@ -57,13 +57,13 @@ class Puppet::Application::Ssl < Puppet::Application
|
|
57
57
|
* submit_request:
|
58
58
|
Generate a certificate signing request (CSR) and submit it to the CA. If
|
59
59
|
a private and public key pair already exist, they will be used to generate
|
60
|
-
the CSR. Otherwise a new key pair will be generated. If a CSR has already
|
60
|
+
the CSR. Otherwise, a new key pair will be generated. If a CSR has already
|
61
61
|
been submitted with the given `certname`, then the operation will fail.
|
62
62
|
|
63
63
|
* generate_request:
|
64
|
-
Generate a certificate signing request (CSR). If
|
65
|
-
|
66
|
-
|
64
|
+
Generate a certificate signing request (CSR). If a private and public key
|
65
|
+
pair exist, they will be used to generate the CSR. Otherwise a new key
|
66
|
+
pair will be generated.
|
67
67
|
|
68
68
|
* download_cert:
|
69
69
|
Download a certificate for this host. If the current private key matches
|
data/lib/puppet/configurer.rb
CHANGED
@@ -132,7 +132,7 @@ class Puppet::Configurer
|
|
132
132
|
end
|
133
133
|
|
134
134
|
def warn_number_of_facts(size, max_number)
|
135
|
-
Puppet.warning _("The current total number of
|
135
|
+
Puppet.warning _("The current total number of fact values: %{size} exceeds the fact values limit: %{max_size}") % { size: size, max_size: max_number }
|
136
136
|
end
|
137
137
|
|
138
138
|
def warn_fact_name_length(name, max_length)
|
data/lib/puppet/daemon.rb
CHANGED
@@ -157,7 +157,15 @@ class Puppet::Daemon
|
|
157
157
|
|
158
158
|
# Loop forever running events - or, at least, until we exit.
|
159
159
|
def run_event_loop
|
160
|
-
|
160
|
+
splaylimit = Puppet[:splay] ? Puppet[:splaylimit] : 0
|
161
|
+
|
162
|
+
agent_run = Puppet::Scheduler.create_job(Puppet[:runinterval], true, splaylimit) do |job|
|
163
|
+
if job.splay != 0
|
164
|
+
Puppet.info "Running agent every #{job.run_interval} seconds with splay #{job.splay} of #{job.splay_limit} seconds"
|
165
|
+
else
|
166
|
+
Puppet.info "Running agent every #{job.run_interval} seconds"
|
167
|
+
end
|
168
|
+
|
161
169
|
# Splay for the daemon is handled in the scheduler
|
162
170
|
agent.run(:splay => false)
|
163
171
|
end
|
@@ -165,6 +173,9 @@ class Puppet::Daemon
|
|
165
173
|
reparse_run = Puppet::Scheduler.create_job(Puppet[:filetimeout]) do
|
166
174
|
Puppet.settings.reparse_config_files
|
167
175
|
agent_run.run_interval = Puppet[:runinterval]
|
176
|
+
# Puppet[:splaylimit] defaults to Puppet[:runinterval] so if runinterval
|
177
|
+
# changes, but splaylimit doesn't, we'll still recalculate splay
|
178
|
+
agent_run.splay_limit = Puppet[:splay] ? Puppet[:splaylimit] : 0
|
168
179
|
if Puppet[:filetimeout] == 0
|
169
180
|
reparse_run.disable
|
170
181
|
else
|
@@ -181,6 +192,7 @@ class Puppet::Daemon
|
|
181
192
|
|
182
193
|
reparse_run.disable if Puppet[:filetimeout] == 0
|
183
194
|
|
195
|
+
# these are added in a different order than they are defined
|
184
196
|
@scheduler.run_loop([reparse_run, agent_run, signal_loop])
|
185
197
|
end
|
186
198
|
end
|