puppet 7.17.0-x64-mingw32 → 7.18.0-x64-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 39cbb24d30ce1b44d52015647d271a626c59d55cb7a0a31a7159de16b74b4ce4
4
- data.tar.gz: 7705591fc0fd2ed3559c29d7d90f803a6730ac835207e919e92195145aae0a8c
3
+ metadata.gz: 4bf4aca20e82cad4e424caa506a51e690eb74007eb7f1a536eb7d2b1b085d971
4
+ data.tar.gz: 439e9ec7147b6762286c967e20891056a6cac3f8924aaba80232964de8f32f01
5
5
  SHA512:
6
- metadata.gz: e8a67243e1e989aebe187b5281f7df8bda31c0c7b3ce27c50f4d5ed146d3a6c164e9125a114a9d1d65a6969f14979b9e448c0df079689b5616ec61217ef5ca55
7
- data.tar.gz: cef70451f5c9c09e871807b61c04d4d38270878b13bbdebb107391f6c98cc87f77d789b81fb2399358c64e86f5d1764ee8b41fab004ee5465e3f6bdc17dc46b1
6
+ metadata.gz: cf71e04887d4fc32a73f2fccb8558705e25ef20e66b5ac7b55a8f2e6f405b867faa4846f46313ec1cf664256539a3673aa7c18b617590ac845af1284f555c8ef
7
+ data.tar.gz: 149c2d818067d98dc89341854c608f9e45c02c62eaea024a92cf804895c455229a3f3cf7975344e1ab5334b17d7917faa903769ac1b39abc9d44f2938579d34e
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  GIT
2
2
  remote: https://github.com/puppetlabs/packaging
3
- revision: b791353d4f81dbb1df5ce3d79e95bd008b47beb6
3
+ revision: 6edc2f8e4ebe3cbea96c3af9c294bcd6e2953648
4
4
  branch: 1.0.x
5
5
  specs:
6
- packaging (0.106.3.6.gb791353)
6
+ packaging (0.107.0.9.g6edc2f8)
7
7
  apt_stage_artifacts
8
8
  artifactory (~> 3)
9
9
  csv (= 3.1.5)
@@ -15,7 +15,7 @@ GIT
15
15
  PATH
16
16
  remote: .
17
17
  specs:
18
- puppet (7.17.0)
18
+ puppet (7.18.0)
19
19
  CFPropertyList (~> 2.2)
20
20
  concurrent-ruby (~> 1.0)
21
21
  deep_merge (~> 1.0)
@@ -33,7 +33,7 @@ GEM
33
33
  CFPropertyList (2.3.6)
34
34
  addressable (2.8.0)
35
35
  public_suffix (>= 2.0.2, < 5.0)
36
- apt_stage_artifacts (0.10.1)
36
+ apt_stage_artifacts (0.11.0)
37
37
  docopt
38
38
  artifactory (3.0.15)
39
39
  ast (2.4.2)
@@ -48,7 +48,7 @@ GEM
48
48
  digest-crc (0.6.4)
49
49
  rake (>= 12.0.0, < 14.0.0)
50
50
  docopt (0.6.1)
51
- facter (4.2.9)
51
+ facter (4.2.10)
52
52
  hocon (~> 1.3)
53
53
  thor (>= 1.0.1, < 2.0)
54
54
  faraday (2.3.0)
@@ -64,7 +64,7 @@ GEM
64
64
  fast_gettext (~> 1.1.0)
65
65
  gettext (>= 3.0.2, < 3.3.0)
66
66
  locale
67
- google-apis-core (0.5.0)
67
+ google-apis-core (0.7.0)
68
68
  addressable (~> 2.5, >= 2.5.1)
69
69
  googleauth (>= 0.16.2, < 2.a)
70
70
  httpclient (>= 2.8.1, < 3.a)
@@ -73,17 +73,17 @@ GEM
73
73
  retriable (>= 2.0, < 4.a)
74
74
  rexml
75
75
  webrick
76
- google-apis-iamcredentials_v1 (0.10.0)
77
- google-apis-core (>= 0.4, < 2.a)
78
- google-apis-storage_v1 (0.14.0)
79
- google-apis-core (>= 0.4, < 2.a)
76
+ google-apis-iamcredentials_v1 (0.13.0)
77
+ google-apis-core (>= 0.7, < 2.a)
78
+ google-apis-storage_v1 (0.18.0)
79
+ google-apis-core (>= 0.7, < 2.a)
80
80
  google-cloud-core (1.6.0)
