puppet 7.1.0 → 7.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of puppet might be problematic. Click here for more details.

Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +15 -13
  3. data/lib/puppet/application.rb +10 -6
  4. data/lib/puppet/application/agent.rb +1 -0
  5. data/lib/puppet/application/apply.rb +3 -2
  6. data/lib/puppet/application/device.rb +1 -0
  7. data/lib/puppet/application/script.rb +1 -0
  8. data/lib/puppet/configurer.rb +16 -3
  9. data/lib/puppet/defaults.rb +5 -14
  10. data/lib/puppet/face/facts.rb +15 -1
  11. data/lib/puppet/file_serving/configuration/parser.rb +5 -2
  12. data/lib/puppet/module_tool/applications/installer.rb +48 -2
  13. data/lib/puppet/module_tool/errors/shared.rb +17 -2
  14. data/lib/puppet/network/formats.rb +67 -0
  15. data/lib/puppet/parser/ast/leaf.rb +3 -2
  16. data/lib/puppet/pops/evaluator/deferred_resolver.rb +5 -3
  17. data/lib/puppet/pops/model/ast_transformer.rb +1 -1
  18. data/lib/puppet/provider/package/apt.rb +4 -0
  19. data/lib/puppet/reference/configuration.rb +6 -5
  20. data/lib/puppet/settings.rb +33 -28
  21. data/lib/puppet/settings/alias_setting.rb +37 -0
  22. data/lib/puppet/util/autoload.rb +1 -8
  23. data/lib/puppet/util/posix.rb +1 -1
  24. data/lib/puppet/version.rb +1 -1
  25. data/locales/puppet.pot +157 -141
  26. data/man/man5/puppet.conf.5 +6 -6
  27. data/man/man8/puppet-agent.8 +2 -2
  28. data/man/man8/puppet-apply.8 +2 -2
  29. data/man/man8/puppet-catalog.8 +1 -1
  30. data/man/man8/puppet-config.8 +1 -1
  31. data/man/man8/puppet-describe.8 +1 -1
  32. data/man/man8/puppet-device.8 +2 -2
  33. data/man/man8/puppet-doc.8 +1 -1
  34. data/man/man8/puppet-epp.8 +1 -1
  35. data/man/man8/puppet-facts.8 +5 -2
  36. data/man/man8/puppet-filebucket.8 +1 -1
  37. data/man/man8/puppet-generate.8 +1 -1
  38. data/man/man8/puppet-help.8 +1 -1
  39. data/man/man8/puppet-lookup.8 +1 -1
  40. data/man/man8/puppet-module.8 +1 -1
  41. data/man/man8/puppet-node.8 +1 -1
  42. data/man/man8/puppet-parser.8 +1 -1
  43. data/man/man8/puppet-plugin.8 +1 -1
  44. data/man/man8/puppet-report.8 +1 -1
  45. data/man/man8/puppet-resource.8 +1 -1
  46. data/man/man8/puppet-script.8 +2 -2
  47. data/man/man8/puppet-ssl.8 +1 -1
  48. data/man/man8/puppet.8 +2 -2
  49. data/spec/fixtures/integration/application/agent/cached_deferred_catalog.json +91 -0
  50. data/spec/integration/application/agent_spec.rb +127 -3
  51. data/spec/integration/application/apply_spec.rb +19 -0
  52. data/spec/integration/defaults_spec.rb +0 -7
  53. data/spec/integration/indirector/file_content/file_server_spec.rb +0 -2
  54. data/spec/integration/indirector/file_metadata/file_server_spec.rb +0 -2
  55. data/spec/integration/resource/type_collection_spec.rb +2 -6
  56. data/spec/integration/transaction_spec.rb +4 -9
  57. data/spec/integration/util/windows/adsi_spec.rb +3 -1
  58. data/spec/integration/util/windows/registry_spec.rb +0 -10
  59. data/spec/spec_helper.rb +1 -4
  60. data/spec/unit/agent_spec.rb +8 -6
  61. data/spec/unit/application/agent_spec.rb +0 -1
  62. data/spec/unit/application/filebucket_spec.rb +0 -2
  63. data/spec/unit/application_spec.rb +17 -9
  64. data/spec/unit/confine/feature_spec.rb +1 -1
  65. data/spec/unit/confine_spec.rb +8 -2
  66. data/spec/unit/face/node_spec.rb +0 -11
  67. data/spec/unit/file_serving/configuration/parser_spec.rb +8 -1
  68. data/spec/unit/file_serving/metadata_spec.rb +3 -3
  69. data/spec/unit/file_serving/terminus_helper_spec.rb +11 -4
  70. data/spec/unit/forge/module_release_spec.rb +2 -7
  71. data/spec/unit/indirector/face_spec.rb +0 -1
  72. data/spec/unit/indirector/facts/facter_spec.rb +11 -5
  73. data/spec/unit/indirector/file_bucket_file/selector_spec.rb +26 -8
  74. data/spec/unit/indirector/indirection_spec.rb +8 -12
  75. data/spec/unit/indirector_spec.rb +2 -2
  76. data/spec/unit/module_tool/applications/installer_spec.rb +66 -0
  77. data/spec/unit/network/formats_spec.rb +41 -0
  78. data/spec/unit/network/http/api/indirected_routes_spec.rb +0 -4
  79. data/spec/unit/parser/compiler_spec.rb +3 -19
  80. data/spec/unit/parser/resource_spec.rb +14 -8
  81. data/spec/unit/pops/evaluator/deferred_resolver_spec.rb +20 -0
  82. data/spec/unit/property_spec.rb +1 -0
  83. data/spec/unit/provider/nameservice_spec.rb +66 -65
  84. data/spec/unit/provider/package/apt_spec.rb +4 -8
  85. data/spec/unit/provider/package/base_spec.rb +6 -5
  86. data/spec/unit/provider/package/pacman_spec.rb +18 -12
  87. data/spec/unit/provider/package/pip_spec.rb +6 -11
  88. data/spec/unit/provider/package/pkgdmg_spec.rb +0 -4
  89. data/spec/unit/provider/user/hpux_spec.rb +1 -1
  90. data/spec/unit/provider_spec.rb +6 -8
  91. data/spec/unit/resource/type_spec.rb +1 -1
  92. data/spec/unit/resource_spec.rb +11 -10
  93. data/spec/unit/settings_spec.rb +13 -6
  94. data/spec/unit/ssl/base_spec.rb +0 -1
  95. data/spec/unit/ssl/ssl_provider_spec.rb +5 -2
  96. data/spec/unit/transaction/additional_resource_generator_spec.rb +3 -7
  97. data/spec/unit/transaction/event_manager_spec.rb +14 -11
  98. data/spec/unit/transaction_spec.rb +13 -4
  99. data/spec/unit/type/file/content_spec.rb +0 -1
  100. data/spec/unit/type/file/selinux_spec.rb +0 -2
  101. data/spec/unit/type/file_spec.rb +0 -6
  102. data/spec/unit/type/group_spec.rb +13 -6
  103. data/spec/unit/type/resources_spec.rb +7 -7
  104. data/spec/unit/type/service_spec.rb +1 -1
  105. data/spec/unit/type/tidy_spec.rb +0 -1
  106. data/spec/unit/type_spec.rb +2 -2
  107. data/spec/unit/util/at_fork_spec.rb +2 -2
  108. data/spec/unit/util/autoload_spec.rb +5 -1
  109. data/spec/unit/util/backups_spec.rb +1 -2
  110. data/spec/unit/util/execution_spec.rb +15 -11
  111. data/spec/unit/util/inifile_spec.rb +6 -14
  112. data/spec/unit/util/log_spec.rb +8 -7
  113. data/spec/unit/util/logging_spec.rb +3 -3
  114. data/spec/unit/util/posix_spec.rb +16 -10
  115. data/spec/unit/util/selinux_spec.rb +76 -52
  116. data/spec/unit/util/suidmanager_spec.rb +44 -41
  117. data/spec/unit/util_spec.rb +13 -6
  118. metadata +7 -2
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPETCONF" "5" "January 2021" "Puppet, Inc." "Puppet manual"
5
5
  \fBThis page is autogenerated; any changes will get overwritten\fR
