puppet 5.5.21-x64-mingw32 → 5.5.22-x64-mingw32

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -2
  3. data/Gemfile.lock +13 -14
  4. data/lib/puppet/configurer.rb +20 -3
  5. data/lib/puppet/configurer/downloader.rb +31 -10
  6. data/lib/puppet/defaults.rb +7 -1
  7. data/lib/puppet/file_serving/mount/locales.rb +1 -2
  8. data/lib/puppet/file_serving/mount/pluginfacts.rb +1 -2
  9. data/lib/puppet/file_serving/mount/plugins.rb +1 -2
  10. data/lib/puppet/functions/new.rb +8 -3
  11. data/lib/puppet/functions/reverse_each.rb +1 -1
  12. data/lib/puppet/functions/step.rb +1 -1
  13. data/lib/puppet/indirector/hiera.rb +4 -0
  14. data/lib/puppet/node/environment.rb +7 -1
  15. data/lib/puppet/parser/functions.rb +13 -9
  16. data/lib/puppet/pops/adaptable.rb +7 -13
  17. data/lib/puppet/pops/adapters.rb +8 -4
  18. data/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +1 -3
  19. data/lib/puppet/pops/types/iterable.rb +34 -8
  20. data/lib/puppet/pops/types/p_meta_type.rb +1 -1
  21. data/lib/puppet/pops/types/p_type_set_type.rb +4 -0
  22. data/lib/puppet/pops/validation/checker4_0.rb +19 -15
  23. data/lib/puppet/provider/package/gem.rb +4 -2
  24. data/lib/puppet/provider/package/puppet_gem.rb +5 -0
  25. data/lib/puppet/provider/package/yum.rb +1 -0
  26. data/lib/puppet/resource/type.rb +2 -1
  27. data/lib/puppet/test/test_helper.rb +5 -2
  28. data/lib/puppet/util.rb +13 -12
  29. data/lib/puppet/util/autoload.rb +9 -7
  30. data/lib/puppet/version.rb +1 -1
  31. data/locales/puppet.pot +33 -29
  32. data/man/man5/puppet.conf.5 +10 -2
  33. data/man/man8/puppet-agent.8 +1 -1
  34. data/man/man8/puppet-apply.8 +1 -1
  35. data/man/man8/puppet-ca.8 +1 -1
  36. data/man/man8/puppet-catalog.8 +1 -1
  37. data/man/man8/puppet-cert.8 +1 -1
  38. data/man/man8/puppet-certificate.8 +1 -1
  39. data/man/man8/puppet-certificate_request.8 +1 -1
  40. data/man/man8/puppet-certificate_revocation_list.8 +1 -1
  41. data/man/man8/puppet-config.8 +1 -1
  42. data/man/man8/puppet-describe.8 +1 -1
  43. data/man/man8/puppet-device.8 +1 -1
  44. data/man/man8/puppet-doc.8 +1 -1
  45. data/man/man8/puppet-epp.8 +1 -1
  46. data/man/man8/puppet-facts.8 +1 -1
  47. data/man/man8/puppet-filebucket.8 +1 -1
  48. data/man/man8/puppet-generate.8 +1 -1
  49. data/man/man8/puppet-help.8 +1 -1
  50. data/man/man8/puppet-key.8 +1 -1
  51. data/man/man8/puppet-lookup.8 +1 -1
  52. data/man/man8/puppet-man.8 +1 -1
  53. data/man/man8/puppet-master.8 +1 -1
  54. data/man/man8/puppet-module.8 +1 -1
  55. data/man/man8/puppet-node.8 +1 -1
  56. data/man/man8/puppet-parser.8 +1 -1
  57. data/man/man8/puppet-plugin.8 +1 -1
  58. data/man/man8/puppet-report.8 +1 -1
  59. data/man/man8/puppet-resource.8 +1 -1
  60. data/man/man8/puppet-script.8 +1 -1
  61. data/man/man8/puppet-status.8 +1 -1
  62. data/man/man8/puppet.8 +2 -2
  63. data/spec/integration/configurer_spec.rb +14 -0
  64. data/spec/integration/data_binding_spec.rb +1 -0
  65. data/spec/integration/faces/plugin_spec.rb +29 -47
  66. data/spec/shared_contexts/types_setup.rb +2 -0
  67. data/spec/unit/configurer/downloader_spec.rb +10 -0
  68. data/spec/unit/configurer_spec.rb +65 -30
  69. data/spec/unit/file_serving/mount/locales_spec.rb +2 -2
  70. data/spec/unit/file_serving/mount/pluginfacts_spec.rb +2 -2
  71. data/spec/unit/file_serving/mount/plugins_spec.rb +2 -2
  72. data/spec/unit/provider/package/puppet_gem_spec.rb +4 -1
  73. data/spec/unit/provider/package/yum_spec.rb +31 -0
  74. data/spec/unit/ssl/host_spec.rb +2 -0
  75. metadata +2 -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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPETCONF" "5" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  \fBThis page is autogenerated; any changes will get overwritten\fR
6
6
  .
7
7
  .SH "Configuration settings"