81
81
  google-cloud-env (~> 1.0)
82
82
  google-cloud-errors (~> 1.0)
83
83
  google-cloud-env (1.6.0)
84
84
  faraday (>= 0.17.3, < 3.0)
85
85
  google-cloud-errors (1.2.0)
86
- google-cloud-storage (1.36.2)
86
+ google-cloud-storage (1.37.0)
87
87
  addressable (~> 2.8)
88
88
  digest-crc (~> 0.4)
89
89
  google-apis-iamcredentials_v1 (~> 0.1)
@@ -91,7 +91,7 @@ GEM
91
91
  google-cloud-core (~> 1.6)
92
92
  googleauth (>= 0.16.2, < 2.a)
93
93
  mini_mime (~> 1.0)
94
- googleauth (1.1.3)
94
+ googleauth (1.2.0)
95
95
  faraday (>= 0.17.3, < 3.a)
96
96
  jwt (>= 1.4, < 3.0)
97
97
  memoist (~> 0.16)
@@ -109,14 +109,14 @@ GEM
109
109
  httpclient (2.8.3)
110
110
  json-schema (2.8.1)
111
111
  addressable (>= 2.4)
112
- jwt (2.3.0)
112
+ jwt (2.4.1)
113
113
  locale (2.1.3)
114
114
  memoist (0.16.2)
115
115
  memory_profiler (1.0.0)
116
116
  method_source (1.0.0)
117
117
  mini_mime (1.1.2)
118
118
  minitar (0.9)
119
- msgpack (1.5.1)
119
+ msgpack (1.5.3)
120
120
  multi_json (1.15.0)
121
121
  mustache (1.1.1)
122
122
  optimist (3.0.1)
@@ -182,9 +182,9 @@ GEM
182
182
  ruby2_keywords (0.0.5)
183
183
  scanf (1.0.0)
184
184
  semantic_puppet (1.0.4)
185
- signet (0.16.1)
185
+ signet (0.17.0)
186
186
  addressable (~> 2.8)
187
- faraday (>= 0.17.5, < 3.0)
187
+ faraday (>= 0.17.5, < 3.a)
188
188
  jwt (>= 1.5, < 3.0)
189
189
  multi_json (~> 1.10)
190
190
  text (1.3.1)
@@ -198,7 +198,7 @@ GEM
198
198
  crack (>= 0.3.2)
199
199
  hashdiff (>= 0.4.0, < 2.0.0)
200
200
  webrick (1.7.0)
201
- yard (0.9.27)
201
+ yard (0.9.28)
202
202
  webrick (~> 1.7.0)
203
203
 
204
204
  PLATFORMS
data/lib/puppet/agent.rb CHANGED
@@ -38,15 +38,25 @@ class Puppet::Agent
38
38
  # Perform a run with our client.
39
39
  def run(client_options = {})
40
40
  if disabled?
41
- Puppet.notice _("Skipping run of %{client_class}; administratively disabled (Reason: '%{disable_message}');\nUse 'puppet agent --enable' to re-enable.") % { client_class: client_class, disable_message: disable_message }
41
+ log_disabled_message
42
42
  return
43
43
  end
44
44
 
45
45
  result = nil
46
46
  wait_for_lock_deadline = nil
47
47
  block_run = Puppet::Application.controlled_run do
48
- # splay may sleep for awhile!
49
- splay(client_options.fetch(:splay, Puppet[:splay]))
48
+ # splay may sleep for awhile when running onetime! If not onetime, then
49
+ # the job scheduler splays (only once) so that agents assign themselves a
50
+ # slot within the splay interval.
51
+ do_splay = client_options.fetch(:splay, Puppet[:splay])
52
+ if do_splay
53
+ splay(do_splay)
54
+
55
+ if disabled?
56
+ log_disabled_message
57
+ break
58
+ end
59
+ end
50
60
 
51
61
  # waiting for certs may sleep for awhile depending on onetime, waitforcert and maxwaitforcert!
52
62
  # this needs to happen before forking so that if we fail to obtain certs and try to exit, then
