puppet 7.26.0-x86-mingw32 → 7.28.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +34 -33
- data/Rakefile +0 -27
- data/examples/enc/regexp_nodes/regexp_nodes.rb +1 -1
- data/ext/project_data.yaml +2 -2
- data/lib/puppet/application/ssl.rb +42 -7
- data/lib/puppet/application.rb +5 -1
- data/lib/puppet/configurer.rb +1 -1
- data/lib/puppet/file_system/file_impl.rb +1 -1
- data/lib/puppet/file_system/posix.rb +1 -1
- data/lib/puppet/functions/split.rb +28 -1
- data/lib/puppet/functions/versioncmp.rb +1 -1
- data/lib/puppet/http/service/compiler.rb +4 -0
- data/lib/puppet/indirector/catalog/compiler.rb +12 -4
- data/lib/puppet/indirector/catalog/rest.rb +8 -0
- data/lib/puppet/interface/action.rb +4 -2
- data/lib/puppet/interface/action_builder.rb +4 -9
- data/lib/puppet/node/environment.rb +6 -4
- data/lib/puppet/pops/loader/ruby_data_type_instantiator.rb +1 -1
- data/lib/puppet/pops/loader/ruby_function_instantiator.rb +1 -1
- data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +1 -1
- data/lib/puppet/pops/time/timespan.rb +1 -1
- data/lib/puppet/provider/package/appdmg.rb +1 -1
- data/lib/puppet/provider/package/apt.rb +1 -1
- data/lib/puppet/provider/package/dnf.rb +2 -1
- data/lib/puppet/provider/package/dnfmodule.rb +1 -1
- data/lib/puppet/provider/package/windows/package.rb +2 -2
- data/lib/puppet/provider/package/yum.rb +2 -2
- data/lib/puppet/provider/service/init.rb +2 -5
- data/lib/puppet/provider/service/systemd.rb +4 -3
- data/lib/puppet/settings.rb +16 -2
- data/lib/puppet/ssl/ssl_context.rb +10 -15
- data/lib/puppet/type/component.rb +1 -1
- data/lib/puppet/type/exec.rb +15 -7
- data/lib/puppet/type/resources.rb +1 -0
- data/lib/puppet/util/command_line/trollop.rb +1 -1
- data/lib/puppet/util/execution.rb +9 -3
- data/lib/puppet/util/package/version/pip.rb +2 -2
- data/lib/puppet/util/windows/adsi.rb +7 -0
- data/lib/puppet/util/windows/sid.rb +4 -2
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet/x509/cert_provider.rb +6 -2
- data/man/man5/puppet.conf.5 +2 -2
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +1 -1
- 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 +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-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 +5 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/integration/application/agent_spec.rb +13 -0
- data/spec/integration/type/exec_spec.rb +13 -0
- data/spec/lib/puppet_spec/puppetserver.rb +1 -0
- data/spec/unit/application/ssl_spec.rb +49 -0
- data/spec/unit/file_system/path_pattern_spec.rb +15 -0
- data/spec/unit/functions/split_spec.rb +6 -0
- data/spec/unit/indirector/catalog/compiler_spec.rb +17 -0
- data/spec/unit/indirector/catalog/rest_spec.rb +17 -0
- data/spec/unit/provider/package/appdmg_spec.rb +1 -1
- data/spec/unit/provider/package/dnf_spec.rb +7 -0
- data/spec/unit/provider/package/dnfmodule_spec.rb +22 -2
- data/spec/unit/provider/service/systemd_spec.rb +8 -6
- data/spec/unit/ssl/certificate_signer_spec.rb +17 -0
- data/spec/unit/ssl/ssl_provider_spec.rb +2 -2
- data/spec/unit/type/exec_spec.rb +13 -0
- data/spec/unit/util/execution_spec.rb +1 -0
- data/spec/unit/util/windows/adsi_spec.rb +25 -0
- metadata +9 -13
@@ -43,9 +43,9 @@ class Puppet::Provider::Package::Windows
|
|
43
43
|
[KEY64, KEY32].each do |mode|
|
44
44
|
mode |= KEY_READ
|
45
45
|
begin
|
46
|
-
open(hive, 'Software\Microsoft\Windows\CurrentVersion\Uninstall', mode) do |uninstall|
|
46
|
+
self.open(hive, 'Software\Microsoft\Windows\CurrentVersion\Uninstall', mode) do |uninstall|
|
47
47
|
each_key(uninstall) do |name, wtime|
|
48
|
-
open(hive, "#{uninstall.keyname}\\#{name}", mode) do |key|
|
48
|
+
self.open(hive, "#{uninstall.keyname}\\#{name}", mode) do |key|
|
49
49
|
yield key, values_by_name(key, reg_value_names_to_load)
|
50
50
|
end
|
51
51
|
end
|
@@ -15,7 +15,7 @@ Puppet::Type.type(:package).provide :yum, :parent => :rpm, :source => :rpm do
|
|
15
15
|
This provider supports the `install_options` attribute, which allows command-line flags to be passed to yum.
|
16
16
|
These options should be specified as an array where each element is either a string or a hash."
|
17
17
|
|
18
|
-
has_feature :install_options, :versionable, :virtual_packages, :install_only
|
18
|
+
has_feature :install_options, :versionable, :virtual_packages, :install_only, :version_ranges
|
19
19
|
|
20
20
|
RPM_VERSION = Puppet::Util::Package::Version::Rpm
|
21
21
|
RPM_VERSION_RANGE = Puppet::Util::Package::Version::Range
|
@@ -255,7 +255,7 @@ defaultfor :osfamily => :redhat, :operatingsystemmajrelease => (4..7).to_a
|
|
255
255
|
operation = update_command
|
256
256
|
self.debug "Ensuring latest, so using #{operation}"
|
257
257
|
else
|
258
|
-
self.debug "Ensuring latest, but package is absent, so using
|
258
|
+
self.debug "Ensuring latest, but package is absent, so using install"
|
259
259
|
operation = :install
|
260
260
|
end
|
261
261
|
should = nil
|
@@ -19,12 +19,9 @@ Puppet::Type.type(:service).provide :init, :parent => :base do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
# Debian and Ubuntu should use the Debian provider.
|
22
|
+
confine :false => ['Debian', 'Ubuntu'].include?(Puppet.runtime[:facter].value('operatingsystem'))
|
22
23
|
# RedHat systems should use the RedHat provider.
|
23
|
-
confine :
|
24
|
-
os = Puppet.runtime[:facter].value(:operatingsystem).downcase
|
25
|
-
family = Puppet.runtime[:facter].value(:osfamily).downcase
|
26
|
-
!(os == 'debian' || os == 'ubuntu' || family == 'redhat')
|
27
|
-
end
|
24
|
+
confine :false => Puppet.runtime[:facter].value('osfamily') == 'RedHat'
|
28
25
|
|
29
26
|
# We can't confine this here, because the init path can be overridden.
|
30
27
|
#confine :exists => defpath
|
@@ -18,7 +18,8 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
|
|
18
18
|
defaultfor :osfamily => :redhat, :operatingsystem => :fedora
|
19
19
|
defaultfor :osfamily => :suse
|
20
20
|
defaultfor :osfamily => :coreos
|
21
|
-
defaultfor :
|
21
|
+
defaultfor :osfamily => :gentoo
|
22
|
+
defaultfor :operatingsystem => :amazon, :operatingsystemmajrelease => ["2", "2023"]
|
22
23
|
defaultfor :operatingsystem => :debian
|
23
24
|
notdefaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["5", "6", "7"] # These are using the "debian" method
|
24
25
|
defaultfor :operatingsystem => :LinuxMint
|
@@ -39,8 +40,8 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
|
|
39
40
|
return []
|
40
41
|
end
|
41
42
|
|
42
|
-
# Static services cannot be enabled or disabled manually. Indirect services
|
43
|
-
# should not be enabled or disabled due to limitations in systemd (see
|
43
|
+
# Static services cannot be enabled or disabled manually. Indirect services
|
44
|
+
# should not be enabled or disabled due to limitations in systemd (see
|
44
45
|
# https://github.com/systemd/systemd/issues/6681).
|
45
46
|
def enabled_insync?(current)
|
46
47
|
case cached_enabled?[:output]
|
data/lib/puppet/settings.rb
CHANGED
@@ -5,6 +5,7 @@ require_relative '../puppet/util/command_line/puppet_option_parser'
|
|
5
5
|
require 'forwardable'
|
6
6
|
require 'fileutils'
|
7
7
|
require 'concurrent'
|
8
|
+
require_relative 'concurrent/lock'
|
8
9
|
|
9
10
|
# The class for handling configuration files.
|
10
11
|
class Puppet::Settings
|
@@ -146,8 +147,21 @@ class Puppet::Settings
|
|
146
147
|
@configuration_file = nil
|
147
148
|
|
148
149
|
# And keep a per-environment cache
|
149
|
-
|
150
|
-
@
|
150
|
+
# We can't use Concurrent::Map because we want to preserve insertion order
|
151
|
+
@cache_lock = Puppet::Concurrent::Lock.new
|
152
|
+
@cache = Concurrent::Hash.new do |hash, key|
|
153
|
+
@cache_lock.synchronize do
|
154
|
+
break hash[key] if hash.key?(key)
|
155
|
+
hash[key] = Concurrent::Hash.new
|
156
|
+
end
|
157
|
+
end
|
158
|
+
@values_lock = Puppet::Concurrent::Lock.new
|
159
|
+
@values = Concurrent::Hash.new do |hash, key|
|
160
|
+
@values_lock.synchronize do
|
161
|
+
break hash[key] if hash.key?(key)
|
162
|
+
hash[key] = Concurrent::Hash.new
|
163
|
+
end
|
164
|
+
end
|
151
165
|
|
152
166
|
# The list of sections we've used.
|
153
167
|
@used = []
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require_relative '../../puppet/ssl'
|
2
2
|
|
3
3
|
module Puppet::SSL
|
4
|
+
# The `keyword_init: true` option is no longer needed in Ruby >= 3.2
|
4
5
|
SSLContext = Struct.new(
|
5
6
|
:store,
|
6
7
|
:cacerts,
|
@@ -9,22 +10,16 @@ module Puppet::SSL
|
|
9
10
|
:client_cert,
|
10
11
|
:client_chain,
|
11
12
|
:revocation,
|
12
|
-
:verify_peer
|
13
|
+
:verify_peer,
|
14
|
+
keyword_init: true
|
13
15
|
) do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
# This is an idiom to initialize a Struct from keyword
|
23
|
-
# arguments. Ruby 2.5 introduced `keyword_init: true` for
|
24
|
-
# that purpose, but we need to support older versions.
|
25
|
-
def initialize(kwargs = {})
|
26
|
-
super({})
|
27
|
-
DEFAULTS.merge(**kwargs).each { |k,v| self[k] = v }
|
16
|
+
def initialize(*)
|
17
|
+
super
|
18
|
+
self[:cacerts] ||= []
|
19
|
+
self[:crls] ||= []
|
20
|
+
self[:client_chain] ||= []
|
21
|
+
self[:revocation] = true if self[:revocation].nil?
|
22
|
+
self[:verify_peer] = true if self[:verify_peer].nil?
|
28
23
|
end
|
29
24
|
end
|
30
25
|
end
|
data/lib/puppet/type/exec.rb
CHANGED
@@ -592,13 +592,17 @@ module Puppet
|
|
592
592
|
cmd = self[:command]
|
593
593
|
cmd = cmd[0] if cmd.is_a? Array
|
594
594
|
|
595
|
-
cmd.
|
596
|
-
|
597
|
-
|
595
|
+
if cmd.is_a?(Puppet::Pops::Evaluator::DeferredValue)
|
596
|
+
self.debug("The 'command' parameter is deferred and cannot be autorequired")
|
597
|
+
else
|
598
|
+
cmd.scan(file_regex) { |str|
|
599
|
+
reqs << str
|
600
|
+
}
|
598
601
|
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
+
cmd.scan(/^"([^"]+)"/) { |str|
|
603
|
+
reqs << str
|
604
|
+
}
|
605
|
+
end
|
602
606
|
|
603
607
|
[:onlyif, :unless].each { |param|
|
604
608
|
tmp = self[param]
|
@@ -613,7 +617,11 @@ module Puppet
|
|
613
617
|
# unqualified files, but, well, that's a bit more annoying
|
614
618
|
# to do.
|
615
619
|
line = line[0] if line.is_a? Array
|
616
|
-
|
620
|
+
if line.is_a?(Puppet::Pops::Evaluator::DeferredValue)
|
621
|
+
self.debug("The '#{param}' parameter is deferred and cannot be autorequired")
|
622
|
+
else
|
623
|
+
reqs += line.scan(file_regex)
|
624
|
+
end
|
617
625
|
end
|
618
626
|
}
|
619
627
|
|
@@ -649,7 +649,7 @@ private
|
|
649
649
|
else
|
650
650
|
require 'open-uri'
|
651
651
|
begin
|
652
|
-
open
|
652
|
+
URI.parse(param).open
|
653
653
|
rescue SystemCallError => e
|
654
654
|
raise CommandlineError, _("file or url for option '%{arg}' cannot be opened: %{value0}") % { arg: arg, value0: e.message }, e.backtrace
|
655
655
|
end
|
@@ -77,7 +77,8 @@ module Puppet::Util::Execution
|
|
77
77
|
# a predictable output
|
78
78
|
english_env = ENV.to_hash.merge( {'LANG' => 'C', 'LC_ALL' => 'C'} )
|
79
79
|
output = Puppet::Util.withenv(english_env) do
|
80
|
-
open
|
80
|
+
# We are intentionally using 'pipe' with open to launch a process
|
81
|
+
open("| #{command_str} 2>&1") do |pipe| # rubocop:disable Security/Open
|
81
82
|
yield pipe
|
82
83
|
end
|
83
84
|
end
|
@@ -222,8 +223,12 @@ module Puppet::Util::Execution
|
|
222
223
|
# Use non-blocking read to check for data. After each attempt,
|
223
224
|
# check whether the child is done. This is done in case the child
|
224
225
|
# forks and inherits stdout, as happens in `foo &`.
|
225
|
-
|
226
|
-
|
226
|
+
# If we encounter EOF, though, then switch to a blocking wait for
|
227
|
+
# the child; after EOF, IO.select will never block and the loop
|
228
|
+
# below will use maximum CPU available.
|
229
|
+
|
230
|
+
wait_flags = Process::WNOHANG
|
231
|
+
until results = Process.waitpid2(child_pid, wait_flags) #rubocop:disable Lint/AssignmentInCondition
|
227
232
|
|
228
233
|
# If not done, wait for data to read with a timeout
|
229
234
|
# This timeout is selected to keep activity low while waiting on
|
@@ -234,6 +239,7 @@ module Puppet::Util::Execution
|
|
234
239
|
output << reader.read_nonblock(4096) if ready
|
235
240
|
rescue Errno::EAGAIN
|
236
241
|
rescue EOFError
|
242
|
+
wait_flags = 0
|
237
243
|
end
|
238
244
|
end
|
239
245
|
|
@@ -149,10 +149,10 @@ module Puppet::Util::Package::Version
|
|
149
149
|
return compare(element, other.at(index)) if element != other.at(index)
|
150
150
|
end
|
151
151
|
elsif (this.is_a? Array) && !(other.is_a? Array)
|
152
|
-
raise Puppet::Error,
|
152
|
+
raise Puppet::Error, "Cannot compare #{this} (Array) with #{other} (#{other.class}). Only ±Float::INFINITY accepted." unless other.abs == Float::INFINITY
|
153
153
|
return other == -Float::INFINITY ? 1 : -1
|
154
154
|
elsif !(this.is_a? Array) && (other.is_a? Array)
|
155
|
-
raise Puppet::Error,
|
155
|
+
raise Puppet::Error, "Cannot compare #{this} (#{this.class}) with #{other} (Array). Only ±Float::INFINITY accepted." unless this.abs == Float::INFINITY
|
156
156
|
return this == -Float::INFINITY ? -1 : 1
|
157
157
|
end
|
158
158
|
this <=> other
|
@@ -175,6 +175,13 @@ module Puppet::Util::Windows::ADSI
|
|
175
175
|
sids = []
|
176
176
|
adsi_child_collection.each do |m|
|
177
177
|
sids << Puppet::Util::Windows::SID.ads_to_principal(m)
|
178
|
+
rescue Puppet::Util::Windows::Error => e
|
179
|
+
case e.code
|
180
|
+
when Puppet::Util::Windows::SID::ERROR_TRUSTED_RELATIONSHIP_FAILURE, Puppet::Util::Windows::SID::ERROR_TRUSTED_DOMAIN_FAILURE
|
181
|
+
sids << Puppet::Util::Windows::SID.unresolved_principal(m.name, m.sid)
|
182
|
+
else
|
183
|
+
raise e
|
184
|
+
end
|
178
185
|
end
|
179
186
|
|
180
187
|
sids
|
@@ -6,8 +6,10 @@ module Puppet::Util::Windows
|
|
6
6
|
extend FFI::Library
|
7
7
|
|
8
8
|
# missing from Windows::Error
|
9
|
-
ERROR_NONE_MAPPED
|
10
|
-
ERROR_INVALID_SID_STRUCTURE
|
9
|
+
ERROR_NONE_MAPPED = 1332
|
10
|
+
ERROR_INVALID_SID_STRUCTURE = 1337
|
11
|
+
ERROR_TRUSTED_DOMAIN_FAILURE = 1788
|
12
|
+
ERROR_TRUSTED_RELATIONSHIP_FAILURE = 1789
|
11
13
|
|
12
14
|
# Well Known SIDs
|
13
15
|
Null = 'S-1-0'
|
data/lib/puppet/version.rb
CHANGED
@@ -346,13 +346,17 @@ class Puppet::X509::CertProvider
|
|
346
346
|
OpenSSL::X509::Request.new(pem)
|
347
347
|
end
|
348
348
|
|
349
|
-
|
350
|
-
|
349
|
+
# Return the path to the cert related object (key, CSR, cert, etc).
|
350
|
+
#
|
351
|
+
# @param base [String] base directory
|
352
|
+
# @param name [String] the name associated with the cert related object
|
351
353
|
def to_path(base, name)
|
352
354
|
raise _("Certname %{name} must not contain unprintable or non-ASCII characters") % { name: name.inspect } unless name =~ VALID_CERTNAME
|
353
355
|
File.join(base, "#{name.downcase}.pem")
|
354
356
|
end
|
355
357
|
|
358
|
+
private
|
359
|
+
|
356
360
|
def permissions_for_setting(name)
|
357
361
|
setting = Puppet.settings.setting(name)
|
358
362
|
perm = { mode: setting.mode.to_i(8) }
|
data/man/man5/puppet.conf.5
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPETCONF" "5" "
|
4
|
+
.TH "PUPPETCONF" "5" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
\fBThis page is autogenerated; any changes will get overwritten\fR
|
6
6
|
.
|
7
7
|
.SH "Configuration settings"
|
@@ -945,7 +945,7 @@ The time to wait for data to be read from an HTTP connection\. If nothing is rea
|
|
945
945
|
The HTTP User\-Agent string to send when making network requests\.
|
946
946
|
.
|
947
947
|
.IP "\(bu" 4
|
948
|
-
\fIDefault\fR: \fBPuppet/7\.
|
948
|
+
\fIDefault\fR: \fBPuppet/7\.28\.0 Ruby/2\.7\.5\-p203 (x86_64\-linux)\fR
|
949
949
|
.
|
950
950
|
.IP "" 0
|
951
951
|
.
|
data/man/man8/puppet-agent.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-AGENT" "8" "
|
4
|
+
.TH "PUPPET\-AGENT" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-agent\fR \- The puppet agent daemon
|
data/man/man8/puppet-apply.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-APPLY" "8" "
|
4
|
+
.TH "PUPPET\-APPLY" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-apply\fR \- Apply Puppet manifests locally
|
data/man/man8/puppet-catalog.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-CATALOG" "8" "
|
4
|
+
.TH "PUPPET\-CATALOG" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-catalog\fR \- Compile, save, view, and convert catalogs\.
|
data/man/man8/puppet-config.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-CONFIG" "8" "
|
4
|
+
.TH "PUPPET\-CONFIG" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-config\fR \- Interact with Puppet\'s settings\.
|
data/man/man8/puppet-describe.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-DESCRIBE" "8" "
|
4
|
+
.TH "PUPPET\-DESCRIBE" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-describe\fR \- Display help about resource types
|
data/man/man8/puppet-device.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-DEVICE" "8" "
|
4
|
+
.TH "PUPPET\-DEVICE" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-device\fR \- Manage remote network devices
|
data/man/man8/puppet-doc.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-DOC" "8" "
|
4
|
+
.TH "PUPPET\-DOC" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-doc\fR \- Generate Puppet references
|
data/man/man8/puppet-epp.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-EPP" "8" "
|
4
|
+
.TH "PUPPET\-EPP" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-epp\fR \- Interact directly with the EPP template parser/renderer\.
|
data/man/man8/puppet-facts.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-FACTS" "8" "
|
4
|
+
.TH "PUPPET\-FACTS" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-facts\fR \- Retrieve and store facts\.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-FILEBUCKET" "8" "
|
4
|
+
.TH "PUPPET\-FILEBUCKET" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket
|
data/man/man8/puppet-generate.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-GENERATE" "8" "
|
4
|
+
.TH "PUPPET\-GENERATE" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-generate\fR \- Generates Puppet code from Ruby definitions\.
|
data/man/man8/puppet-help.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-HELP" "8" "
|
4
|
+
.TH "PUPPET\-HELP" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-help\fR \- Display Puppet help\.
|
data/man/man8/puppet-lookup.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-LOOKUP" "8" "
|
4
|
+
.TH "PUPPET\-LOOKUP" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-lookup\fR \- Interactive Hiera lookup
|
data/man/man8/puppet-module.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-MODULE" "8" "
|
4
|
+
.TH "PUPPET\-MODULE" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-module\fR \- Creates, installs and searches for modules on the Puppet Forge\.
|
data/man/man8/puppet-node.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-NODE" "8" "
|
4
|
+
.TH "PUPPET\-NODE" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-node\fR \- View and manage node definitions\.
|
data/man/man8/puppet-parser.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-PARSER" "8" "
|
4
|
+
.TH "PUPPET\-PARSER" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-parser\fR \- Interact directly with the parser\.
|
data/man/man8/puppet-plugin.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-PLUGIN" "8" "
|
4
|
+
.TH "PUPPET\-PLUGIN" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-plugin\fR \- Interact with the Puppet plugin system\.
|
data/man/man8/puppet-report.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-REPORT" "8" "
|
4
|
+
.TH "PUPPET\-REPORT" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-report\fR \- Create, display, and submit reports\.
|
data/man/man8/puppet-resource.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-RESOURCE" "8" "
|
4
|
+
.TH "PUPPET\-RESOURCE" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-resource\fR \- The resource abstraction layer shell
|
data/man/man8/puppet-script.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-SCRIPT" "8" "
|
4
|
+
.TH "PUPPET\-SCRIPT" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-script\fR \- Run a puppet manifests as a script without compiling a catalog
|
data/man/man8/puppet-ssl.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET\-SSL" "8" "
|
4
|
+
.TH "PUPPET\-SSL" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-ssl\fR \- Manage SSL keys and certificates for puppet SSL clients
|
@@ -42,6 +42,10 @@ submit_request
|
|
42
42
|
Generate a certificate signing request (CSR) and submit it to the CA\. If a private and public key pair already exist, they will be used to generate the CSR\. Otherwise a new key pair will be generated\. If a CSR has already been submitted with the given \fBcertname\fR, then the operation will fail\.
|
43
43
|
.
|
44
44
|
.TP
|
45
|
+
generate_request
|
46
|
+
Generate a certificate signing request (CSR)\. If a private and public key pair already exist, they will be used to generate the CSR\. Otherwise a new key pair will be generated\.
|
47
|
+
.
|
48
|
+
.TP
|
45
49
|
download_cert
|
46
50
|
Download a certificate for this host\. If the current private key matches the downloaded certificate, then the certificate will be saved and used for subsequent requests\. If there is already an existing certificate, it will be overwritten\.
|
47
51
|
.
|
data/man/man8/puppet.8
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
.\" generated with Ronn/v0.7.3
|
2
2
|
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
3
3
|
.
|
4
|
-
.TH "PUPPET" "8" "
|
4
|
+
.TH "PUPPET" "8" "December 2023" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\fR
|
@@ -25,4 +25,4 @@ Specialized:
|
|
25
25
|
catalog Compile, save, view, and convert catalogs\. describe Display help about resource types device Manage remote network devices doc Generate Puppet references epp Interact directly with the EPP template parser/renderer\. facts Retrieve and store facts\. filebucket Store and retrieve files in a filebucket generate Generates Puppet code from Ruby definitions\. node View and manage node definitions\. parser Interact directly with the parser\. plugin Interact with the Puppet plugin system\. script Run a puppet manifests as a script without compiling a catalog ssl Manage SSL keys and certificates for puppet SSL clients
|
26
26
|
.
|
27
27
|
.P
|
28
|
-
See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v7\.
|
28
|
+
See \'puppet help \fIsubcommand\fR \fIaction\fR\' for help on a specific subcommand action\. See \'puppet help \fIsubcommand\fR\' for help on a specific subcommand\. Puppet v7\.28\.0
|
@@ -15,6 +15,19 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
|
|
15
15
|
let(:node) { Puppet::Node.new(Puppet[:certname], environment: 'production')}
|
16
16
|
let(:formatter) { Puppet::Network::FormatHandler.format(:rich_data_json) }
|
17
17
|
|
18
|
+
context 'server identification' do
|
19
|
+
it 'emits a notice if the server sends the X-Puppet-Compiler-Name header' do
|
20
|
+
server.start_server do |port|
|
21
|
+
Puppet[:serverport] = port
|
22
|
+
expect {
|
23
|
+
agent.command_line.args << '--test'
|
24
|
+
agent.run
|
25
|
+
}.to exit_with(0)
|
26
|
+
.and output(%r{Notice: Catalog compiled by test-compiler-hostname}).to_stdout
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
18
31
|
context 'server_list' do
|
19
32
|
it "uses the first server in the list" do
|
20
33
|
Puppet[:server_list] = '127.0.0.1'
|
@@ -75,6 +75,19 @@ describe Puppet::Type.type(:exec), unless: Puppet::Util::Platform.jruby? do
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
+
context 'when an exec sends an EOF' do
|
79
|
+
let(:command) { ["/bin/bash", "-c", "exec /bin/sleep 1 >/dev/null 2>&1"] }
|
80
|
+
|
81
|
+
it 'should not take significant user time' do
|
82
|
+
exec = described_class.new :command => command, :path => ENV['PATH']
|
83
|
+
catalog.add_resource exec
|
84
|
+
timed_apply = Benchmark.measure { catalog.apply }
|
85
|
+
# In testing I found the user time before the patch in 4f35fd262e to be above
|
86
|
+
# 0.3, after the patch it was consistently below 0.1 seconds.
|
87
|
+
expect(timed_apply.utime).to be < 0.3
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
78
91
|
context 'when command is a string' do
|
79
92
|
let(:command) { "ruby -e 'File.open(\"#{path}\", \"w\") { |f| f.print \"foo\" }'" }
|
80
93
|
|
@@ -19,6 +19,7 @@ class PuppetSpec::Puppetserver
|
|
19
19
|
class CatalogServlet < WEBrick::HTTPServlet::AbstractServlet
|
20
20
|
def do_POST request, response
|
21
21
|
response['Content-Type'] = 'application/json'
|
22
|
+
response['X-Puppet-Compiler-Name'] = 'test-compiler-hostname'
|
22
23
|
catalog = Puppet::Resource::Catalog.new(Puppet[:certname], 'production')
|
23
24
|
response.body = catalog.render(:json)
|
24
25
|
end
|