6
6
  .
7
7
  .SH "Configuration settings"
@@ -10,7 +10,7 @@
10
10
  Each of these settings can be specified in \fBpuppet\.conf\fR or on the command line\.
11
11
  .
12
12
  .IP "\(bu" 4
13
- Puppet Enterprise (PE) and open source Puppet share the configuration settings that are documented here\. However, PE defaults for some settings differ from the open source Puppet defaults\. Some examples of settings that have different PE defaults include \fBdisable18n\fR, \fBenvironment_timeout\fR, \fBalways_retry_plugins\fR, and the Puppet Server JRuby \fBmax\-active\-instances\fR setting\. To verify PE configuration defaults, check the \fBpuppet\.conf\fR file after installation\.
13
+ Puppet Enterprise (PE) and open source Puppet share the configuration settings documented here\. However, PE defaults differ from open source defaults for some settings, such as \fBnode_terminus\fR, \fBstoreconfigs\fR, \fBalways_retry_plugins\fR, \fBdisable18n\fR, \fBenvironment_timeout\fR (when Code Manager is enabled), and the Puppet Server JRuby \fBmax\-active\-instances\fR setting\. To verify PE configuration defaults, check the \fBpuppet\.conf\fR or \fBpe\-puppet\-server\.conf\fR file after installation\.
14
14
  .