@@ -59,14 +69,19 @@ class Puppet::Agent
59
69
  begin
60
70
  # lock may sleep for awhile depending on waitforlock and maxwaitforlock!
61
71
  lock do
62
- # NOTE: Timeout is pretty heinous as the location in which it
63
- # throws an error is entirely unpredictable, which means that
64
- # it can interrupt code blocks that perform cleanup or enforce
65
- # sanity. The only thing a Puppet agent should do after this
66
- # error is thrown is die with as much dignity as possible.
67
- Timeout.timeout(Puppet[:runtimeout], RunTimeoutError) do
68
- Puppet.override(ssl_context: ssl_context) do
69
- client.run(client_args)
72
+ if disabled?
73
+ log_disabled_message
74
+ nil
75
+ else
76
+ # NOTE: Timeout is pretty heinous as the location in which it
77
+ # throws an error is entirely unpredictable, which means that
78
+ # it can interrupt code blocks that perform cleanup or enforce
79
+ # sanity. The only thing a Puppet agent should do after this
80
+ # error is thrown is die with as much dignity as possible.
81
+ Timeout.timeout(Puppet[:runtimeout], RunTimeoutError) do
82
+ Puppet.override(ssl_context: ssl_context) do
83
+ client.run(client_args)
84
+ end
70
85
  end
71
86
  end
72
87
  end
@@ -88,8 +103,7 @@ class Puppet::Agent
88
103
  end
89
104
  rescue RunTimeoutError => detail
90
105
  Puppet.log_exception(detail, _("Execution of %{client_class} did not complete within %{runtimeout} seconds and was terminated.") %
91
- {client_class: client_class,
92
- runtimeout: Puppet[:runtimeout]})
106
+ {client_class: client_class, runtimeout: Puppet[:runtimeout]})
93
107
  nil
94
108
  rescue StandardError => detail
95
109
  Puppet.log_exception(detail, _("Could not run %{client_class}: %{detail}") % { client_class: client_class, detail: detail })
@@ -155,4 +169,8 @@ class Puppet::Agent
155
169
  sm = Puppet::SSL::StateMachine.new(waitforcert: waitforcert, onetime: Puppet[:onetime])
156
170
  sm.ensure_client_certificate
157
171
  end
172
+
173
+ def log_disabled_message
174
+ Puppet.notice _("Skipping run of %{client_class}; administratively disabled (Reason: '%{disable_message}');\nUse 'puppet agent --enable' to re-enable.") % { client_class: client_class, disable_message: disable_message }
175
+ end
158
176
  end
@@ -6,7 +6,7 @@ class Puppet::InfoService::TaskInformationService
6
6
  env = Puppet.lookup(:environments).get!(environment_name)
7
7
  env.modules.map do |mod|
8
8
  mod.tasks.map do |task|
9
- {:module => {:name => task.module.name}, :name => task.name}
9
+ {:module => {:name => task.module.name}, :name => task.name, :metadata => task.metadata}
10
10
  end
11
11
  end.flatten
12
12
  end
@@ -52,6 +52,10 @@ class Puppet::Module
52
52
  return false
53
53
  end
54
54
 
55
+ def self.is_tasks_file?(path)
56
+ File.file?(path) && is_tasks_filename?(path)
57
+ end
58
+
55
59
  # Determine whether a file has a legal name for either a task's executable or metadata file.
56
60
  def self.is_tasks_filename?(path)
57
61
  name_less_extension = File.basename(path, '.*')
@@ -200,7 +204,7 @@ class Puppet::Module
200
204
 
201
205
  def self.tasks_in_module(pup_module)
202
206
  task_files = Dir.glob(File.join(pup_module.tasks_directory, '*'))
203
- .keep_if { |f| is_tasks_filename?(f) }
207
+ .keep_if { |f| is_tasks_file?(f) }
204
208
 
205
209
  module_executables = task_files.reject(&method(:is_tasks_metadata_filename?)).map.to_a
206
210
 
@@ -6,7 +6,7 @@
6
6
  # Raketasks and such to set the version based on the output of `git describe`
7
7
 
8
8
  module Puppet
9
- PUPPETVERSION = '7.17.0'
9
+ PUPPETVERSION = '7.18.0'
10
10
 
