puppet 7.10.0-universal-darwin → 7.13.1-universal-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/Gemfile.lock +20 -15
- data/ext/project_data.yaml +1 -1
- data/lib/puppet/application/agent.rb +4 -0
- data/lib/puppet/application/apply.rb +20 -2
- data/lib/puppet/application/lookup.rb +72 -24
- data/lib/puppet/application/resource.rb +15 -13
- data/lib/puppet/concurrent/thread_local_singleton.rb +6 -3
- data/lib/puppet/configurer.rb +98 -29
- data/lib/puppet/confine/variable.rb +1 -1
- data/lib/puppet/defaults.rb +17 -3
- data/lib/puppet/facter_impl.rb +96 -0
- data/lib/puppet/file_serving/metadata.rb +3 -0
- data/lib/puppet/file_serving/mount/file.rb +4 -4
- data/lib/puppet/file_system/file_impl.rb +10 -8
- data/lib/puppet/file_system/jruby.rb +1 -1
- data/lib/puppet/file_system/path_pattern.rb +10 -15
- data/lib/puppet/file_system/uniquefile.rb +1 -1
- data/lib/puppet/file_system/windows.rb +4 -4
- data/lib/puppet/file_system.rb +3 -2
- data/lib/puppet/forge.rb +1 -1
- data/lib/puppet/functions/versioncmp.rb +6 -2
- data/lib/puppet/graph/simple_graph.rb +2 -1
- data/lib/puppet/http/client.rb +1 -1
- data/lib/puppet/http/redirector.rb +5 -0
- data/lib/puppet/indirector/catalog/compiler.rb +3 -3
- data/lib/puppet/indirector/facts/facter.rb +6 -6
- data/lib/puppet/indirector/indirection.rb +1 -1
- data/lib/puppet/module_tool/applications/uninstaller.rb +1 -1
- data/lib/puppet/module_tool/applications/upgrader.rb +1 -1
- data/lib/puppet/pal/pal_impl.rb +1 -1
- data/lib/puppet/parser/resource.rb +1 -1
- data/lib/puppet/parser/scope.rb +8 -7
- data/lib/puppet/parser/templatewrapper.rb +1 -0
- data/lib/puppet/pops/evaluator/closure.rb +7 -5
- data/lib/puppet/pops/evaluator/runtime3_resource_support.rb +1 -0
- data/lib/puppet/pops/lookup/lookup_adapter.rb +3 -2
- data/lib/puppet/pops/model/ast.rb +1 -0
- data/lib/puppet/pops/model/factory.rb +14 -13
- data/lib/puppet/pops/parser/code_merger.rb +4 -4
- data/lib/puppet/pops/parser/egrammar.ra +4 -2
- data/lib/puppet/pops/parser/eparser.rb +909 -894
- data/lib/puppet/pops/parser/lexer2.rb +69 -68
- data/lib/puppet/pops/parser/slurp_support.rb +1 -0
- data/lib/puppet/pops/serialization/to_data_converter.rb +6 -18
- data/lib/puppet/pops/serialization/to_stringified_converter.rb +1 -1
- data/lib/puppet/pops/types/type_formatter.rb +7 -6
- data/lib/puppet/pops/types/types.rb +1 -1
- data/lib/puppet/pops/validation/checker4_0.rb +7 -2
- data/lib/puppet/provider/aix_object.rb +1 -1
- data/lib/puppet/provider/group/groupadd.rb +5 -2
- data/lib/puppet/provider/package/pkg.rb +11 -1
- data/lib/puppet/provider/package/puppet_gem.rb +1 -1
- data/lib/puppet/provider/package/puppetserver_gem.rb +1 -1
- data/lib/puppet/provider/package/yum.rb +1 -1
- data/lib/puppet/provider/service/base.rb +1 -1
- data/lib/puppet/provider/service/init.rb +10 -9
- data/lib/puppet/provider/service/launchd.rb +1 -1
- data/lib/puppet/provider/service/redhat.rb +1 -1
- data/lib/puppet/provider/service/smf.rb +3 -3
- data/lib/puppet/provider/service/systemd.rb +1 -1
- data/lib/puppet/provider/service/upstart.rb +5 -5
- data/lib/puppet/provider/user/aix.rb +44 -1
- data/lib/puppet/provider/user/directoryservice.rb +1 -1
- data/lib/puppet/provider/user/useradd.rb +30 -7
- data/lib/puppet/provider.rb +1 -1
- data/lib/puppet/reference/providers.rb +2 -2
- data/lib/puppet/resource/catalog.rb +1 -1
- data/lib/puppet/resource/type_collection.rb +2 -1
- data/lib/puppet/resource.rb +38 -5
- data/lib/puppet/runtime.rb +11 -1
- data/lib/puppet/settings/file_setting.rb +3 -8
- data/lib/puppet/settings.rb +2 -2
- data/lib/puppet/ssl/verifier.rb +3 -1
- data/lib/puppet/test/test_helper.rb +4 -1
- data/lib/puppet/transaction/persistence.rb +22 -12
- data/lib/puppet/type/exec.rb +9 -1
- data/lib/puppet/type/file/data_sync.rb +1 -1
- data/lib/puppet/type/file/group.rb +8 -1
- data/lib/puppet/type/file/owner.rb +8 -1
- data/lib/puppet/type/group.rb +0 -1
- data/lib/puppet/type/resources.rb +1 -1
- data/lib/puppet/type/service.rb +8 -3
- data/lib/puppet/type/user.rb +40 -39
- data/lib/puppet/util/autoload.rb +1 -1
- data/lib/puppet/util/command_line.rb +1 -1
- data/lib/puppet/util/filetype.rb +2 -2
- data/lib/puppet/util/json.rb +20 -0
- data/lib/puppet/util/log.rb +8 -4
- data/lib/puppet/util/logging.rb +1 -25
- data/lib/puppet/util/monkey_patches.rb +26 -2
- data/lib/puppet/util/package.rb +25 -16
- data/lib/puppet/util/pidlock.rb +1 -1
- data/lib/puppet/util/rdoc/parser/puppet_parser_core.rb +1 -1
- data/lib/puppet/util/suidmanager.rb +1 -2
- data/lib/puppet/util/tagging.rb +1 -0
- data/lib/puppet/util/windows/service.rb +0 -5
- data/lib/puppet/util/windows/user.rb +0 -1
- data/lib/puppet/util/windows.rb +3 -0
- data/lib/puppet/util/yaml.rb +11 -0
- data/lib/puppet/util.rb +4 -3
- data/lib/puppet/version.rb +1 -1
- data/lib/puppet.rb +3 -6
- data/locales/puppet.pot +265 -239
- data/man/man5/puppet.conf.5 +18 -2
- data/man/man8/puppet-agent.8 +4 -1
- data/man/man8/puppet-apply.8 +1 -1
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-lookup.8 +9 -6
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +1 -1
- data/man/man8/puppet-ssl.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/integration/application/agent/cached_deferred_catalog.json +2 -1
- data/spec/fixtures/unit/forge/bacula.json +1 -1
- data/spec/integration/application/agent_spec.rb +44 -0
- data/spec/integration/application/lookup_spec.rb +29 -6
- data/spec/integration/configurer_spec.rb +1 -1
- data/spec/integration/indirector/facts/facter_spec.rb +3 -3
- data/spec/integration/parser/pcore_resource_spec.rb +20 -0
- data/spec/integration/transaction/report_spec.rb +1 -1
- data/spec/integration/type/file_spec.rb +2 -2
- data/spec/integration/type/package_spec.rb +6 -6
- data/spec/integration/util/rdoc/parser_spec.rb +1 -1
- data/spec/integration/util/windows/process_spec.rb +1 -9
- data/spec/shared_contexts/l10n.rb +5 -0
- data/spec/unit/application/apply_spec.rb +76 -56
- data/spec/unit/application/lookup_spec.rb +131 -10
- data/spec/unit/application/resource_spec.rb +29 -0
- data/spec/unit/concurrent/thread_local_singleton_spec.rb +39 -0
- data/spec/unit/configurer_spec.rb +113 -28
- data/spec/unit/facter_impl_spec.rb +31 -0
- data/spec/unit/file_bucket/dipper_spec.rb +2 -2
- data/spec/unit/file_system/uniquefile_spec.rb +7 -1
- data/spec/unit/file_system_spec.rb +41 -4
- data/spec/unit/forge/module_release_spec.rb +3 -3
- data/spec/unit/functions/lookup_spec.rb +64 -0
- data/spec/unit/functions/versioncmp_spec.rb +40 -4
- data/spec/unit/http/client_spec.rb +58 -1
- data/spec/unit/indirector/indirection_spec.rb +10 -3
- data/spec/unit/network/formats_spec.rb +6 -0
- data/spec/unit/pops/parser/parse_containers_spec.rb +2 -2
- data/spec/unit/pops/serialization/to_from_hr_spec.rb +0 -58
- data/spec/unit/pops/serialization/to_stringified_spec.rb +5 -0
- data/spec/unit/pops/types/type_calculator_spec.rb +6 -0
- data/spec/unit/pops/validator/validator_spec.rb +5 -0
- data/spec/unit/provider/package/gem_spec.rb +1 -1
- data/spec/unit/provider/package/pip2_spec.rb +1 -1
- data/spec/unit/provider/package/pip3_spec.rb +1 -1
- data/spec/unit/provider/package/pip_spec.rb +1 -1
- data/spec/unit/provider/package/pkg_spec.rb +15 -0
- data/spec/unit/provider/package/puppet_gem_spec.rb +1 -1
- data/spec/unit/provider/package/puppetserver_gem_spec.rb +1 -1
- data/spec/unit/provider/service/gentoo_spec.rb +6 -5
- data/spec/unit/provider/service/init_spec.rb +15 -9
- data/spec/unit/provider/service/openwrt_spec.rb +21 -29
- data/spec/unit/provider/service/redhat_spec.rb +3 -2
- data/spec/unit/provider/user/aix_spec.rb +100 -0
- data/spec/unit/provider/user/directoryservice_spec.rb +1 -1
- data/spec/unit/provider/user/useradd_spec.rb +40 -0
- data/spec/unit/provider_spec.rb +4 -4
- data/spec/unit/puppet_spec.rb +12 -4
- data/spec/unit/resource/catalog_spec.rb +14 -1
- data/spec/unit/resource_spec.rb +58 -2
- data/spec/unit/settings/file_setting_spec.rb +10 -7
- data/spec/unit/transaction/persistence_spec.rb +51 -0
- data/spec/unit/type/file/group_spec.rb +7 -0
- data/spec/unit/type/file/owner_spec.rb +7 -0
- data/spec/unit/type/service_spec.rb +27 -0
- data/spec/unit/type/user_spec.rb +0 -45
- data/spec/unit/type_spec.rb +2 -2
- data/spec/unit/util/autoload_spec.rb +25 -8
- data/spec/unit/util/json_spec.rb +126 -0
- data/spec/unit/util/logging_spec.rb +2 -0
- data/spec/unit/util/yaml_spec.rb +37 -13
- data/tasks/parallel.rake +3 -3
- metadata +17 -4
data/man/man5/puppet.conf.5
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 "PUPPETCONF" "5" "
|
4
|
+
.TH "PUPPETCONF" "5" "December 2021" "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\.
|
932
|
+
\fIDefault\fR: \fBPuppet/7\.13\.0 Ruby/2\.5\.1\-p57 (x86_64\-linux)\fR
|
933
933
|
.
|
934
934
|
.IP "" 0
|
935
935
|
.
|
@@ -1102,6 +1102,14 @@ From where to retrieve translation files\. The standard Puppet \fBfile\fR type i
|
|
1102
1102
|
.
|
1103
1103
|
.IP "" 0
|
1104
1104
|
.
|
1105
|
+
.SS "location_trusted"
|
1106
|
+
This will allow sending the name + password and the cookie header to all hosts that puppet may redirect to\. This may or may not introduce a security breach if puppet redirects you to a site to which you\'ll send your authentication info and cookies\.
|
1107
|
+
.
|
1108
|
+
.IP "\(bu" 4
|
1109
|
+
\fIDefault\fR: \fBfalse\fR
|
1110
|
+
.
|
1111
|
+
.IP "" 0
|
1112
|
+
.
|
1105
1113
|
.SS "log_level"
|
1106
1114
|
Default logging level for messages from Puppet\. Allowed values are:
|
1107
1115
|
.
|
@@ -2110,6 +2118,14 @@ This argument is by default disabled (value set to 0)\. In this case puppet agen
|
|
2110
2118
|
.
|
2111
2119
|
.IP "" 0
|
2112
2120
|
.
|
2121
|
+
.SS "write_catalog_summary"
|
2122
|
+
Whether to write the \fBclassfile\fR and \fBresourcefile\fR after applying the catalog\. It is enabled by default, except when running \fBpuppet apply\fR\.
|
2123
|
+
.
|
2124
|
+
.IP "\(bu" 4
|
2125
|
+
\fIDefault\fR: \fBtrue\fR
|
2126
|
+
.
|
2127
|
+
.IP "" 0
|
2128
|
+
.
|
2113
2129
|
.SS "yamldir"
|
2114
2130
|
The directory in which YAML data is stored, usually in a subdirectory\.
|
2115
2131
|
.
|
data/man/man8/puppet-agent.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\-AGENT" "8" "
|
4
|
+
.TH "PUPPET\-AGENT" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-agent\fR \- The puppet agent daemon
|
@@ -164,6 +164,9 @@ A path ending with \'\.jsonl\' will receive structured output in JSON Lines form
|
|
164
164
|
.IP "\(bu" 4
|
165
165
|
\-\-waitforcert: This option only matters for daemons that do not yet have certificates and it is enabled by default, with a value of 120 (seconds)\. This causes \'puppet agent\' to connect to the server every 2 minutes and ask it to sign a certificate request\. This is useful for the initial setup of a puppet client\. You can turn off waiting for certificates by specifying a time of 0\. (This is a Puppet setting, and can go in puppet\.conf\.)
|
166
166
|
.
|
167
|
+
.IP "\(bu" 4
|
168
|
+
\-\-write_catalog_summary After compiling the catalog saves the resource list and classes list to the node in the state directory named classes\.txt and resources\.txt (This is a Puppet setting, and can go in puppet\.conf\.)
|
169
|
+
.
|
167
170
|
.IP "" 0
|
168
171
|
.
|
169
172
|
.SH "EXAMPLE"
|
data/man/man8/puppet-apply.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\-APPLY" "8" "
|
4
|
+
.TH "PUPPET\-APPLY" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-apply\fR \- Apply Puppet manifests locally
|
data/man/man8/puppet-catalog.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\-CATALOG" "8" "
|
4
|
+
.TH "PUPPET\-CATALOG" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-catalog\fR \- Compile, save, view, and convert catalogs\.
|
data/man/man8/puppet-config.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\-CONFIG" "8" "
|
4
|
+
.TH "PUPPET\-CONFIG" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-config\fR \- Interact with Puppet\'s settings\.
|
data/man/man8/puppet-describe.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\-DESCRIBE" "8" "
|
4
|
+
.TH "PUPPET\-DESCRIBE" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-describe\fR \- Display help about resource types
|
data/man/man8/puppet-device.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\-DEVICE" "8" "
|
4
|
+
.TH "PUPPET\-DEVICE" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-device\fR \- Manage remote network devices
|
data/man/man8/puppet-doc.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\-DOC" "8" "
|
4
|
+
.TH "PUPPET\-DOC" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-doc\fR \- Generate Puppet references
|
data/man/man8/puppet-epp.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\-EPP" "8" "
|
4
|
+
.TH "PUPPET\-EPP" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-epp\fR \- Interact directly with the EPP template parser/renderer\.
|
data/man/man8/puppet-facts.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\-FACTS" "8" "
|
4
|
+
.TH "PUPPET\-FACTS" "8" "December 2021" "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" "
|
4
|
+
.TH "PUPPET\-FILEBUCKET" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-filebucket\fR \- Store and retrieve files in a filebucket
|
data/man/man8/puppet-generate.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\-GENERATE" "8" "
|
4
|
+
.TH "PUPPET\-GENERATE" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-generate\fR \- Generates Puppet code from Ruby definitions\.
|
data/man/man8/puppet-help.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\-HELP" "8" "
|
4
|
+
.TH "PUPPET\-HELP" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-help\fR \- Display Puppet help\.
|
data/man/man8/puppet-lookup.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\-LOOKUP" "8" "
|
4
|
+
.TH "PUPPET\-LOOKUP" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-lookup\fR \- Interactive Hiera lookup
|
@@ -22,10 +22,7 @@ The most common version of this command is:
|
|
22
22
|
puppet lookup [\-\-help] [\-\-type \fITYPESTRING\fR] [\-\-merge first|unique|hash|deep] [\-\-knock\-out\-prefix \fIPREFIX\-STRING\fR] [\-\-sort\-merged\-arrays] [\-\-merge\-hash\-arrays] [\-\-explain] [\-\-environment \fIENV\fR] [\-\-default \fIVALUE\fR] [\-\-node \fINODE\-NAME\fR] [\-\-facts \fIFILE\fR] [\-\-compile] [\-\-render\-as s|json|yaml|binary|msgpack] \fIkeys\fR
|
23
23
|
.
|
24
24
|
.SH "DESCRIPTION"
|
25
|
-
The lookup command is a CLI for Puppet\'s \'lookup()\' function\. It searches your Hiera data and returns a value for the requested lookup key, so you can test and explore your data\. It is a modern replacement for the \'hiera\' command\.
|
26
|
-
.
|
27
|
-
.P
|
28
|
-
Hiera usually relies on a node\'s facts to locate the relevant data sources\. By default, \'puppet lookup\' uses facts from the node you run the command on, but you can get data for any other node with the \'\-\-node \fINAME\fR\' option\. If possible, the lookup command will use the requested node\'s real stored facts from PuppetDB; if PuppetDB isn\'t configured or you want to provide arbitrary fact values, you can pass alternate facts as a JSON or YAML file with \'\-\-facts \fIFILE\fR\'\.
|
25
|
+
The lookup command is a CLI for Puppet\'s \'lookup()\' function\. It searches your Hiera data and returns a value for the requested lookup key, so you can test and explore your data\. It is a modern replacement for the \'hiera\' command\. Lookup uses the setting for global hiera\.yaml from puppet\'s config, and the environment to find the environment level hiera\.yaml as well as the resulting modulepath for the environment (for hiera\.yaml files in modules)\. Hiera usually relies on a node\'s facts to locate the relevant data sources\. By default, \'puppet lookup\' uses facts from the node you run the command on, but you can get data for any other node with the \'\-\-node \fINAME\fR\' option\. If possible, the lookup command will use the requested node\'s real stored facts from PuppetDB; if PuppetDB isn\'t configured or you want to provide arbitrary fact values, you can pass alternate facts as a JSON or YAML file with \'\-\-facts \fIFILE\fR\'\.
|
29
26
|
.
|
30
27
|
.P
|
31
28
|
If you\'re debugging your Hiera data and want to see where values are coming from, use the \'\-\-explain\' option\.
|
@@ -54,7 +51,7 @@ For more details about how Hiera works, see the Hiera documentation: https://pup
|
|
54
51
|
\-\-facts \fIFILE\fR Specify a \.json or \.yaml file of key => value mappings to override the facts for this lookup\. Any facts not specified in this file maintain their original value\.
|
55
52
|
.
|
56
53
|
.IP "\(bu" 4
|
57
|
-
\-\-environment \fIENV\fR Like with most Puppet commands, you can specify an environment on the command line\. This is important for lookup because different environments can have different Hiera data\.
|
54
|
+
\-\-environment \fIENV\fR Like with most Puppet commands, you can specify an environment on the command line\. This is important for lookup because different environments can have different Hiera data\. This environment will be always be the one used regardless of any other factors\.
|
58
55
|
.
|
59
56
|
.IP "\(bu" 4
|
60
57
|
\-\-merge first|unique|hash|deep: Specify the merge behavior, overriding any merge behavior from the data\'s lookup_options\. \'first\' returns the first value found\. \'unique\' appends everything to a merged, deduplicated array\. \'hash\' performs a simple hash merge by overwriting keys of lower lookup priority\. \'deep\' performs a deep merge on values of Array and Hash type\. There are additional options that can be used with \'deep\'\.
|
@@ -89,6 +86,12 @@ For more details about how Hiera works, see the Hiera documentation: https://pup
|
|
89
86
|
To look up \'key_name\' using the Puppet Server node\'s facts: $ puppet lookup key_name
|
90
87
|
.
|
91
88
|
.P
|
89
|
+
To look up \'key_name\' using the Puppet Server node\'s arbitrary variables from a manifest, and classify the node if applicable: $ puppet lookup key_name \-\-compile
|
90
|
+
.
|
91
|
+
.P
|
92
|
+
To look up \'key_name\' using the Puppet Server node\'s facts, overridden by facts given in a file: $ puppet lookup key_name \-\-facts fact_file\.yaml
|
93
|
+
.
|
94
|
+
.P
|
92
95
|
To look up \'key_name\' with agent\.local\'s facts: $ puppet lookup \-\-node agent\.local key_name
|
93
96
|
.
|
94
97
|
.P
|
data/man/man8/puppet-module.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\-MODULE" "8" "
|
4
|
+
.TH "PUPPET\-MODULE" "8" "December 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\.
|
data/man/man8/puppet-node.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\-NODE" "8" "
|
4
|
+
.TH "PUPPET\-NODE" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-node\fR \- View and manage node definitions\.
|
data/man/man8/puppet-parser.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\-PARSER" "8" "
|
4
|
+
.TH "PUPPET\-PARSER" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-parser\fR \- Interact directly with the parser\.
|
data/man/man8/puppet-plugin.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\-PLUGIN" "8" "
|
4
|
+
.TH "PUPPET\-PLUGIN" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-plugin\fR \- Interact with the Puppet plugin system\.
|
data/man/man8/puppet-report.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\-REPORT" "8" "
|
4
|
+
.TH "PUPPET\-REPORT" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-report\fR \- Create, display, and submit reports\.
|
data/man/man8/puppet-resource.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\-RESOURCE" "8" "
|
4
|
+
.TH "PUPPET\-RESOURCE" "8" "December 2021" "Puppet, Inc." "Puppet manual"
|
5
5
|
.
|
6
6
|
.SH "NAME"
|
7
7
|
\fBpuppet\-resource\fR \- The resource abstraction layer shell
|
data/man/man8/puppet-script.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\-SCRIPT" "8" "
|
4
|
+
.TH "PUPPET\-SCRIPT" "8" "December 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
|
data/man/man8/puppet-ssl.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\-SSL" "8" "
|
4
|
+
.TH "PUPPET\-SSL" "8" "December 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
|
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" "
|
4
|
+
.TH "PUPPET" "8" "December 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\.
|
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\.13\.0
|
@@ -6,7 +6,7 @@
|
|
6
6
|
"version": 1607629733,
|
7
7
|
"code_id": null,
|
8
8
|
"catalog_uuid": "afc8472a-306b-4b24-b060-e956dffb79b8",
|
9
|
-
"catalog_format":
|
9
|
+
"catalog_format": 2,
|
10
10
|
"environment": "production",
|
11
11
|
"resources": [
|
12
12
|
{
|
@@ -50,6 +50,7 @@
|
|
50
50
|
],
|
51
51
|
"file": "",
|
52
52
|
"line": 1,
|
53
|
+
"kind": "compilable_type",
|
53
54
|
"exported": false,
|
54
55
|
"parameters": {
|
55
56
|
"message": {
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"license": "Apache 2.0",
|
38
38
|
"checksums": { },
|
39
39
|
"version": "0.0.2",
|
40
|
-
"source": "
|
40
|
+
"source": "https://github.com/puppetlabs/puppetlabs-bacula",
|
41
41
|
"project_page": "https://github.com/puppetlabs/puppetlabs-bacula",
|
42
42
|
"summary": "bacula",
|
43
43
|
"dependencies": [ ],
|
@@ -626,9 +626,53 @@ describe "puppet agent", unless: Puppet::Util::Platform.jruby? do
|
|
626
626
|
expect(report.metrics).to_not be_empty
|
627
627
|
end
|
628
628
|
end
|
629
|
+
|
630
|
+
it "caches a report even if the REST request fails" do
|
631
|
+
server.start_server do |port|
|
632
|
+
Puppet[:serverport] = port
|
633
|
+
Puppet[:report_port] = "-1"
|
634
|
+
expect {
|
635
|
+
agent.command_line.args << '--test'
|
636
|
+
agent.run
|
637
|
+
}.to exit_with(0)
|
638
|
+
.and output(%r{Applied catalog}).to_stdout
|
639
|
+
.and output(%r{Could not send report}).to_stderr
|
640
|
+
|
641
|
+
report = Puppet::Transaction::Report.convert_from(:yaml, File.read(Puppet[:lastrunreport]))
|
642
|
+
expect(report).to be
|
643
|
+
end
|
644
|
+
end
|
629
645
|
end
|
630
646
|
|
631
647
|
context "environment convergence" do
|
648
|
+
it "falls back to making a node request if the last server-specified environment cannot be loaded" do
|
649
|
+
mounts = {}
|
650
|
+
mounts[:node] = -> (req, res) {
|
651
|
+
node = Puppet::Node.new('test', environment: Puppet::Node::Environment.remote('doesnotexistonagent'))
|
652
|
+
res.body = formatter.render(node)
|
653
|
+
res['Content-Type'] = formatter.mime
|
654
|
+
}
|
655
|
+
|
656
|
+
server.start_server(mounts: mounts) do |port|
|
657
|
+
Puppet[:serverport] = port
|
658
|
+
Puppet[:log_level] = 'debug'
|
659
|
+
|
660
|
+
expect {
|
661
|
+
agent.command_line.args << '--test'
|
662
|
+
agent.run
|
663
|
+
}.to exit_with(0)
|
664
|
+
.and output(a_string_matching(%r{Debug: Requesting environment from the server})).to_stdout
|
665
|
+
|
666
|
+
Puppet::Application.clear!
|
667
|
+
|
668
|
+
expect {
|
669
|
+
agent.command_line.args << '--test'
|
670
|
+
agent.run
|
671
|
+
}.to exit_with(0)
|
672
|
+
.and output(a_string_matching(%r{Debug: Successfully loaded last environment from the lastrunfile})).to_stdout
|
673
|
+
end
|
674
|
+
end
|
675
|
+
|
632
676
|
it "switches to 'newenv' environment and retries the run" do
|
633
677
|
first_run = true
|
634
678
|
libdir = File.join(my_fixture_dir, 'lib')
|
@@ -7,6 +7,7 @@ describe 'lookup' do
|
|
7
7
|
include PuppetSpec::Files
|
8
8
|
|
9
9
|
context 'with an environment' do
|
10
|
+
let(:fqdn) { Puppet.runtime[:facter].value(:fqdn) }
|
10
11
|
let(:env_name) { 'spec' }
|
11
12
|
let(:env_dir) { tmpdir('environments') }
|
12
13
|
let(:environment_files) do
|
@@ -44,12 +45,19 @@ describe 'lookup' do
|
|
44
45
|
let(:app) { Puppet::Application[:lookup] }
|
45
46
|
let(:env) { Puppet::Node::Environment.create(env_name.to_sym, [File.join(populated_env_dir, env_name, 'modules')]) }
|
46
47
|
let(:environments) { Puppet::Environments::Directories.new(populated_env_dir, []) }
|
48
|
+
let(:facts) { Puppet::Node::Facts.new("facts", {'my_fact' => 'my_fact_value'}) }
|
49
|
+
let(:cert) { pem_content('oid.pem') }
|
47
50
|
|
48
51
|
let(:populated_env_dir) do
|
49
52
|
dir_contained_in(env_dir, environment_files)
|
50
53
|
env_dir
|
51
54
|
end
|
52
55
|
|
56
|
+
before do
|
57
|
+
stub_request(:get, "https://puppet:8140/puppet-ca/v1/certificate/#{fqdn}").to_return(body: cert)
|
58
|
+
allow(Puppet::Node::Facts.indirection).to receive(:find).and_return(facts)
|
59
|
+
end
|
60
|
+
|
53
61
|
def lookup(key, options = {}, explain = false)
|
54
62
|
key = [key] unless key.is_a?(Array)
|
55
63
|
allow(app.command_line).to receive(:args).and_return(key)
|
@@ -90,24 +98,39 @@ describe 'lookup' do
|
|
90
98
|
expect(lookup('a')).to eql('value a')
|
91
99
|
end
|
92
100
|
|
101
|
+
it 'loads trusted information from the node certificate' do
|
102
|
+
allow(Puppet).to receive(:override).and_call_original
|
103
|
+
expect(Puppet).to receive(:override).with(trusted_information: an_object_having_attributes(
|
104
|
+
certname: fqdn,
|
105
|
+
extensions: { "1.3.6.1.4.1.34380.1.2.1.1" => "somevalue" }))
|
106
|
+
|
107
|
+
lookup('a')
|
108
|
+
end
|
109
|
+
|
93
110
|
it 'loads external facts when running without --node' do
|
94
111
|
expect(Puppet::Util).not_to receive(:skip_external_facts)
|
95
112
|
expect(Facter).not_to receive(:load_external)
|
96
113
|
lookup('a')
|
97
114
|
end
|
98
115
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
116
|
+
describe 'when using --node' do
|
117
|
+
let(:fqdn) { 'random_node' }
|
118
|
+
|
119
|
+
it 'skips loading of external facts' do
|
120
|
+
app.options[:node] = fqdn
|
121
|
+
|
122
|
+
expect(Puppet::Node::Facts.indirection).to receive(:find).and_return(facts)
|
123
|
+
expect(Facter).to receive(:load_external).once.with(false)
|
124
|
+
expect(Facter).to receive(:load_external).once.with(true)
|
125
|
+
lookup('a')
|
126
|
+
end
|
104
127
|
end
|
105
128
|
|
106
129
|
context 'uses node_terminus' do
|
107
130
|
require 'puppet/indirector/node/exec'
|
108
131
|
require 'puppet/indirector/node/plain'
|
109
132
|
|
110
|
-
let(:node) { Puppet::Node.new('testnode', :environment => env) }
|
133
|
+
let(:node) { Puppet::Node.new('testnode', :facts => facts, :environment => env) }
|
111
134
|
|
112
135
|
it ':plain without --compile' do
|
113
136
|
Puppet.settings[:node_terminus] = 'exec'
|
@@ -13,7 +13,7 @@ describe Puppet::Node::Facts::Facter do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
it "preserves case in fact values" do
|
16
|
-
|
16
|
+
Puppet.runtime[:facter].add(:downcase_test) do
|
17
17
|
setcode do
|
18
18
|
"AaBbCc"
|
19
19
|
end
|
@@ -34,9 +34,9 @@ describe Puppet::Node::Facts::Facter do
|
|
34
34
|
FileUtils.mkdir_p(test_module)
|
35
35
|
|
36
36
|
File.open(File.join(test_module, 'custom.rb'), 'wb') { |file| file.write(<<-EOF)}
|
37
|
-
|
37
|
+
Puppet.runtime[:facter].add(:custom) do
|
38
38
|
setcode do
|
39
|
-
|
39
|
+
Puppet.runtime[:facter].value('puppetversion')
|
40
40
|
end
|
41
41
|
end
|
42
42
|
EOF
|
@@ -122,6 +122,26 @@ describe 'when pcore described resources types are in use' do
|
|
122
122
|
expect(catalog.resource(:test3, "x/y")['message']).to eq('x/y works')
|
123
123
|
end
|
124
124
|
|
125
|
+
it 'considers Pcore types to be builtin ' do
|
126
|
+
genface.types
|
127
|
+
catalog = compile_to_catalog(<<-MANIFEST)
|
128
|
+
test1 { 'a':
|
129
|
+
message => 'a works'
|
130
|
+
}
|
131
|
+
MANIFEST
|
132
|
+
expect(catalog.resource(:test1, "a").kind).to eq('compilable_type')
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'considers Pcore types to be builtin ' do
|
136
|
+
genface.types
|
137
|
+
catalog = compile_to_catalog(<<-MANIFEST)
|
138
|
+
test1 { 'a':
|
139
|
+
message => 'a works'
|
140
|
+
}
|
141
|
+
MANIFEST
|
142
|
+
expect(catalog.resource(:test1, "a").kind).to eq('compilable_type')
|
143
|
+
end
|
144
|
+
|
125
145
|
it 'the validity of attribute names are checked' do
|
126
146
|
genface.types
|
127
147
|
expect do
|
@@ -1710,11 +1710,11 @@ describe Puppet::Type.type(:file), :uses_checksums => true do
|
|
1710
1710
|
|
1711
1711
|
describe "when using validate_cmd" do
|
1712
1712
|
test_cmd = '/bin/test'
|
1713
|
-
if
|
1713
|
+
if Puppet.runtime[:facter].value(:osfamily) == 'Debian'
|
1714
1714
|
test_cmd = '/usr/bin/test'
|
1715
1715
|
end
|
1716
1716
|
|
1717
|
-
if
|
1717
|
+
if Puppet.runtime[:facter].value(:operatingsystem) == 'Darwin'
|
1718
1718
|
stat_cmd = "stat -f '%Lp'"
|
1719
1719
|
else
|
1720
1720
|
stat_cmd = "stat --format=%a"
|
@@ -9,7 +9,7 @@ describe Puppet::Type.type(:package), "when choosing a default package provider"
|
|
9
9
|
def provider_name(os)
|
10
10
|
case os
|
11
11
|
when 'Solaris'
|
12
|
-
if Puppet::Util::Package.versioncmp(
|
12
|
+
if Puppet::Util::Package.versioncmp(Puppet.runtime[:facter].value(:kernelrelease), '5.11') >= 0
|
13
13
|
:pkg
|
14
14
|
else
|
15
15
|
:sun
|
@@ -21,19 +21,19 @@ describe Puppet::Type.type(:package), "when choosing a default package provider"
|
|
21
21
|
when 'Darwin'
|
22
22
|
:pkgdmg
|
23
23
|
when 'RedHat'
|
24
|
-
if ['2.1', '3', '4'].include?(
|
24
|
+
if ['2.1', '3', '4'].include?(Puppet.runtime[:facter].value(:lsbdistrelease))
|
25
25
|
:up2date
|
26
26
|
else
|
27
27
|
:yum
|
28
28
|
end
|
29
29
|
when 'Fedora'
|
30
|
-
if Puppet::Util::Package.versioncmp(
|
30
|
+
if Puppet::Util::Package.versioncmp(Puppet.runtime[:facter].value(:operatingsystemmajrelease), '22') >= 0
|
31
31
|
:dnf
|
32
32
|
else
|
33
33
|
:yum
|
34
34
|
end
|
35
35
|
when 'Suse'
|
36
|
-
if Puppet::Util::Package.versioncmp(
|
36
|
+
if Puppet::Util::Package.versioncmp(Puppet.runtime[:facter].value(:operatingsystemmajrelease), '10') >= 0
|
37
37
|
:zypper
|
38
38
|
else
|
39
39
|
:rug
|
@@ -54,8 +54,8 @@ describe Puppet::Type.type(:package), "when choosing a default package provider"
|
|
54
54
|
end
|
55
55
|
|
56
56
|
it "should choose the correct provider each platform" do
|
57
|
-
unless default_provider = provider_name(
|
58
|
-
pending("No default provider specified in this test for #{
|
57
|
+
unless default_provider = provider_name(Puppet.runtime[:facter].value(:operatingsystem))
|
58
|
+
pending("No default provider specified in this test for #{Puppet.runtime[:facter].value(:operatingsystem)}")
|
59
59
|
end
|
60
60
|
expect(Puppet::Type.type(:package).defaultprovider.name).to eq(default_provider)
|
61
61
|
end
|
@@ -1,22 +1,14 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'facter'
|
3
2
|
|
4
3
|
describe "Puppet::Util::Windows::Process", :if => Puppet::Util::Platform.windows? do
|
5
4
|
describe "as an admin" do
|
6
|
-
it "should have the SeCreateSymbolicLinkPrivilege necessary to create symlinks
|
7
|
-
:if => Facter.value(:kernelmajversion).to_f >= 6.0 && Puppet::Util::Platform.windows? do
|
5
|
+
it "should have the SeCreateSymbolicLinkPrivilege necessary to create symlinks" do
|
8
6
|
# this is a bit of a lame duck test since it requires running user to be admin
|
9
7
|
# a better integration test would create a new user with the privilege and verify
|
10
8
|
expect(Puppet::Util::Windows::User).to be_admin
|
11
9
|
expect(Puppet::Util::Windows::Process.process_privilege_symlink?).to be_truthy
|
12
10
|
end
|
13
11
|
|
14
|
-
it "should not have the SeCreateSymbolicLinkPrivilege necessary to create symlinks on 2003 and earlier",
|
15
|
-
:if => Facter.value(:kernelmajversion).to_f < 6.0 && Puppet::Util::Platform.windows? do
|
16
|
-
expect(Puppet::Util::Windows::User).to be_admin
|
17
|
-
expect(Puppet::Util::Windows::Process.process_privilege_symlink?).to be_falsey
|
18
|
-
end
|
19
|
-
|
20
12
|
it "should be able to lookup a standard Windows process privilege" do
|
21
13
|
Puppet::Util::Windows::Process.lookup_privilege_value('SeShutdownPrivilege') do |luid|
|
22
14
|
expect(luid).not_to be_nil
|