@@ -938,7 +938,15 @@ The time to wait for one block to be read from an HTTP connection\. If nothing i
938
938
  The HTTP User\-Agent string to send when making network requests\.
939
939
  .
940
940
  .IP "\(bu" 4
941
- \fIDefault\fR: Puppet/5\.5\.21 Ruby/2\.4\.1\-p111 (x86_64\-linux)
941
+ \fIDefault\fR: Puppet/5\.5\.22 Ruby/2\.5\.1\-p57 (x86_64\-linux)
942
+ .
943
+ .IP "" 0
944
+ .
945
+ .SS "ignore_plugin_errors"
946
+ Whether the puppet run should ignore errors during pluginsync\. If the setting is false and there are errors during pluginsync, then the agent will abort the run and submit a report containing information about the failed run\.
947
+ .
948
+ .IP "\(bu" 4
949
+ \fIDefault\fR: true
942
950
  .
943
951
  .IP "" 0
944
952
  .
@@ -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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-AGENT" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-APPLY" "8" "October 2020" "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\-CA" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CA" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-ca\fR \- Local Puppet Certificate Authority management\.
@@ -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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CATALOG" "8" "October 2020" "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\-CERT" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERT" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-cert\fR \- Manage certificates and requests (Deprecated)
@@ -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\-CERTIFICATE" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERTIFICATE" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-certificate\fR \- Provide access to the CA for certificate management\.
@@ -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\-CERTIFICATE_REQUEST" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERTIFICATE_REQUEST" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-certificate_request\fR \- Manage certificate requests\.
@@ -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\-CERTIFICATE_REVOCATION_LIST" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CERTIFICATE_REVOCATION_LIST" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-certificate_revocation_list\fR \- Manage the list of revoked certificates\.
@@ -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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-CONFIG" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DESCRIBE" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DEVICE" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-DOC" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-EPP" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FACTS" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-FILEBUCKET" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-GENERATE" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-HELP" "8" "October 2020" "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\-KEY" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-KEY" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-key\fR \- Create, save, and remove certificate keys\.
@@ -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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-LOOKUP" "8" "October 2020" "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\-MAN" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MAN" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-man\fR \- Display Puppet manual pages\.
@@ -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\-MASTER" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MASTER" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-master\fR \- The puppet master 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\-MODULE" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-MODULE" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-NODE" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PARSER" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-PLUGIN" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-REPORT" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-RESOURCE" "8" "October 2020" "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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-SCRIPT" "8" "October 2020" "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\-STATUS" "8" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET\-STATUS" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\-status\fR \- View puppet server status\.
@@ -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" "July 2020" "Puppet, Inc." "Puppet manual"
4
+ .TH "PUPPET" "8" "October 2020" "Puppet, Inc." "Puppet manual"
5
5
  .
6
6
  .SH "NAME"
7
7
  \fBpuppet\fR
@@ -16,4 +16,4 @@ Available subcommands:
16
16
  agent The puppet agent daemon apply Apply Puppet manifests locally ca Local Puppet Certificate Authority management\. (Deprecated) catalog Compile, save, view, and convert catalogs\. cert Manage certificates and requests (Deprecated) certificate Provide access to the CA for certificate management\. (Deprecated) certificate_request Manage certificate requests\. (Deprecated) certificate_revocation_list Manage the list of revoked certificates\. (Deprecated) config Interact with Puppet\'s settings\. 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\. help Display Puppet help\. key Create, save, and remove certificate keys\. (Deprecated) lookup Interactive Hiera lookup man Display Puppet manual pages\. (Deprecated) master The puppet master daemon module Creates, installs and searches for modules on the Puppet Forge\. node View and manage node definitions\. parser Interact directly with the parser\. plugin Interact with the Puppet plugin system\. report Create, display, and submit reports\. resource The resource abstraction layer shell script Run a puppet manifests as a script without compiling a catalog status View puppet server status\. (Deprecated)
17
17
  .
18
18
  .P
19
- 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 v5\.5\.21
19
+ 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 v5\.5\.22
@@ -63,6 +63,20 @@ describe Puppet::Configurer do
63
63
  expect(summary["time"]["last_run"]).to be_between(t1, t2)
64
64
  end
65
65
 
66
+ it "applies a cached catalog if pluginsync fails when usecacheonfailure is true" do
67
+ Puppet[:ignore_plugin_errors] = false
68
+
69
+ Puppet[:use_cached_catalog] = false
70
+ Puppet[:usecacheonfailure] = true
71
+
72
+ report = Puppet::Transaction::Report.new
73
+ expect_any_instance_of(Puppet::Configurer::Downloader).to receive(:evaluate).and_raise(Puppet::Error, 'Failed to retrieve: some file')
74
+ expect(Puppet::Resource::Catalog.indirection).to receive(:find).and_return(@catalog)
75
+
76
+ @configurer.run(pluginsync: true, report: report)
77
+ expect(report.cached_catalog_status).to eq('on_failure')
78
+ end
79
+
66
80
  describe 'resubmitting facts' do
67
81
  context 'when resubmit_facts is set to false' do