11
11
  ##
12
12
  # version is a public API method intended to always provide a fast and
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPETCONF" "5" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  \fBThis page is autogenerated; any changes will get overwritten\fR
6
6
  .
7
7
  .SH "Configuration settings"
@@ -929,7 +929,7 @@ The time to wait for data to be read from an HTTP connection\. If nothing is rea
929
929
  The HTTP User\-Agent string to send when making network requests\.
930
930
  .
931
931
  .IP "\(bu" 4
932
- \fIDefault\fR: \fBPuppet/7\.17\.0 Ruby/2\.7\.5\-p203 (x86_64\-linux)\fR
932
+ \fIDefault\fR: \fBPuppet/7\.18\.0 Ruby/2\.7\.5\-p203 (x86_64\-linux)\fR
933
933
  .
934
934
  .IP "" 0
935
935
  .
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-AGENT" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-agent\fR \- The puppet agent daemon
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-APPLY" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-apply\fR \- Apply Puppet manifests locally
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CATALOG" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-catalog\fR \- Compile, save, view, and convert catalogs\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CONFIG" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-config\fR \- Interact with Puppet\'s settings\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DESCRIBE" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-describe\fR \- Display help about resource types
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DEVICE" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-device\fR \- Manage remote network devices
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DOC" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-doc\fR \- Generate Puppet references
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-EPP" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-epp\fR \- Interact directly with the EPP template parser/renderer\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FACTS" "8" "July 2022" "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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FILEBUCKET" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-GENERATE" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-generate\fR \- Generates Puppet code from Ruby definitions\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-HELP" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-help\fR \- Display Puppet help\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-LOOKUP" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-lookup\fR \- Interactive Hiera lookup
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MODULE" "8" "July 2022" "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\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-NODE" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-node\fR \- View and manage node definitions\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PARSER" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-parser\fR \- Interact directly with the parser\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PLUGIN" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-plugin\fR \- Interact with the Puppet plugin system\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-REPORT" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-report\fR \- Create, display, and submit reports\.
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-RESOURCE" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-resource\fR \- The resource abstraction layer shell
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SCRIPT" "8" "July 2022" "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
@@ -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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SSL" "8" "July 2022" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-ssl\fR \- Manage SSL keys and certificates for puppet SSL clients
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" "May 2022" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET" "8" "July 2022" "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\.17\.0
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\.18\.0
@@ -101,6 +101,8 @@ describe Puppet::Agent do
101
101
  end
102
102
 
103
103
  it "should splay" do
104
+ Puppet[:splay] = true
105
+
104
106
  expect(@agent).to receive(:splay)
105
107
 
106
108
  @agent.run
@@ -183,6 +185,26 @@ describe Puppet::Agent do
183
185
  expect(@agent.run).to eq(:result)
184
186
  end
185
187
 
188
+ it "should check if it's disabled after splaying and log a message" do
189
+ Puppet[:splay] = true
190
+ Puppet[:splaylimit] = '5s'
191
+ Puppet[:onetime] = true
192
+
193
+ expect(@agent).to receive(:disabled?).and_return(false, true)
194
+
195
+ allow(Puppet).to receive(:notice).and_call_original
196
+ expect(Puppet).to receive(:notice).with(/Skipping run of .*; administratively disabled.*/)
197
+ @agent.run
198
+ end
199
+
200
+ it "should check if it's disabled after acquiring the lock and log a message" do
201
+ expect(@agent).to receive(:disabled?).and_return(false, true)
202
+
203
+ allow(Puppet).to receive(:notice).and_call_original
204
+ expect(Puppet).to receive(:notice).with(/Skipping run of .*; administratively disabled.*/)
205
+ @agent.run
206
+ end
207
+
186
208
  describe "and a puppet agent is already running" do
187
209
  before(:each) do
188
210
  allow_any_instance_of(Object).to receive(:sleep)
@@ -11,6 +11,9 @@ describe "Puppet::InfoService" do
11
11
 
12
12
  context 'task information service' do
13
13
  let(:mod_name) { 'test1' }
14
+ let(:metadata) {
15
+ { "private" => true,
16
+ "description" => "a task that does a thing" } }
14
17
  let(:task_name) { "#{mod_name}::thingtask" }
