Skip to content

Commit 85ae7cd

Browse files
authored
Merge branch 'puppetlabs:main' into main
2 parents fa9786d + c0efabb commit 85ae7cd

25 files changed

+8529
-54
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ end
7575
group(:documentation, optional: true) do
7676
gem 'gettext-setup', '~> 1.0', require: false, platforms: [:ruby]
7777
gem 'ronn', '~> 0.7.3', require: false, platforms: [:ruby]
78+
gem 'puppet-strings', require: false, platforms: [:ruby]
7879
end
7980

8081
if File.exist? "#{__FILE__}.local"

ext/project_data.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,15 @@ gem_rdoc_options:
66
- --main
77
- README.md
88
- --line-numbers
9+
# Array of files to include when building source tarballs
10+
files:
11+
- '[A-Z]*'
12+
- install.rb
13+
- bin
14+
- lib
15+
- conf
16+
- man
17+
- examples
18+
- ext
19+
- tasks
20+
- locales

lib/puppet/application/filebucket.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ def help
7676
use your local file bucket by specifying '--local', or by specifying
7777
'--bucket' with a local path.
7878
79-
**Note**: Enabling and using the backup option, and by extension the
80-
filebucket resource, requires appropriate planning and management to ensure
81-
that sufficient disk space is available for the file backups. Generally, you
82-
can implement this using one of the following two options:
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:
8383
8484
- Use a `find` command and `crontab` entry to retain only the last X days
8585
of file backups. For example:

lib/puppet/face/catalog.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
summary _("Retrieve the catalog for the node from which the command is run.")
3030
arguments "<certname>, <facts>"
3131
option("--facts_for_catalog") do
32-
summary _("Not yet implemented for the CLI; facts will be collected internally.")
32+
summary _("Not implemented for the CLI; facts are collected internally.")
3333
end
3434
returns <<-'EOT'
3535
A serialized catalog. When used from the Ruby API, returns a

lib/puppet/face/help.rb

Lines changed: 43 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,33 @@ def legacy_applications
151151
end.sort
152152
end
153153

154+
def generate_summary(appname)
155+
if is_face_app?(appname)
156+
begin
157+
face = Puppet::Face[appname, :current]
158+
# Add deprecation message to summary if the face is deprecated
159+
summary = face.deprecated? ? face.summary + ' ' + _("(Deprecated)") : face.summary
160+
[appname, summary, ' ']
161+
rescue StandardError, LoadError
162+
error_message = _("!%{sub_command}! Subcommand unavailable due to error.") % { sub_command: appname }
163+
error_message += ' ' + _("Check error logs.")
164+
[error_message, '', ' ']
165+
end
166+
else
167+
begin
168+
summary = Puppet::Application[appname].summary
169+
if summary.empty?
170+
summary = horribly_extract_summary_from(appname)
171+
end
172+
[appname, summary, ' ']
173+
rescue StandardError, LoadError
174+
error_message = _("!%{sub_command}! Subcommand unavailable due to error.") % { sub_command: appname }
175+
error_message += ' ' + _("Check error logs.")
176+
[error_message, '', ' ']
177+
end
178+
end
179+
end
180+
154181
# Return a list of all applications (both legacy and Face applications), along with a summary
155182
# of their functionality.
156183
# @return [Array] An Array of Arrays. The outer array contains one entry per application; each
@@ -162,45 +189,38 @@ def all_application_summaries
162189

163190
if appname == COMMON || appname == SPECIALIZED || appname == BLANK
164191
result << appname
165-
elsif is_face_app?(appname)
166-
begin
167-
face = Puppet::Face[appname, :current]
168-
# Add deprecation message to summary if the face is deprecated
169-
summary = face.deprecated? ? face.summary + ' ' + _("(Deprecated)") : face.summary
170-
result << [appname, summary, ' ']
171-
rescue StandardError, LoadError
172-
error_message = _("!%{sub_command}! Subcommand unavailable due to error.") % { sub_command: appname }
173-
error_message += ' ' + _("Check error logs.")
174-
result << [error_message, '', ' ']
175-
end
176192
else
177-
begin
178-
summary = Puppet::Application[appname].summary
179-
if summary.empty?
180-
summary = horribly_extract_summary_from(appname)
181-
end
182-
result << [appname, summary, ' ']
183-
rescue StandardError, LoadError
184-
error_message = _("!%{sub_command}! Subcommand unavailable due to error.") % { sub_command: appname }
185-
error_message += ' ' + _("Check error logs.")
186-
result << [error_message, '', ' ']
187-
end
193+
result << generate_summary(appname)
188194
end
189195
end
190196
end
191197

192198
COMMON = 'Common:'
193199
SPECIALIZED = 'Specialized:'
194200
BLANK = "\n"
201+
COMMON_APPS = %w[apply agent config help lookup module resource]
195202
def available_application_names_special_sort
196203
full_list = Puppet::Application.available_application_names
197-
a_list = full_list & %w[apply agent config help lookup module resource]
204+
a_list = full_list & COMMON_APPS
198205
a_list = a_list.sort
199206
also_ran = full_list - a_list
200207
also_ran = also_ran.sort
201208
[[COMMON], a_list, [BLANK], [SPECIALIZED], also_ran].flatten(1)
202209
end
203210

