From ecb2092f7292d569b805640e57457cf64740cdb1 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Thu, 8 Aug 2024 18:13:06 -0700 Subject: [PATCH 1/4] Use valid ronn syntax in filebucket help Previously, running `rake manpages` resulted in: roff: ./man/man8/puppet-filebucket.8 warn: unrecognized block tag: "blockquote" This is because '>' is not valid ronn syntax. As a result the "Note" was excluded from the generated `man/man8/puppet-filebucket.8` Also add a new line to separate using a local filebucket. --- lib/puppet/application/filebucket.rb | 10 ++++++---- man/man8/puppet-filebucket.8 | 9 +++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/puppet/application/filebucket.rb b/lib/puppet/application/filebucket.rb index eaa8f4a8703..70bf32bd930 100644 --- a/lib/puppet/application/filebucket.rb +++ b/lib/puppet/application/filebucket.rb @@ -76,10 +76,11 @@ def help use your local file bucket by specifying '--local', or by specifying '--bucket' with a local path. - > **Note**: 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: + **Note**: 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: + - Use a `find` command and `crontab` entry to retain only the last X days of file backups. For example: @@ -187,6 +188,7 @@ def help $ puppet filebucket -l -t "2015-05-11 09:30:00" list d43a6ecaa892a1962398ac9170ea9bf2 2015-05-11 09:27:56 /tmp/TestFile + ## Manage files in a specific local filebucket $ puppet filebucket -b /tmp/TestBucket backup /tmp/TestFile2 /tmp/TestFile2: d41d8cd98f00b204e9800998ecf8427e diff --git a/man/man8/puppet-filebucket.8 b/man/man8/puppet-filebucket.8 index 067cdb6f2d8..13d6c485328 100644 --- a/man/man8/puppet-filebucket.8 +++ b/man/man8/puppet-filebucket.8 @@ -36,6 +36,14 @@ This is a stand\-alone filebucket client for sending files to a local or central .P 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\. . +.P +\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: +. +.IP "\(bu" 4 +Use a \fBfind\fR command and \fBcrontab\fR entry to retain only the last X days of file backups\. For example: +. +.IP "" 0 +. .IP "" 4 . .nf @@ -146,6 +154,7 @@ $ puppet filebucket \-l \-f "2015\-05\-11 09:30:00" list $ puppet filebucket \-l \-t "2015\-05\-11 09:30:00" list d43a6ecaa892a1962398ac9170ea9bf2 2015\-05\-11 09:27:56 /tmp/TestFile + ## Manage files in a specific local filebucket $ puppet filebucket \-b /tmp/TestBucket backup /tmp/TestFile2 /tmp/TestFile2: d41d8cd98f00b204e9800998ecf8427e From 9498f3fd3935b4bf67a6af78ece3f8419671c120 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Thu, 8 Aug 2024 18:16:01 -0700 Subject: [PATCH 2/4] Fix typo --- lib/puppet/face/catalog.rb | 2 +- man/man8/puppet-catalog.8 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/puppet/face/catalog.rb b/lib/puppet/face/catalog.rb index 8966c38b4c9..bf3d7943dd1 100644 --- a/lib/puppet/face/catalog.rb +++ b/lib/puppet/face/catalog.rb @@ -26,7 +26,7 @@ deactivate_action(:destroy) deactivate_action(:search) action(:find) do - summary _("Retrieve the catalog for the node from which the comamand is run.") + summary _("Retrieve the catalog for the node from which the command is run.") arguments ", " option("--facts_for_catalog") do summary _("Not yet implemented for the CLI; facts will be collected internally.") diff --git a/man/man8/puppet-catalog.8 b/man/man8/puppet-catalog.8 index 1f4fd9fa753..6716fad2377 100644 --- a/man/man8/puppet-catalog.8 +++ b/man/man8/puppet-catalog.8 @@ -109,7 +109,7 @@ Nothing\. When used from the Ruby API, this action has a side effect of leaving Puppet::Resource::Catalog\.indirection\.terminus_class set to yaml\. The terminus must be explicitly re\-set for subsequent catalog actions\. . .TP -\fBfind\fR \- Retrieve the catalog for the node from which the comamand is run\. +\fBfind\fR \- Retrieve the catalog for the node from which the command is run\. \fBSYNOPSIS\fR . .IP @@ -119,7 +119,7 @@ puppet catalog find [\-\-terminus _TERMINUS] [\-\-facts_for_catalog] \fIcertname \fBDESCRIPTION\fR . .IP -Retrieve the catalog for the node from which the comamand is run\. +Retrieve the catalog for the node from which the command is run\. . .IP \fBOPTIONS\fR \fI\-\-facts_for_catalog\fR \- Not yet implemented for the CLI; facts will be collected internally\. From d20cc4336653dd06cec9760c4229148aef62b894 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Fri, 9 Aug 2024 13:40:00 -0700 Subject: [PATCH 3/4] Remove unhelpful warning --- lib/puppet/util/reference.rb | 1 - man/man5/puppet.conf.5 | 1 - 2 files changed, 2 deletions(-) diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb index 8464cfe90c3..714bc23aaf9 100644 --- a/lib/puppet/util/reference.rb +++ b/lib/puppet/util/reference.rb @@ -84,7 +84,6 @@ def text def to_markdown(withcontents = true) # First the header text = markdown_header(@title, 1) - text << _("\n\n**This page is autogenerated; any changes will get overwritten**\n\n") text << @header diff --git a/man/man5/puppet.conf.5 b/man/man5/puppet.conf.5 index 9599be2e4c3..bc115bf7a61 100644 --- a/man/man5/puppet.conf.5 +++ b/man/man5/puppet.conf.5 @@ -2,7 +2,6 @@ .\" http://github.com/rtomayko/ronn/tree/0.7.3 . .TH "PUPPETCONF" "5" "August 2024" "Puppet, Inc." "Puppet manual" -\fBThis page is autogenerated; any changes will get overwritten\fR . .SH "Configuration settings" . From ef22dc8d274bb5e50c4dd36896aa83d07359ecb2 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Thu, 8 Aug 2024 18:29:38 -0700 Subject: [PATCH 4/4] Render man/man5/puppetconf.5 correctly Previously, `rake genmanpages` generated warnings when converting ronn to man: roff: ./man/man5/puppetconf.5 warn: unrecognized block tag: "hr" warn: unexpected text: "Return a YAML hash with up to three keys:" The first warning was because definition lists need to have a space between each item. As a result the entire line "Return a YAML hash with up to three keys" was omitted from the output. The second warning was because '* * *' is not valid in ronn. --- lib/puppet/defaults.rb | 2 ++ lib/puppet/reference/configuration.rb | 1 - man/man5/puppet.conf.5 | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb index 3f04d570484..7d41b7749e9 100644 --- a/lib/puppet/defaults.rb +++ b/lib/puppet/defaults.rb @@ -2126,10 +2126,12 @@ def self.initialize_default_settings!(settings) can produce node information. The command must: * Take the name of a node as a command-line argument. + * Return a YAML hash with up to three keys: * `classes` --- A list of classes, as an array or hash. * `environment` --- A string. * `parameters` --- A list of top-scope variables to set, as a hash. + * For unknown nodes, exit with a non-zero exit code. Generally, an ENC script makes requests to an external data source. diff --git a/lib/puppet/reference/configuration.rb b/lib/puppet/reference/configuration.rb index 66cd7f801bf..33117c6ce6f 100644 --- a/lib/puppet/reference/configuration.rb +++ b/lib/puppet/reference/configuration.rb @@ -95,6 +95,5 @@ [confguide]: https://puppet.com/docs/puppet/latest/config_about_settings.html - * * * EOT diff --git a/man/man5/puppet.conf.5 b/man/man5/puppet.conf.5 index bc115bf7a61..7afec651036 100644 --- a/man/man5/puppet.conf.5 +++ b/man/man5/puppet.conf.5 @@ -689,6 +689,7 @@ This setting\'s value must be the path to an executable command that can produce Take the name of a node as a command\-line argument\. . .IP "\(bu" 4 +Return a YAML hash with up to three keys: . .IP "\(bu" 4 \fBclasses\fR \-\-\- A list of classes, as an array or hash\.