15
18
  let(:modpath) { tmpdir('modpath') }
16
19
  let(:env_name) { 'testing' }
@@ -20,8 +23,13 @@ describe "Puppet::InfoService" do
20
23
  context 'tasks_per_environment method' do
21
24
  it "returns task data for the tasks in an environment" do
22
25
  Puppet.override(:environments => env_loader) do
23
- PuppetSpec::Modules.create(mod_name, modpath, {:environment => env, :tasks => [['thingtask']]})
24
- expect(Puppet::InfoService.tasks_per_environment(env_name)).to eq([{:name => task_name, :module => {:name => mod_name}}])
26
+ PuppetSpec::Modules.create(mod_name, modpath, {:environment => env,
27
+ :tasks => [['thingtask',
28
+ {:name => 'thingtask.json',
29
+ :content => metadata.to_json}]]})
30
+ expect(Puppet::InfoService.tasks_per_environment(env_name)).to eq([{:name => task_name,
31
+ :module => {:name => mod_name},
32
+ :metadata => metadata} ])
25
33
  end
26
34
  end
27
35
 
@@ -207,7 +215,7 @@ describe "Puppet::InfoService" do
207
215
  end
208
216
  end
209
217
  end
210
-
218
+
211
219
  context 'plan information service' do
212
220
  let(:mod_name) { 'test1' }
213
221
  let(:plan_name) { "#{mod_name}::thingplan" }
@@ -24,6 +24,7 @@ describe Puppet::Module::Task do
24
24
  it "constructs tasks as expected when every task has a metadata file with the same name (besides extension)" do
25
25
  task_files = %w{task1.json task1 task2.json task2.exe task3.json task3.sh}.map { |bn| "#{tasks_path}/#{bn}" }
26
26
  expect(Dir).to receive(:glob).with(tasks_glob).and_return(task_files)
27
+ task_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
27
28
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
28
29
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({})
29
30
 
@@ -52,6 +53,7 @@ describe Puppet::Module::Task do
52
53
  it "constructs tasks as expected when some tasks don't have a metadata file" do
53
54
  task_files = %w{task1 task2.exe task3.json task3.sh}.map { |bn| "#{tasks_path}/#{bn}" }
54
55
  expect(Dir).to receive(:glob).with(tasks_glob).and_return(task_files)
56
+ task_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
55
57
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({})
56
58
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
57
59
 
@@ -66,6 +68,7 @@ describe Puppet::Module::Task do
66
68
  it "constructs a task as expected when a task has implementations" do