15
15
  .IP "\(bu" 4
16
16
  When using boolean settings on the command line, use \fB\-\-setting\fR and \fB\-\-no\-setting\fR instead of \fB\-\-setting (true|false)\fR\. (Using \fB\-\-setting false\fR results in "Error: Could not parse application options: needless argument"\.)
@@ -899,7 +899,7 @@ The time to wait for data to be read from an HTTP connection\. If nothing is rea
899
899
  The HTTP User\-Agent string to send when making network requests\.
900
900
  .
901
901
  .IP "\(bu" 4
902
- \fIDefault\fR: Puppet/7\.1\.0 Ruby/2\.5\.1\-p57 (x86_64\-linux)
902
+ \fIDefault\fR: Puppet/7\.3\.0 Ruby/2\.5\.1\-p57 (x86_64\-linux)
903
903
  .
904
904
  .IP "" 0
905
905
  .
@@ -1105,7 +1105,7 @@ crit
1105
1105
  .IP "" 0
1106
1106
  .
1107
1107
  .SS "logdest"
1108
- Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\.
1108
+ Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\. Multiple destinations can be set using a comma separated list (eg: \fB/path/file1,console,/path/file2\fR)
1109
1109
  .
1110
1110
  .TP
1111
1111
  \fIDefault\fR:
@@ -1141,7 +1141,7 @@ Setting a global value for \fBmanifest\fR in puppet\.conf is not allowed (but it
1141
1141
  The default port puppet subcommands use to communicate with Puppet Server\. (eg \fBpuppet facts upload\fR, \fBpuppet agent\fR)\. May be overridden by more specific settings (see \fBca_port\fR, \fBreport_port\fR)\.
1142
1142
  .
1143
1143
  .IP "\(bu" 4
1144
- \fIDefault\fR: $serverport
1144
+ \fIDefault\fR: 8140
1145
1145
  .
1146
1146
  .IP "" 0
1147
1147
  .
@@ -1736,7 +1736,7 @@ The maximum time to delay before an agent\'s first run when \fBsplay\fR is enabl
1736
1736
  The domain which will be queried to find the SRV records of servers to use\.
1737
1737
  .
1738
1738
  .IP "\(bu" 4
1739
- \fIDefault\fR: delivery\.puppetlabs\.net
1739
+ \fIDefault\fR: ci\-jenkins\-setup\-platform\.svc\.cluster\.local
1740
1740
  .
1741
1741
  .IP "" 0
1742
1742
  .
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-AGENT" "8" "January 2021" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-agent\fR \- The puppet agent daemon
@@ -126,7 +126,7 @@ Disable can also take an optional message that will be reported by the \'puppet
126
126
  \-\-job\-id: Attach the specified job id to the catalog request and the report used for this agent run\. This option only works when \'\-\-onetime\' is used\. When using Puppet Enterprise this flag should not be used as the orchestrator sets the job\-id for you and it must be unique\.
127
127
  .
128
128
  .IP "\(bu" 4
129
- \-\-logdest: Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\. If debugging or verbosity is enabled, this defaults to \'console\'\. Otherwise, it defaults to \'syslog\' on POSIX systems and \'eventlog\' on Windows\.
129
+ \-\-logdest: Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\. If debugging or verbosity is enabled, this defaults to \'console\'\. Otherwise, it defaults to \'syslog\' on POSIX systems and \'eventlog\' on Windows\. Multiple destinations can be set using a comma separated list (eg: \fB/path/file1,console,/path/file2\fR)"
130
130
  .
131
131
  .IP
132
132
  A path ending with \'\.json\' will receive structured output in JSON format\. The log file will not have an ending \']\' automatically written to it due to the appending nature of logging\. It must be appended manually to make the content valid JSON\.
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-APPLY" "8" "January 2021" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-apply\fR \- Apply Puppet manifests locally
@@ -55,7 +55,7 @@ See the configuration file documentation at https://puppet\.com/docs/puppet/late
55
55
  \-\-loadclasses: Load any stored classes\. \'puppet agent\' caches configured classes (usually at /etc/puppetlabs/puppet/classes\.txt), and setting this option causes all of those classes to be set in your puppet manifest\.
56
56
  .
57
57
  .IP "\(bu" 4
58
- \-\-logdest: Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\. Defaults to \'console\'\.
58
+ \-\-logdest: Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\. Defaults to \'console\'\. Multiple destinations can be set using a comma separated list (eg: \fB/path/file1,console,/path/file2\fR)"
59
59
  .
60
60
  .IP
61
61
  A path ending with \'\.json\' will receive structured output in JSON format\. The log file will not have an ending \']\' automatically written to it due to the appending nature of logging\. It must be appended manually to make the content valid JSON\.
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CATALOG" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CONFIG" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DESCRIBE" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DEVICE" "8" "January 2021" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-device\fR \- Manage remote network devices
@@ -56,7 +56,7 @@ Enable full debugging\.
56
56
  .
57
57
  .TP
58
58
  \-\-logdest, \-l
59
- Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'console\', or the path to a log file\. If debugging or verbosity is enabled, this defaults to \'console\'\. Otherwise, it defaults to \'syslog\'\.
59
+ Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'console\', or the path to a log file\. If debugging or verbosity is enabled, this defaults to \'console\'\. Otherwise, it defaults to \'syslog\'\. Multiple destinations can be set using a comma separated list (eg: \fB/path/file1,console,/path/file2\fR)"
60
60
  .
61
61
  .IP
62
62
  A path ending with \'\.json\' will receive structured output in JSON format\. The log file will not have an ending \']\' automatically written to it due to the appending nature of logging\. It must be appended manually to make the content valid JSON\.
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DOC" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-EPP" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FACTS" "8" "January 2021" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-facts\fR \- Retrieve and store facts\.
@@ -105,7 +105,7 @@ API only: create or overwrite an object\. As the Faces framework does not curren
105
105
  \fBSYNOPSIS\fR
106
106
  .
107
107
  .IP
108
- puppet facts [\-\-terminus _TERMINUS] [\-\-extra HASH] [\-\-config\-file \fIpath\fR] [\-\-custom\-dir \fIpath\fR] [\-\-external\-dir \fIpath\fR] [\-\-no\-block] [\-\-no\-cache] [\-\-show\-legacy] [\fIfacts\fR]
108
+ puppet facts [\-\-terminus _TERMINUS] [\-\-extra HASH] [\-\-config\-file \fIpath\fR] [\-\-custom\-dir \fIpath\fR] [\-\-external\-dir \fIpath\fR] [\-\-no\-block] [\-\-no\-cache] [\-\-show\-legacy] [\-\-value\-only] [\fIfacts\fR]
109
109
  .
110
110
  .IP
111
111
  \fBDESCRIPTION\fR
@@ -132,6 +132,9 @@ Reads facts from the local system using \fBfacter\fR terminus\. A query can be p
132
132
  \fI\-\-show\-legacy\fR \- Show legacy facts when querying all facts\.
133
133
  .
134
134
  .IP
135
+ \fI\-\-value\-only\fR \- Show only the value when the action is called with a single query
136
+ .
137
+ .IP
135
138
  \fBRETURNS\fR
136
139
  .
137
140
  .IP
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FILEBUCKET" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-GENERATE" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-HELP" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-LOOKUP" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MODULE" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-NODE" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PARSER" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PLUGIN" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-REPORT" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-RESOURCE" "8" "January 2021" "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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SCRIPT" "8" "January 2021" "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
@@ -34,7 +34,7 @@ Print this help message
34
34
  .
35
35
  .TP
36
36
  \-\-logdest
37
- Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\. Defaults to \'console\'\.
37
+ Where to send log messages\. Choose between \'syslog\' (the POSIX syslog service), \'eventlog\' (the Windows Event Log), \'console\', or the path to a log file\. Defaults to \'console\'\. Multiple destinations can be set using a comma separated list (eg: \fB/path/file1,console,/path/file2\fR)"
38
38
  .
39
39
  .IP
40
40
  A path ending with \'\.json\' will receive structured output in JSON format\. The log file will not have an ending \']\' automatically written to it due to the appending nature of logging\. It must be appended manually to make the content valid JSON\.
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SSL" "8" "January 2021" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-ssl\fR \- Manage SSL keys and certificates for puppet SSL clients
@@ -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" "December 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET" "8" "January 2021" "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\.1\.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\.3\.0
@@ -0,0 +1,91 @@
1
+ {
2
+ "tags": [
3
+ "settings"
4
+ ],
5
+ "name": "127.0.0.1",
6
+ "version": 1607629733,
7
+ "code_id": null,
8
+ "catalog_uuid": "afc8472a-306b-4b24-b060-e956dffb79b8",
9
+ "catalog_format": 1,
10
+ "environment": "production",
11
+ "resources": [
12
+ {
13
+ "type": "Stage",
14
+ "title": "main",
15
+ "tags": [
16
+ "stage"
17
+ ],
18
+ "exported": false,
19
+ "parameters": {
20
+ "name": "main"
21
+ }
22
+ },
23
+ {
24
+ "type": "Class",
25
+ "title": "Settings",
26
+ "tags": [
27
+ "class",
28
+ "settings"
29
+ ],
30
+ "exported": false
31
+ },
32
+ {
33
+ "type": "Class",
34
+ "title": "main",
35
+ "tags": [
36
+ "class"
37
+ ],
38
+ "exported": false,
39
+ "parameters": {
40
+ "name": "main"
41
+ }
42
+ },
43
+ {
44
+ "type": "Notify",
45
+ "title": "deferred",
46
+ "tags": [
47
+ "notify",
48
+ "deferred",
49
+ "class"
50
+ ],
51
+ "file": "",
52
+ "line": 1,
53
+ "exported": false,
54
+ "parameters": {
55
+ "message": {
56
+ "__ptype": "Deferred",
57
+ "name": "new",
58
+ "arguments": [
59
+ {
60
+ "__ptype": "Pcore::StringType"
61
+ },
62
+ {
63
+ "__ptype": "Deferred",
64
+ "name": "binary_file",
65
+ "arguments": [
66
+ "__SOURCE_PATH__"
67
+ ]
68
+ }
69
+ ]
70
+ }
71
+ }
72
+ }
73
+ ],
74
+ "edges": [
75
+ {
76
+ "source": "Stage[main]",
77
+ "target": "Class[Settings]"
78
+ },
79
+ {
80
+ "source": "Stage[main]",
81
+ "target": "Class[main]"
82
+ },
83
+ {
84
+ "source": "Class[main]",
85
+ "target": "Notify[deferred]"
86
+ }
87
+ ],
88
+ "classes": [
89
+ "settings"
90
+ ]
91
+ }
@@ -97,10 +97,10 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
97
97
  end
98
98
 
99
99
  context 'rich data' do
100
- it "applies deferred values" do
100
+ it "calls a deferred 4x function" do
101
101
  catalog_handler = -> (req, res) {
102
102
  catalog = compile_to_catalog(<<-MANIFEST, node)
103
- notify { 'deferred':
103
+ notify { 'deferred4x':
104
104
  message => Deferred('join', [[1,2,3], ':'])
105
105
  }
106
106
  MANIFEST
@@ -115,7 +115,66 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
115
115
  agent.command_line.args << '--test'
116
116
  agent.run
117
117
  }.to exit_with(2)
118
- .and output(%r{Notice: /Stage\[main\]/Main/Notify\[deferred\]/message: defined 'message' as '1:2:3'}).to_stdout
118
+ .and output(%r{Notice: /Stage\[main\]/Main/Notify\[deferred4x\]/message: defined 'message' as '1:2:3'}).to_stdout
119
+ end
120
+ end
121
+
122
+ it "calls a deferred 3x function" do
123
+ catalog_handler = -> (req, res) {
124
+ catalog = compile_to_catalog(<<-MANIFEST, node)
125
+ notify { 'deferred3x':
126
+ message => Deferred('sprintf', ['%s', 'I am deferred'])
127
+ }
128
+ MANIFEST
129
+
130
+ res.body = formatter.render(catalog)
131
+ res['Content-Type'] = formatter.mime
132
+ }
133
+
134
+ server.start_server(mounts: {catalog: catalog_handler}) do |port|
135
+ Puppet[:serverport] = port
136
+ expect {
137
+ agent.command_line.args << '--test'
138
+ agent.run
139
+ }.to exit_with(2)
140
+ .and output(%r{Notice: /Stage\[main\]/Main/Notify\[deferred3x\]/message: defined 'message' as 'I am deferred'}).to_stdout
141
+ end
142
+ end
143
+
144
+ it "re-evaluates a deferred function in a cached catalog" do
145
+ Puppet[:report] = false
146
+ Puppet[:use_cached_catalog] = true
147
+ Puppet[:usecacheonfailure] = false
148
+
149
+ catalog_dir = File.join(Puppet[:client_datadir], 'catalog')
150
+ Puppet::FileSystem.mkpath(catalog_dir)
151
+ cached_catalog_path = "#{File.join(catalog_dir, Puppet[:certname])}.json"
152
+
153
+ # our catalog contains a deferred function that calls `binary_file`
154
+ # to read `source`. The function returns a Binary object, whose
155
+ # base64 value is printed to stdout
156
+ source = tmpfile('deferred_source')
157
+ catalog = File.read(my_fixture('cached_deferred_catalog.json'))
158
+ catalog.gsub!('__SOURCE_PATH__', source)
159
+ File.write(cached_catalog_path, catalog)
160
+
161
+ # verify we get a different result each time the deferred function
162
+ # is evaluated, and reads `source`.
163
+ {
164
+ '1234' => 'MTIzNA==',
165
+ '5678' => 'NTY3OA=='
166
+ }.each_pair do |content, base64|
167
+ File.write(source, content)
168
+
169
+ expect {
170
+ agent.command_line.args << '-t'
171
+ agent.run
172
+
173
+ }.to exit_with(2)
174
+ .and output(/Notice: #{base64}/).to_stdout
175
+
176
+ # reset state so we can run again
177
+ Puppet::Application.clear!
119
178
  end
120
179
  end
121
180
 
@@ -489,4 +548,69 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
489
548
  th.kill # kill thread so we don't wait too much
490
549
  end
491
550
  end
551
+
552
+ context 'cached catalogs' do
553
+ it 'falls back to a cached catalog' do
554
+ catalog_handler = -> (req, res) {
555
+ catalog = compile_to_catalog(<<-MANIFEST, node)
556
+ notify { 'a message': }
557
+ MANIFEST
558
+
559
+ res.body = formatter.render(catalog)
560
+ res['Content-Type'] = formatter.mime
561
+ }
562
+
563
+ server.start_server(mounts: {catalog: catalog_handler}) do |port|
564
+ Puppet[:serverport] = port
565
+ expect {
566
+ agent.command_line.args << '--test'
567
+ agent.run
568
+ }.to exit_with(2)
569
+ .and output(%r{Caching catalog for #{Puppet[:certname]}}).to_stdout
570
+ end
571
+
572
+ # reset state so we can run again
573
+ Puppet::Application.clear!
574
+
575
+ # --test above turns off `usecacheonfailure` so re-enable here
576
+ Puppet[:usecacheonfailure] = true
577
+
578
+ # run agent without server
579
+ expect {
580
+ agent.command_line.args << '--no-daemonize' << '--onetime' << '--server' << '127.0.0.1'
581
+ agent.run
582
+ }.to exit_with(2)
583
+ .and output(a_string_matching(
584
+ /Using cached catalog from environment 'production'/
585
+ ).and matching(
586
+ /Notify\[a message\]\/message:/
587
+ )).to_stdout
588
+ .and output(/the agent run will continue/).to_stderr
589
+ end
590
+
591
+ it 'preserves the old cached catalog if validation fails with the old one' do
592
+ catalog_handler = -> (req, res) {
593
+ catalog = compile_to_catalog(<<-MANIFEST, node)
594
+ exec { 'unqualified_command': }
595
+ MANIFEST
596
+
597
+ res.body = formatter.render(catalog)
598
+ res['Content-Type'] = formatter.mime
599
+ }
600
+
601
+ server.start_server(mounts: {catalog: catalog_handler}) do |port|
602
+ Puppet[:serverport] = port
603
+ expect {
604
+ agent.command_line.args << '--test'
605
+ agent.run
606
+ }.to exit_with(1)
607
+ .and output(/Using configured environment/).to_stdout
608
+ .and output(%r{Validation of Exec\[unqualified_command\] failed: 'unqualified_command' is not qualified and no path was specified}).to_stderr
609
+ end
610
+
611
+ # cached catalog should not be updated
612
+ cached_catalog = "#{File.join(Puppet[:client_datadir], 'catalog', Puppet[:certname])}.json"
613
+ expect(File).to_not be_exist(cached_catalog)
614
+ end
615
+ end
492
616
  end