211+
def common_app_summaries
212+
COMMON_APPS.map do |appname|
213+
generate_summary(appname)
214+
end
215+
end
216+
217+
def specialized_app_summaries
218+
specialized_apps = Puppet::Application.available_application_names - COMMON_APPS
219+
specialized_apps.filter_map do |appname|
220+
generate_summary(appname) unless exclude_from_docs?(appname)
221+
end
222+
end
223+
204224
def horribly_extract_summary_from(appname)
205225
help = Puppet::Application[appname].help.split("\n")
206226
# Now we find the line with our summary, extract it, and return it. This

lib/puppet/reference/configuration.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
val = "the Host's fully qualified domain name, as determined by Facter"
4444
when 'srv_domain'
4545
val = 'example.com'
46+
when 'http_user_agent'
47+
val = 'Puppet/<version> Ruby/<version> (<architecture>)'
4648
end
4749

4850
# Leave out the section information; it was apparently confusing people.

lib/puppet/settings.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ def self.default_certname
8181
end
8282

8383
def self.hostname_fact
84-
Puppet.runtime[:facter].value 'networking.hostname'
84+
ENV['PUPPET_REFERENCES_HOSTNAME'] || Puppet.runtime[:facter].value('networking.hostname')
8585
end
8686

8787
def self.domain_fact
88-
Puppet.runtime[:facter].value 'networking.domain'
88+
ENV['PUPPET_REFERENCES_DOMAIN'] || Puppet.runtime[:facter].value('networking.domain')
8989
end
9090

9191
def self.default_config_file_name

locales/puppet.pot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
#, fuzzy
77
msgid ""
88
msgstr ""
9-
"Project-Id-Version: Puppet automation framework 8.8.0-40-gb8ac6f49a3\n"
9+
"Project-Id-Version: Puppet automation framework 8.8.0-49-gd70f906d86\n"
1010
"\n"
1111
"Report-Msgid-Bugs-To: https://tickets.puppetlabs.com\n"
12-
"POT-Creation-Date: 2024-08-14 00:21+0000\n"
13-
"PO-Revision-Date: 2024-08-14 00:21+0000\n"
12+
"POT-Creation-Date: 2024-08-29 16:36+0000\n"
13+
"PO-Revision-Date: 2024-08-29 16:36+0000\n"
1414
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1515
"Language-Team: LANGUAGE <LL@li.org>\n"
1616
"Language: \n"
@@ -797,7 +797,7 @@ msgid "Retrieve the catalog for the node from which the command is run."
797797
msgstr ""
798798

799799
#: ../lib/puppet/face/catalog.rb:32
800-
msgid "Not yet implemented for the CLI; facts will be collected internally."
800+
msgid "Not implemented for the CLI; facts are collected internally."
801801
msgstr ""
802802

803803
#: ../lib/puppet/face/catalog.rb:103

man/man5/puppet.conf.5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ The time to wait for data to be read from an HTTP connection\. If nothing is rea
973973
The HTTP User\-Agent string to send when making network requests\.
974974
.
975975
.IP "\(bu" 4
976-
\fIDefault\fR: \fBPuppet/8\.9\.0 Ruby/3\.1\.1\-p18 (x86_64\-linux)\fR
976+
\fIDefault\fR: \fBPuppet/<version> Ruby/<version> (<architecture>)\fR
977977
.
978978
.IP "" 0
979979
.

man/man8/puppet-catalog.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ puppet catalog find [\-\-terminus _TERMINUS] [\-\-facts_for_catalog] \fIcertname
122122
Retrieve the catalog for the node from which the command is run\.
123123
.
124124
.IP
125-
\fBOPTIONS\fR \fI\-\-facts_for_catalog\fR \- Not yet implemented for the CLI; facts will be collected internally\.
125+
\fBOPTIONS\fR \fI\-\-facts_for_catalog\fR \- Not implemented for the CLI; facts are collected internally\.
126126
.
127127
.IP
128128
\fBRETURNS\fR

man/man8/puppet-filebucket.8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This is a stand\-alone filebucket client for sending files to a local or central
3737
Note that \'filebucket\' defaults to using a network\-based filebucket available on the server named \'puppet\'\. To use this, you\'ll have to be running as a user with valid Puppet certificates\. Alternatively, you can use your local file bucket by specifying \'\-\-local\', or by specifying \'\-\-bucket\' with a local path\.
3838
.
3939
.P
40-
\fBNote\fR: Enabling and using the backup option, and by extension the filebucket resource, requires appropriate planning and management to ensure that sufficient disk space is available for the file backups\. Generally, you can implement this using one of the following two options:
40+
\fBImportant\fR: When you enable and use the backup option, and by extension the filebucket resource, you must ensure that sufficient disk space is available for the file backups\. Generally, you can provide the disk space by using one of the following two options:
4141
.
4242
.IP "\(bu" 4
4343
Use a \fBfind\fR command and \fBcrontab\fR entry to retain only the last X days of file backups\. For example:

man/man8/puppet.8

Lines changed: 127 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,144 @@
44
.TH "PUPPET" "8" "August 2024" "Puppet, Inc." "Puppet manual"
55
.
66
.SH "NAME"
7-
\fBpuppet\fR
7+
\fBpuppet\fR \- an automated configuration management tool
8+
.
9+
.SH "SYNOPSIS"
10+
\fBpuppet\fR \fIsubcommand\fR [options] \fIaction\fR [options]
11+
.
12+
.SH "DESCRIPTION"
13+
Puppet, an automated administrative engine for your Linux, Unix, and Windows systems, performs administrative tasks (such as adding users, installing packages, and updating server configurations) based on a centralized specification\.
14+
.
15+
.SH "COMMANDS"
16+
.
17+
.SS "Common"
18+
\fBapply\fR
19+
.
20+
.br
21+
\~\~\~\~Apply Puppet manifests locally
22+
.
23+
.P
24+
\fBagent\fR
25+
.
26+
.br
27+
\~\~\~\~The puppet agent daemon
28+
.
29+
.P
30+
\fBconfig\fR
31+
.
32+
.br
33+
\~\~\~\~Interact with Puppet\'s settings\.
34+
.
35+
.P
36+
\fBhelp\fR
37+
.
38+
.br
39+
\~\~\~\~Display Puppet help\.
40+
.
41+
.P
42+
\fBlookup\fR
43+
.
44+
.br
45+
\~\~\~\~Interactive Hiera lookup
46+
.
47+
.P
48+
\fBmodule\fR
49+
.
50+
.br
51+
\~\~\~\~Creates, installs and searches for modules on the Puppet Forge\.
52+
.
53+
.P
54+
\fBresource\fR
55+
.
56+
.br
57+
\~\~\~\~The resource abstraction layer shell
58+
.
59+
.SS "Specialized"
60+
\fBstrings\fR
61+
.
62+
.br
63+
\~\~\~\~Generate Puppet documentation with YARD\.
64+
.
65+
.P
66+
\fBcatalog\fR
67+
.
68+
.br
69+
\~\~\~\~Compile, save, view, and convert catalogs\.
870
.
971
.P
10-
Usage: puppet \fIsubcommand\fR [options] \fIaction\fR [options]
72+
\fBdescribe\fR
73+
.
74+
.br
75+
\~\~\~\~Display help about resource types
76+
.
77+
.P
78+
\fBdevice\fR
79+
.
80+
.br
81+
\~\~\~\~Manage remote network devices
1182
.
1283
.P
13-
Available subcommands:
84+
\fBdoc\fR
85+
.
86+
.br
87+
\~\~\~\~Generate Puppet references
1488
.
1589
.P
16-
Common:
90+
\fBepp\fR
1791
.
1892
.br
19-
agent The puppet agent daemon apply Apply Puppet manifests locally config Interact with Puppet\'s settings\. help Display Puppet help\. lookup Interactive Hiera lookup module Creates, installs and searches for modules on the Puppet Forge\. resource The resource abstraction layer shell
93+
\~\~\~\~Interact directly with the EPP template parser/renderer\.
2094
.
2195
.P
22-
Specialized:
96+
\fBfacts\fR
2397
.
2498
.br
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
99+
\~\~\~\~Retrieve and store facts\.
100+
.
101+
.P
102+
\fBfilebucket\fR
103+
.
104+
.br
105+
\~\~\~\~Store and retrieve files in a filebucket
106+
.
107+
.P
108+
\fBgenerate\fR
109+
.
110+
.br
111+
\~\~\~\~Generates Puppet code from Ruby definitions\.
112+
.
113+
.P
114+
\fBnode\fR
115+
.
116+
.br
117+
\~\~\~\~View and manage node definitions\.
118+
.
119+
.P
120+
\fBparser\fR
121+
.
122+
.br
123+
\~\~\~\~Interact directly with the parser\.
124+
.
125+
.P
126+
\fBplugin\fR
127+
.
128+
.br
129+
\~\~\~\~Interact with the Puppet plugin system\.
130+
.
131+
.P
132+
\fBscript\fR
133+
.
134+
.br
135+
\~\~\~\~Run a puppet manifests as a script without compiling a catalog
136+
.
137+
.P
138+
\fBssl\fR
139+
.
140+
.br
141+
\~\~\~\~Manage SSL keys and certificates for puppet SSL clients
142+
.
143+
.SH "SEE ALSO"
144+
See \fBpuppet help <subcommand>\fR for help on a specific subcommand\.
26145
.
27146
.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 v8\.9\.0
147+
See \fBpuppet help <subcommand> <action>\fR for help on a specific subcommand action\.

0 commit comments

Comments
 (0)