67
69
  task_files = %w{task1.elf task1.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
68
70
  expect(Dir).to receive(:glob).with(tasks_glob).and_return(task_files)
71
+ task_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
69
72
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
70
73
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({'implementations' => [{"name" => "task1.sh"}]})
71
74
 
@@ -78,6 +81,7 @@ describe Puppet::Module::Task do
78
81
  it "constructs a task as expected when task metadata declares additional files" do
79
82
  task_files = %w{task1.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
80
83
  expect(Dir).to receive(:glob).with(tasks_glob).and_return(task_files)
84
+ task_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
81
85
  expect(Puppet::Module::Task).to receive(:find_extra_files).and_return([{'name' => 'mymod/lib/file0.elf', 'path' => "/path/to/file0.elf"}])
82
86
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
83
87
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({'files' => ["mymod/lib/file0.elf"]})
@@ -91,6 +95,7 @@ describe Puppet::Module::Task do
91
95
  it "constructs a task as expected when a task implementation declares additional files" do
92
96
  task_files = %w{task1.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
93
97
  expect(Dir).to receive(:glob).with(tasks_glob).and_return(task_files)
98
+ task_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
94
99
  expect(Puppet::Module::Task).to receive(:find_extra_files).and_return([{'name' => 'mymod/lib/file0.elf', 'path' => "/path/to/file0.elf"}])
95
100
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
96
101
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({'implementations' => [{"name" => "task1.sh", "files" => ["mymod/lib/file0.elf"]}]})
@@ -104,6 +109,7 @@ describe Puppet::Module::Task do
104
109
  it "constructs a task as expected when task metadata and a task implementation both declare additional files" do
105
110
  task_files = %w{task1.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
106
111
  expect(Dir).to receive(:glob).with(tasks_glob).and_return(task_files)
112
+ task_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
107
113
  expect(Puppet::Module::Task).to receive(:find_extra_files).and_return([
108
114
  {'name' => 'mymod/lib/file0.elf', 'path' => "/path/to/file0.elf"},
109
115
  {'name' => 'yourmod/files/file1.txt', 'path' => "/other/path/to/file1.txt"}
@@ -124,6 +130,7 @@ describe Puppet::Module::Task do
124
130
  it "constructs a task as expected when a task has files" do
125
131
  og_files = %w{task1.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
126
132
  expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
133
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
127
134
  expect(File).to receive(:exist?).with(any_args).and_return(true).at_least(:once)
128
135
 
129
136
  expect(Puppet::Module).to receive(:find).with(othermod.name, "production").and_return(othermod).at_least(:once)
@@ -139,6 +146,7 @@ describe Puppet::Module::Task do
139
146
  it "fails to load a task if its metadata specifies a non-existent file" do
140
147
  og_files = %w{task1.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
141
148
  allow(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
149
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
142
150
  allow(File).to receive(:exist?).with(any_args).and_return(true)
143
151
 
144
152
  expect(Puppet::Module).to receive(:find).with(othermod.name, "production").and_return(nil).at_least(:once)
@@ -149,7 +157,9 @@ describe Puppet::Module::Task do
149
157
  end
150
158
 
151
159
  it "finds files whose names (besides extensions) are valid task names" do
152
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task task_1 xx_t_a_s_k_2_xx})
160
+ og_files = %w{task task_1 xx_t_a_s_k_2_xx}.map { |bn| "#{tasks_path}/#{bn}" }
161
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
162
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
153
163
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
154
164
 
155
165
  expect(tasks.count).to eq(3)
@@ -157,7 +167,9 @@ describe Puppet::Module::Task do
157
167
  end
158
168
 
159
169
  it "ignores files that have names (besides extensions) that are not valid task names" do
160
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{.nottask.exe .wat !runme _task 2task2furious def_a_task_PSYCH Fake_task not-a-task realtask})
170
+ og_files = %w{.nottask.exe .wat !runme _task 2task2furious def_a_task_PSYCH Fake_task not-a-task realtask}.map { |bn| "#{tasks_path}/#{bn}" }
171
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
172
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
161
173
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
162
174
 
163
175
  expect(tasks.count).to eq(1)
@@ -165,13 +177,24 @@ describe Puppet::Module::Task do
165
177
  end
166
178
 
167
179
  it "ignores files that have names ending in .conf and .md" do
168
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{ginuwine_task task.conf readme.md other_task.md})
180
+ og_files = %w{ginuwine_task task.conf readme.md other_task.md}.map { |bn| "#{tasks_path}/#{bn}" }
181
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
182
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
169
183
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
170
184
 
171
185
  expect(tasks.count).to eq(1)
172
186
  expect(tasks.map{|t| t.name}).to eq(%w{mymod::ginuwine_task})
173
187
  end
174
188
 
189
+ it "ignores files which are not regular files" do
190
+ og_files = %w{foo}.map { |bn| "#{tasks_path}/#{bn}" }
191
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
192
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(false) }
193
+ tasks = Puppet::Module::Task.tasks_in_module(mymod)
194
+
195
+ expect(tasks.count).to eq(0)
196
+ end
197
+
175
198
  it "gives the 'init' task a name that is just the module's name" do
176
199
  expect(Puppet::Module::Task.new(mymod, 'init', ["#{tasks_path}/init.sh"]).name).to eq('mymod')
177
200
  end
@@ -179,7 +202,9 @@ describe Puppet::Module::Task do
179
202
  describe :metadata do
180
203
  it "loads metadata for a task" do
181
204
  metadata = {'desciption': 'some info'}
182
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.exe task1.json})
205
+ og_files = %w{task1.exe task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
206
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
207
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
183
208
  allow(Puppet::Module::Task).to receive(:read_metadata).and_return(metadata)
184
209
 
185
210
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
@@ -189,7 +214,9 @@ describe Puppet::Module::Task do
189
214
  end
190
215
 
191
216
  it 'returns nil for metadata if no file is present' do
192
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.exe})
217
+ og_files = %w{task1.exe}.map { |bn| "#{tasks_path}/#{bn}" }
218
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
219
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
193
220
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
194
221
 
195
222
  expect(tasks.count).to eq(1)
@@ -212,7 +239,9 @@ describe Puppet::Module::Task do
212
239
 
213
240
  describe :validate do
214
241
  it "validates when there is no metadata" do
215
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.exe})
242
+ og_files = %w{task1.exe}.map { |bn| "#{tasks_path}/#{bn}" }
243
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
244
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
216
245
 