68
82
  it 'should not send data' do
@@ -1,6 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  require 'puppet_spec/compiler'
4
+ require 'puppet/indirector/data_binding/hiera'
4
5
 
5
6
  describe "Data binding" do
6
7
  include PuppetSpec::Files
@@ -1,59 +1,41 @@
1
1
  require 'spec_helper'
2
- require 'puppet/face'
3
- require 'puppet/file_serving/metadata'
4
- require 'puppet/file_serving/content'
5
- require 'puppet/indirector/memory'
2
+ require 'webmock/rspec'
6
3
 
7
- module PuppetFaceIntegrationSpecs
8
4
  describe "Puppet plugin face" do
9
- INDIRECTORS = [
10
- Puppet::Indirector::FileMetadata,
11
- Puppet::Indirector::FileContent,
12
- ]
5
+ before :each do
6
+ metadata = "[{\"path\":\"/etc/puppetlabs/code\",\"relative_path\":\".\",\"links\":\"follow\",\"owner\":0,\"group\":0,\"mode\":420,\"checksum\":{\"type\":\"ctime\",\"value\":\"{ctime}2020-07-10 14:00:00 -0700\"},\"type\":\"directory\",\"destination\":null}]"
7
+ stub_request(:get, %r{/puppet/v3/file_metadatas/(plugins|locales)}).to_return(status: 200, body: metadata, headers: {'Content-Type' => 'application/json'})
13
8
 
14
- INDIRECTED_CLASSES = [
15
- Puppet::FileServing::Metadata,
16
- Puppet::FileServing::Content,
17
- Puppet::Node::Facts,
18
- ]
19
-
20
- INDIRECTORS.each do |indirector|
21
- class indirector::Memory < Puppet::Indirector::Memory
22
- def find(request)
23
- model.new('/dev/null', { 'type' => 'directory' })
24
- end
25
- end
9
+ # response retains owner/group/mode due to source_permissions => use
10
+ facts_metadata = "[{\"path\":\"/etc/puppetlabs/code\",\"relative_path\":\".\",\"links\":\"follow\",\"owner\":500,\"group\":500,\"mode\":493,\"checksum\":{\"type\":\"ctime\",\"value\":\"{ctime}2020-07-10 14:00:00 -0700\"},\"type\":\"directory\",\"destination\":null}]"
11
+ stub_request(:get, %r{/puppet/v3/file_metadatas/pluginfacts}).to_return(status: 200, body: facts_metadata, headers: {'Content-Type' => 'application/json'})
26
12
  end
27
13
 
28
- before do
29
- FileUtils.mkdir(File.join(Puppet[:vardir], 'lib'))
30
- FileUtils.mkdir(File.join(Puppet[:vardir], 'facts.d'))
31
- FileUtils.mkdir(File.join(Puppet[:vardir], 'locales'))
32
- @termini_classes = {}
33
- INDIRECTED_CLASSES.each do |indirected|
34
- @termini_classes[indirected] = indirected.indirection.terminus_class
35
- indirected.indirection.terminus_class = :memory
36
- end
37
- end
14
+ it "processes a download request resulting in no changes" do
15
+ # /opt/puppetlabs/puppet/cache/facts.d will be created based on our umask.
16
+ # If the mode on disk is not 0755, then the mode from the metadata response
17
+ # (493 => 0755) will be applied, resulting in "plugins were downloaded"
18
+ # message. Enforce a umask so the results are consistent.
19
+ Puppet::FileSystem.mkpath(Puppet[:pluginfactdest])
20
+ Puppet::FileSystem.chmod(0755, Puppet[:pluginfactdest])
38
21
 
39
- after do
40
- INDIRECTED_CLASSES.each do |indirected|
41
- indirected.indirection.terminus_class = @termini_classes[indirected]
42
- indirected.indirection.termini.clear
43
- end
22
+ app = Puppet::Application[:plugin]
23
+ app.command_line.args << 'download'
24
+ expect {
25
+ app.run
26
+ }.to exit_with(0)
27
+ .and output(/No plugins downloaded/).to_stdout
44
28
  end
45
29
 
46
- def init_cli_args_and_apply_app(args = ["download"])
47
- Puppet::Application.find(:plugin).new(double('command_line', :subcommand_name => :plugin, :args => args))
48
- end
30
+ it "updates the facts.d mode", unless: Puppet::Util::Platform.windows? do
31
+ Puppet::FileSystem.mkpath(Puppet[:pluginfactdest])
32
+ Puppet::FileSystem.chmod(0775, Puppet[:pluginfactdest])
49
33
 
50
- it "processes a download request" do
51
- app = init_cli_args_and_apply_app
52
- expect do
53
- expect {
54
- app.run
55
- }.to exit_with(0)
56
- end.to have_printed(/No plugins downloaded/)
34
+ app = Puppet::Application[:plugin]
35
+ app.command_line.args << 'download'
36
+ expect {
37
+ app.run
38
+ }.to exit_with(0)
39
+ .and output(/Downloaded these plugins: .*facts\.d/).to_stdout
57
40
  end
58
41
  end
59
- end