217
246
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
218
247
 
@@ -223,7 +252,9 @@ describe Puppet::Module::Task do
223
252
  it "validates when an implementation isn't used" do
224
253
  metadata = {'desciption' => 'some info',
225
254
  'implementations' => [ {"name" => "task1.exe"}, ] }
226
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.exe task1.sh task1.json})
255
+ og_files = %w{task1.exe task1.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
256
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
257
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
227
258
  allow(Puppet::Module::Task).to receive(:read_metadata).and_return(metadata)
228
259
 
229
260
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
@@ -235,7 +266,9 @@ describe Puppet::Module::Task do
235
266
  it "validates when an implementation is another task" do
236
267
  metadata = {'desciption' => 'some info',
237
268
  'implementations' => [ {"name" => "task2.sh"}, ] }
238
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.exe task2.sh task1.json})
269
+ og_files = %w{task1.exe task2.sh task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
270
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
271
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
239
272
  allow(Puppet::Module::Task).to receive(:read_metadata).and_return(metadata)
240
273
 
241
274
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
@@ -245,7 +278,9 @@ describe Puppet::Module::Task do
245
278
  end
246
279
 
247
280
  it "fails validation when there is no metadata and multiple task files" do
248
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.elf task1.exe task1.json task2.ps1 task2.sh})
281
+ og_files = %w{task1.elf task1.exe task1.json task2.ps1 task2.sh}.map { |bn| "#{tasks_path}/#{bn}" }
282
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
283
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
249
284
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
250
285
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({})
251
286
 
@@ -255,7 +290,9 @@ describe Puppet::Module::Task do
255
290
  end
256
291
 
257
292
  it "fails validation when an implementation references a non-existant file" do
258
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.elf task1.exe task1.json})
293
+ og_files = %w{task1.elf task1.exe task1.json}.map { |bn| "#{tasks_path}/#{bn}" }
294
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
295
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
259
296
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
260
297
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({'implementations' => [ { 'name' => 'task1.sh' } ] })
261
298
 
@@ -265,7 +302,9 @@ describe Puppet::Module::Task do
265
302
  end
266
303
 
267
304
  it 'fails validation when there is metadata but no executable' do
268
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.json task2.sh})
305
+ og_files = %w{task1.json task2.sh}.map { |bn| "#{tasks_path}/#{bn}" }
306
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
307
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
269
308
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
270
309
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({})
271
310
 
@@ -273,7 +312,9 @@ describe Puppet::Module::Task do
273
312
  end
274
313
 
275
314
  it 'fails validation when the implementations are not an array' do
276
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.json task2.sh})
315
+ og_files = %w{task1.json task2.sh}.map { |bn| "#{tasks_path}/#{bn}" }
316
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
317
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
277
318
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
278
319
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({"implemenations" => {}})
279
320
 
@@ -281,7 +322,9 @@ describe Puppet::Module::Task do
281
322
  end
282
323
 
283
324
  it 'fails validation when the implementation is json' do
284
- expect(Dir).to receive(:glob).with(tasks_glob).and_return(%w{task1.json task1.sh})
325
+ og_files = %w{task1.json task1.sh}.map { |bn| "#{tasks_path}/#{bn}" }
326
+ expect(Dir).to receive(:glob).with(tasks_glob).and_return(og_files)
327
+ og_files.each { |f| expect(File).to receive(:file?).with(f).and_return(true) }
285
328
  tasks = Puppet::Module::Task.tasks_in_module(mymod)
286
329
  allow_any_instance_of(Puppet::Module::Task).to receive(:metadata).and_return({'implementations' => [ { 'name' => 'task1.json' } ] })
287
330
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.17.0
4
+ version: 7.18.0
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-24 00:00:00.000000000 Z
11
+ date: 2022-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter