openvox 9.0.0.pre.alpha2 → 9.0.0.pre.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +114 -1
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile +5 -5
- data/README.md +6 -6
- data/Rakefile +3 -3
- data/conf/environment.conf +2 -2
- data/conf/fileserver.conf +3 -3
- data/conf/puppet.conf +4 -4
- data/examples/enc/regexp_nodes/regexp_nodes.rb +2 -2
- data/examples/hiera/README.md +1 -1
- data/examples/nagios/check_puppet.rb +1 -1
- data/ext/README.md +3 -3
- data/ext/hiera/hiera.yaml +1 -1
- data/ext/project_data.yaml +1 -1
- data/ext/redhat/client.sysconfig +1 -0
- data/ext/solaris/smf/puppet.xml +2 -2
- data/ext/windows/puppet_interactive.bat +1 -1
- data/ext/windows/service/daemon.rb +5 -5
- data/lib/hiera/puppet_function.rb +1 -2
- data/lib/hiera_puppet.rb +1 -1
- data/lib/puppet/agent/disabler.rb +3 -3
- data/lib/puppet/agent/locker.rb +1 -1
- data/lib/puppet/agent.rb +2 -2
- data/lib/puppet/application/agent.rb +33 -35
- data/lib/puppet/application/apply.rb +7 -7
- data/lib/puppet/application/describe.rb +3 -3
- data/lib/puppet/application/device.rb +1 -1
- data/lib/puppet/application/doc.rb +5 -7
- data/lib/puppet/application/facts.rb +1 -1
- data/lib/puppet/application/filebucket.rb +5 -5
- data/lib/puppet/application/lookup.rb +8 -8
- data/lib/puppet/application/resource.rb +5 -5
- data/lib/puppet/application/script.rb +3 -3
- data/lib/puppet/application/ssl.rb +4 -4
- data/lib/puppet/application_support.rb +2 -2
- data/lib/puppet/configurer.rb +13 -7
- data/lib/puppet/confine/variable.rb +2 -2
- data/lib/puppet/context.rb +1 -1
- data/lib/puppet/data_binding.rb +1 -1
- data/lib/puppet/defaults.rb +157 -226
- data/lib/puppet/error.rb +1 -1
- data/lib/puppet/etc.rb +4 -4
- data/lib/puppet/face/catalog/select.rb +3 -3
- data/lib/puppet/face/catalog.rb +4 -4
- data/lib/puppet/face/config.rb +6 -6
- data/lib/puppet/face/facts.rb +6 -6
- data/lib/puppet/face/help/man.erb +3 -3
- data/lib/puppet/face/node/clean.rb +3 -3
- data/lib/puppet/face/node.rb +2 -2
- data/lib/puppet/face/plugin.rb +4 -4
- data/lib/puppet/functions/all.rb +4 -4
- data/lib/puppet/functions/any.rb +4 -4
- data/lib/puppet/functions/assert_type.rb +5 -5
- data/lib/puppet/functions/defined.rb +1 -1
- data/lib/puppet/functions/each.rb +11 -11
- data/lib/puppet/functions/epp.rb +5 -5
- data/lib/puppet/functions/eyaml_lookup_key.rb +1 -1
- data/lib/puppet/functions/filter.rb +5 -5
- data/lib/puppet/functions/find_file.rb +1 -1
- data/lib/puppet/functions/hiera.rb +4 -4
- data/lib/puppet/functions/hiera_array.rb +5 -5
- data/lib/puppet/functions/hiera_hash.rb +5 -5
- data/lib/puppet/functions/hiera_include.rb +6 -6
- data/lib/puppet/functions/hocon_data.rb +1 -1
- data/lib/puppet/functions/include.rb +1 -1
- data/lib/puppet/functions/index.rb +3 -3
- data/lib/puppet/functions/inline_epp.rb +6 -6
- data/lib/puppet/functions/json_data.rb +1 -1
- data/lib/puppet/functions/lest.rb +1 -1
- data/lib/puppet/functions/lookup.rb +14 -14
- data/lib/puppet/functions/map.rb +5 -5
- data/lib/puppet/functions/reduce.rb +6 -6
- data/lib/puppet/functions/regsubst.rb +1 -13
- data/lib/puppet/functions/reverse_each.rb +5 -5
- data/lib/puppet/functions/scanf.rb +1 -1
- data/lib/puppet/functions/step.rb +5 -5
- data/lib/puppet/functions/then.rb +1 -1
- data/lib/puppet/functions/tree_each.rb +3 -3
- data/lib/puppet/functions/versioncmp.rb +1 -1
- data/lib/puppet/functions/with.rb +2 -2
- data/lib/puppet/functions/yaml_data.rb +1 -1
- data/lib/puppet/generate/type.rb +5 -1
- data/lib/puppet/gettext/config.rb +5 -5
- data/lib/puppet/gettext/module_translations.rb +1 -1
- data/lib/puppet/graph/simple_graph.rb +0 -1
- data/lib/puppet/http/client.rb +5 -5
- data/lib/puppet/http/factory.rb +1 -1
- data/lib/puppet/http/resolver/server_list.rb +2 -2
- data/lib/puppet/http/service/compiler.rb +3 -3
- data/lib/puppet/http/service/file_server.rb +1 -1
- data/lib/puppet/http/service.rb +19 -1
- data/lib/puppet/http/session.rb +1 -1
- data/lib/puppet/http.rb +1 -1
- data/lib/puppet/indirector/catalog/compiler.rb +2 -2
- data/lib/puppet/indirector/data_binding/hiera.rb +93 -2
- data/lib/puppet/indirector/face.rb +4 -4
- data/lib/puppet/indirector/facts/facter.rb +7 -7
- data/lib/puppet/indirector/file_bucket_file/file.rb +2 -2
- data/lib/puppet/indirector/file_bucket_file/rest.rb +7 -3
- data/lib/puppet/indirector/file_content/file_server.rb +1 -1
- data/lib/puppet/indirector/file_metadata/file_server.rb +1 -1
- data/lib/puppet/indirector/node/exec.rb +1 -1
- data/lib/puppet/indirector/node/rest.rb +1 -1
- data/lib/puppet/indirector/report/processor.rb +1 -1
- data/lib/puppet/indirector.rb +1 -1
- data/lib/puppet/interface/documentation.rb +1 -1
- data/lib/puppet/interface/face_collection.rb +1 -1
- data/lib/puppet/interface/option.rb +2 -2
- data/lib/puppet/module/task.rb +1 -1
- data/lib/puppet/module_tool/applications/application.rb +1 -1
- data/lib/puppet/module_tool/metadata.rb +1 -2
- data/lib/puppet/module_tool.rb +1 -1
- data/lib/puppet/network/authorization.rb +1 -1
- data/lib/puppet/network/http/api.rb +2 -2
- data/lib/puppet/network/http/connection.rb +2 -2
- data/lib/puppet/node/environment.rb +6 -6
- data/lib/puppet/node.rb +2 -2
- data/lib/puppet/pal/catalog_compiler.rb +1 -1
- data/lib/puppet/pal/pal_impl.rb +1 -25
- data/lib/puppet/parser/compiler.rb +1 -1
- data/lib/puppet/parser/functions/assert_type.rb +5 -5
- data/lib/puppet/parser/functions/create_resources.rb +1 -1
- data/lib/puppet/parser/functions/defined.rb +1 -1
- data/lib/puppet/parser/functions/digest.rb +1 -1
- data/lib/puppet/parser/functions/each.rb +11 -11
- data/lib/puppet/parser/functions/epp.rb +5 -5
- data/lib/puppet/parser/functions/filter.rb +5 -5
- data/lib/puppet/parser/functions/generate.rb +1 -1
- data/lib/puppet/parser/functions/hiera.rb +3 -3
- data/lib/puppet/parser/functions/hiera_array.rb +4 -4
- data/lib/puppet/parser/functions/hiera_hash.rb +4 -4
- data/lib/puppet/parser/functions/hiera_include.rb +5 -5
- data/lib/puppet/parser/functions/include.rb +1 -1
- data/lib/puppet/parser/functions/inline_epp.rb +6 -6
- data/lib/puppet/parser/functions/inline_template.rb +1 -1
- data/lib/puppet/parser/functions/lest.rb +1 -1
- data/lib/puppet/parser/functions/lookup.rb +14 -14
- data/lib/puppet/parser/functions/map.rb +5 -5
- data/lib/puppet/parser/functions/reduce.rb +7 -7
- data/lib/puppet/parser/functions/reverse_each.rb +5 -5
- data/lib/puppet/parser/functions/scanf.rb +1 -1
- data/lib/puppet/parser/functions/step.rb +5 -5
- data/lib/puppet/parser/functions/then.rb +1 -1
- data/lib/puppet/parser/functions/versioncmp.rb +1 -1
- data/lib/puppet/parser/functions/with.rb +1 -1
- data/lib/puppet/parser/functions.rb +3 -3
- data/lib/puppet/parser/scope.rb +1 -1
- data/lib/puppet/plugins/syntax_checkers.rb +2 -2
- data/lib/puppet/plugins.rb +1 -1
- data/lib/puppet/pops/evaluator/collectors/exported_collector.rb +1 -1
- data/lib/puppet/pops/evaluator/deferred_resolver.rb +4 -1
- data/lib/puppet/pops/issues.rb +3 -3
- data/lib/puppet/pops/loader/module_loaders.rb +4 -4
- data/lib/puppet/pops/loader/ruby_legacy_function_instantiator.rb +1 -1
- data/lib/puppet/pops/loaders.rb +4 -4
- data/lib/puppet/pops/lookup/lookup_adapter.rb +7 -66
- data/lib/puppet/pops/model/factory.rb +5 -5
- data/lib/puppet/pops/resource/resource_type_impl.rb +1 -1
- data/lib/puppet/pops/serialization/to_data_converter.rb +1 -1
- data/lib/puppet/pops/types/iterable.rb +1 -1
- data/lib/puppet/property/keyvalue.rb +3 -3
- data/lib/puppet/provider/group/aix.rb +2 -2
- data/lib/puppet/provider/nameservice/directoryservice.rb +2 -2
- data/lib/puppet/provider/package/aix.rb +1 -1
- data/lib/puppet/provider/package/apt.rb +2 -2
- data/lib/puppet/provider/package/aptitude.rb +0 -1
- data/lib/puppet/provider/package/dnfmodule.rb +1 -1
- data/lib/puppet/provider/package/nim.rb +1 -1
- data/lib/puppet/provider/package/pacman.rb +1 -2
- data/lib/puppet/provider/package/pip.rb +1 -1
- data/lib/puppet/provider/package/pip2.rb +1 -1
- data/lib/puppet/provider/package/pip3.rb +1 -1
- data/lib/puppet/provider/package/pkgdmg.rb +2 -2
- data/lib/puppet/provider/package/puppet_gem.rb +2 -2
- data/lib/puppet/provider/package/puppetserver_gem.rb +1 -1
- data/lib/puppet/provider/package/windows.rb +1 -1
- data/lib/puppet/provider/service/freebsd.rb +1 -1
- data/lib/puppet/provider/service/init.rb +5 -5
- data/lib/puppet/provider/service/launchd.rb +2 -2
- data/lib/puppet/provider/service/smf.rb +1 -1
- data/lib/puppet/provider/service/upstart.rb +2 -2
- data/lib/puppet/provider/user/aix.rb +3 -3
- data/lib/puppet/provider/user/directoryservice.rb +9 -9
- data/lib/puppet/provider/user/pw.rb +3 -3
- data/lib/puppet/provider.rb +1 -1
- data/lib/puppet/reference/configuration.rb +6 -13
- data/lib/puppet/reference/function.rb +4 -4
- data/lib/puppet/reference/indirection.rb +2 -2
- data/lib/puppet/reference/metaparameter.rb +3 -3
- data/lib/puppet/reference/providers.rb +3 -3
- data/lib/puppet/reference/report.rb +4 -4
- data/lib/puppet/reference/type.rb +2 -2
- data/lib/puppet/relationship.rb +1 -1
- data/lib/puppet/reports/http.rb +4 -4
- data/lib/puppet/reports.rb +1 -1
- data/lib/puppet/resource/catalog.rb +4 -4
- data/lib/puppet/resource/type.rb +8 -8
- data/lib/puppet/settings/base_setting.rb +2 -3
- data/lib/puppet/settings/config_file.rb +3 -3
- data/lib/puppet/settings/environment_conf.rb +3 -11
- data/lib/puppet/settings.rb +11 -51
- data/lib/puppet/ssl/certificate.rb +4 -0
- data/lib/puppet/ssl/certificate_request.rb +1 -1
- data/lib/puppet/ssl/oids.rb +1 -1
- data/lib/puppet/ssl/openssl_loader.rb +1 -1
- data/lib/puppet/ssl/ssl_provider.rb +5 -5
- data/lib/puppet/ssl/state_machine.rb +9 -3
- data/lib/puppet/syntax_checkers.rb +1 -1
- data/lib/puppet/transaction/report.rb +3 -3
- data/lib/puppet/transaction.rb +0 -1
- data/lib/puppet/type/exec.rb +20 -20
- data/lib/puppet/type/file/content.rb +10 -37
- data/lib/puppet/type/file/ensure.rb +18 -9
- data/lib/puppet/type/file/mode.rb +4 -4
- data/lib/puppet/type/file/selcontext.rb +2 -2
- data/lib/puppet/type/file/source.rb +19 -25
- data/lib/puppet/type/file.rb +22 -15
- data/lib/puppet/type/filebucket.rb +22 -8
- data/lib/puppet/type/group.rb +5 -5
- data/lib/puppet/type/notify.rb +1 -1
- data/lib/puppet/type/package.rb +4 -4
- data/lib/puppet/type/schedule.rb +11 -11
- data/lib/puppet/type/service.rb +8 -8
- data/lib/puppet/type/stage.rb +1 -1
- data/lib/puppet/type/user.rb +19 -21
- data/lib/puppet/type/whit.rb +2 -2
- data/lib/puppet/type.rb +27 -27
- data/lib/puppet/util/character_encoding.rb +3 -3
- data/lib/puppet/util/command_line.rb +1 -1
- data/lib/puppet/util/execution.rb +1 -1
- data/lib/puppet/util/filetype.rb +6 -6
- data/lib/puppet/util/log.rb +2 -2
- data/lib/puppet/util/logging.rb +3 -3
- data/lib/puppet/util/plist.rb +1 -1
- data/lib/puppet/util/profiler/around_profiler.rb +1 -1
- data/lib/puppet/util/profiler.rb +1 -1
- data/lib/puppet/util/rdoc.rb +6 -3
- data/lib/puppet/util/selinux.rb +5 -5
- data/lib/puppet/util/tag_set.rb +0 -1
- data/lib/puppet/util/windows/adsi.rb +1 -1
- data/lib/puppet/util/windows/com.rb +2 -2
- data/lib/puppet/util/windows/eventlog.rb +6 -6
- data/lib/puppet/util/windows/file.rb +2 -2
- data/lib/puppet/util/windows/security.rb +3 -3
- data/lib/puppet/util.rb +8 -3
- data/lib/puppet/version.rb +8 -8
- data/lib/puppet/x509/cert_provider.rb +1 -1
- data/lib/puppet.rb +5 -5
- data/locales/config.yaml +3 -3
- data/locales/puppet.pot +462 -464
- data/man/man5/puppet.conf.5 +122 -146
- data/man/man8/puppet-agent.8 +25 -25
- data/man/man8/puppet-apply.8 +6 -6
- data/man/man8/puppet-catalog.8 +11 -11
- data/man/man8/puppet-config.8 +7 -7
- data/man/man8/puppet-describe.8 +3 -3
- data/man/man8/puppet-device.8 +2 -2
- data/man/man8/puppet-doc.8 +5 -5
- data/man/man8/puppet-epp.8 +3 -3
- data/man/man8/puppet-facts.8 +11 -11
- data/man/man8/puppet-filebucket.8 +5 -5
- data/man/man8/puppet-generate.8 +3 -3
- data/man/man8/puppet-help.8 +3 -3
- data/man/man8/puppet-lookup.8 +8 -8
- data/man/man8/puppet-module.8 +7 -7
- data/man/man8/puppet-node.8 +11 -45
- data/man/man8/puppet-parser.8 +3 -3
- data/man/man8/puppet-plugin.8 +7 -7
- data/man/man8/puppet-report.8 +6 -6
- data/man/man8/puppet-resource.8 +5 -5
- data/man/man8/puppet-script.8 +3 -3
- data/man/man8/puppet-ssl.8 +21 -23
- data/man/man8/puppet.8 +2 -2
- metadata +5 -8
- data/lib/puppet/indirector/hiera.rb +0 -101
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +0 -902
- data/lib/puppet/util/rdoc/generators/template/puppet/puppet.rb +0 -1068
data/lib/puppet/type.rb
CHANGED
|
@@ -1238,18 +1238,18 @@ class Type
|
|
|
1238
1238
|
newmetaparam(:noop) do
|
|
1239
1239
|
desc "Whether to apply this resource in noop mode.
|
|
1240
1240
|
|
|
1241
|
-
When applying a resource in noop mode,
|
|
1241
|
+
When applying a resource in noop mode, OpenVox will check whether it is in sync,
|
|
1242
1242
|
like it does when running normally. However, if a resource attribute is not in
|
|
1243
|
-
the desired state (as declared in the catalog),
|
|
1243
|
+
the desired state (as declared in the catalog), OpenVox will take no
|
|
1244
1244
|
action, and will instead report the changes it _would_ have made. These
|
|
1245
|
-
simulated changes will appear in the report sent to the primary
|
|
1245
|
+
simulated changes will appear in the report sent to the primary OpenVox server, or
|
|
1246
1246
|
be shown on the console if running puppet agent or puppet apply in the
|
|
1247
1247
|
foreground. The simulated changes will not send refresh events to any
|
|
1248
|
-
subscribing or notified resources, although
|
|
1248
|
+
subscribing or notified resources, although OpenVox will log that a refresh
|
|
1249
1249
|
event _would_ have been sent.
|
|
1250
1250
|
|
|
1251
1251
|
**Important note:**
|
|
1252
|
-
[The `noop` setting](https://
|
|
1252
|
+
[The `noop` setting](https://docs.openvoxproject.org/openvox/latest/configuration.html#noop)
|
|
1253
1253
|
allows you to globally enable or disable noop mode, but it will _not_ override
|
|
1254
1254
|
the `noop` metaparameter on individual resources. That is, the value of the
|
|
1255
1255
|
global `noop` setting will _only_ affect resources that do not have an explicit
|
|
@@ -1265,11 +1265,11 @@ class Type
|
|
|
1265
1265
|
end
|
|
1266
1266
|
|
|
1267
1267
|
newmetaparam(:schedule) do
|
|
1268
|
-
desc "A schedule to govern when
|
|
1268
|
+
desc "A schedule to govern when OpenVox is allowed to manage this resource.
|
|
1269
1269
|
The value of this metaparameter must be the `name` of a `schedule`
|
|
1270
1270
|
resource. This means you must declare a schedule resource, then
|
|
1271
1271
|
refer to it by name; see
|
|
1272
|
-
[the docs for the `schedule` type](https://
|
|
1272
|
+
[the docs for the `schedule` type](https://docs.openvoxproject.org/openvox/latest/type.html#schedule)
|
|
1273
1273
|
for more info.
|
|
1274
1274
|
|
|
1275
1275
|
schedule { 'everyday':
|
|
@@ -1290,21 +1290,21 @@ class Type
|
|
|
1290
1290
|
attribute name, an array of attribute names, or `all`.
|
|
1291
1291
|
|
|
1292
1292
|
Auditing a resource attribute has two effects: First, whenever a catalog
|
|
1293
|
-
is applied with puppet apply or puppet agent,
|
|
1293
|
+
is applied with puppet apply or puppet agent, OpenVox will check whether
|
|
1294
1294
|
that attribute of the resource has been modified, comparing its current
|
|
1295
1295
|
value to the previous run; any change will be logged alongside any actions
|
|
1296
|
-
performed by
|
|
1296
|
+
performed by OpenVox while applying the catalog.
|
|
1297
1297
|
|
|
1298
1298
|
Secondly, marking a resource attribute for auditing will include that
|
|
1299
1299
|
attribute in inspection reports generated by puppet inspect; see the
|
|
1300
1300
|
puppet inspect documentation for more details.
|
|
1301
1301
|
|
|
1302
1302
|
Managed attributes for a resource can also be audited, but note that
|
|
1303
|
-
changes made by
|
|
1303
|
+
changes made by OpenVox will be logged as additional modifications. (I.e.
|
|
1304
1304
|
if a user manually edits a file whose contents are audited and managed,
|
|
1305
1305
|
puppet agent's next two runs will both log an audit notice: the first run
|
|
1306
1306
|
will log the user's edit and then revert the file to the desired state,
|
|
1307
|
-
and the second run will log the edit made by
|
|
1307
|
+
and the second run will log the edit made by OpenVox.)"
|
|
1308
1308
|
|
|
1309
1309
|
validate do |list|
|
|
1310
1310
|
list = Array(list).collect(&:to_sym)
|
|
@@ -1371,7 +1371,7 @@ class Type
|
|
|
1371
1371
|
end
|
|
1372
1372
|
|
|
1373
1373
|
newmetaparam(:alias) do
|
|
1374
|
-
desc "Creates an alias for the resource.
|
|
1374
|
+
desc "Creates an alias for the resource. OpenVox uses this internally when you
|
|
1375
1375
|
provide a symbolic title and an explicit namevar value:
|
|
1376
1376
|
|
|
1377
1377
|
file { 'sshdconfig':
|
|
@@ -1404,7 +1404,7 @@ class Type
|
|
|
1404
1404
|
mode => '0644',
|
|
1405
1405
|
}
|
|
1406
1406
|
|
|
1407
|
-
There's no way here for the
|
|
1407
|
+
There's no way here for the OpenVox parser to know that these two stanzas
|
|
1408
1408
|
should be affecting the same file.
|
|
1409
1409
|
|
|
1410
1410
|
"
|
|
@@ -1445,7 +1445,7 @@ class Type
|
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
1447
|
Tags are useful for things like applying a subset of a host's configuration
|
|
1448
|
-
with [the `tags` setting](https://
|
|
1448
|
+
with [the `tags` setting](https://docs.openvoxproject.org/openvox/latest/configuration.html#tags)
|
|
1449
1449
|
(e.g. `puppet agent --test --tags bootstrap`)."
|
|
1450
1450
|
|
|
1451
1451
|
munge do |tags|
|
|
@@ -1577,7 +1577,7 @@ class Type
|
|
|
1577
1577
|
|
|
1578
1578
|
newmetaparam(:require, :parent => RelationshipMetaparam, :attributes => { :direction => :in, :events => :NONE }) do
|
|
1579
1579
|
desc "One or more resources that this resource depends on, expressed as
|
|
1580
|
-
[resource references](https://
|
|
1580
|
+
[resource references](https://docs.openvoxproject.org/openvox/latest/lang_data_resource_reference.html).
|
|
1581
1581
|
Multiple resources can be specified as an array of references. When this
|
|
1582
1582
|
attribute is present:
|
|
1583
1583
|
|
|
@@ -1586,17 +1586,17 @@ class Type
|
|
|
1586
1586
|
This is one of the four relationship metaparameters, along with
|
|
1587
1587
|
`before`, `notify`, and `subscribe`. For more context, including the
|
|
1588
1588
|
alternate chaining arrow (`->` and `~>`) syntax, see
|
|
1589
|
-
[the language page on relationships](https://
|
|
1589
|
+
[the language page on relationships](https://docs.openvoxproject.org/openvox/latest/lang_relationships.html)."
|
|
1590
1590
|
end
|
|
1591
1591
|
|
|
1592
1592
|
newmetaparam(:subscribe, :parent => RelationshipMetaparam, :attributes => { :direction => :in, :events => :ALL_EVENTS, :callback => :refresh }) do
|
|
1593
1593
|
desc "One or more resources that this resource depends on, expressed as
|
|
1594
|
-
[resource references](https://
|
|
1594
|
+
[resource references](https://docs.openvoxproject.org/openvox/latest/lang_data_resource_reference.html).
|
|
1595
1595
|
Multiple resources can be specified as an array of references. When this
|
|
1596
1596
|
attribute is present:
|
|
1597
1597
|
|
|
1598
1598
|
* The subscribed resources will be applied _before_ this resource.
|
|
1599
|
-
* If
|
|
1599
|
+
* If OpenVox makes changes to any of the subscribed resources, it will cause
|
|
1600
1600
|
this resource to _refresh._ (Refresh behavior varies by resource
|
|
1601
1601
|
type: services will restart, mounts will unmount and re-mount, etc. Not
|
|
1602
1602
|
all types can refresh.)
|
|
@@ -1604,12 +1604,12 @@ class Type
|
|
|
1604
1604
|
This is one of the four relationship metaparameters, along with
|
|
1605
1605
|
`before`, `require`, and `notify`. For more context, including the
|
|
1606
1606
|
alternate chaining arrow (`->` and `~>`) syntax, see
|
|
1607
|
-
[the language page on relationships](https://
|
|
1607
|
+
[the language page on relationships](https://docs.openvoxproject.org/openvox/latest/lang_relationships.html)."
|
|
1608
1608
|
end
|
|
1609
1609
|
|
|
1610
1610
|
newmetaparam(:before, :parent => RelationshipMetaparam, :attributes => { :direction => :out, :events => :NONE }) do
|
|
1611
1611
|
desc "One or more resources that depend on this resource, expressed as
|
|
1612
|
-
[resource references](https://
|
|
1612
|
+
[resource references](https://docs.openvoxproject.org/openvox/latest/lang_data_resource_reference.html).
|
|
1613
1613
|
Multiple resources can be specified as an array of references. When this
|
|
1614
1614
|
attribute is present:
|
|
1615
1615
|
|
|
@@ -1618,17 +1618,17 @@ class Type
|
|
|
1618
1618
|
This is one of the four relationship metaparameters, along with
|
|
1619
1619
|
`require`, `notify`, and `subscribe`. For more context, including the
|
|
1620
1620
|
alternate chaining arrow (`->` and `~>`) syntax, see
|
|
1621
|
-
[the language page on relationships](https://
|
|
1621
|
+
[the language page on relationships](https://docs.openvoxproject.org/openvox/latest/lang_relationships.html)."
|
|
1622
1622
|
end
|
|
1623
1623
|
|
|
1624
1624
|
newmetaparam(:notify, :parent => RelationshipMetaparam, :attributes => { :direction => :out, :events => :ALL_EVENTS, :callback => :refresh }) do
|
|
1625
1625
|
desc "One or more resources that depend on this resource, expressed as
|
|
1626
|
-
[resource references](https://
|
|
1626
|
+
[resource references](https://docs.openvoxproject.org/openvox/latest/lang_data_resource_reference.html).
|
|
1627
1627
|
Multiple resources can be specified as an array of references. When this
|
|
1628
1628
|
attribute is present:
|
|
1629
1629
|
|
|
1630
1630
|
* This resource will be applied _before_ the notified resources.
|
|
1631
|
-
* If
|
|
1631
|
+
* If OpenVox makes changes to this resource, it will cause all of the
|
|
1632
1632
|
notified resources to _refresh._ (Refresh behavior varies by resource
|
|
1633
1633
|
type: services will restart, mounts will unmount and re-mount, etc. Not
|
|
1634
1634
|
all types can refresh.)
|
|
@@ -1636,7 +1636,7 @@ class Type
|
|
|
1636
1636
|
This is one of the four relationship metaparameters, along with
|
|
1637
1637
|
`before`, `require`, and `subscribe`. For more context, including the
|
|
1638
1638
|
alternate chaining arrow (`->` and `~>`) syntax, see
|
|
1639
|
-
[the language page on relationships](https://
|
|
1639
|
+
[the language page on relationships](https://docs.openvoxproject.org/openvox/latest/lang_relationships.html)."
|
|
1640
1640
|
end
|
|
1641
1641
|
|
|
1642
1642
|
newmetaparam(:stage) do
|
|
@@ -1649,7 +1649,7 @@ class Type
|
|
|
1649
1649
|
By default, all classes are declared in the `main` stage. To assign a class
|
|
1650
1650
|
to a different stage, you must:
|
|
1651
1651
|
|
|
1652
|
-
* Declare the new stage as a [`stage` resource](https://
|
|
1652
|
+
* Declare the new stage as a [`stage` resource](https://docs.openvoxproject.org/openvox/latest/type.html#stage).
|
|
1653
1653
|
* Declare an order relationship between the new stage and the `main` stage.
|
|
1654
1654
|
* Use the resource-like syntax to declare the class, and set the `stage`
|
|
1655
1655
|
metaparameter to the name of the desired stage.
|
|
@@ -1834,7 +1834,7 @@ class Type
|
|
|
1834
1834
|
# like Puppet::Type::Ssh_authorized_key::ParameterProvider.
|
|
1835
1835
|
desc <<-EOT
|
|
1836
1836
|
The specific backend to use for this `#{to_s.split('::')[2].downcase}`
|
|
1837
|
-
resource. You will seldom need to specify this ---
|
|
1837
|
+
resource. You will seldom need to specify this --- OpenVox will usually
|
|
1838
1838
|
discover the appropriate provider for your platform.
|
|
1839
1839
|
EOT
|
|
1840
1840
|
|
|
@@ -2152,7 +2152,7 @@ class Type
|
|
|
2152
2152
|
# to objects called from elsewhere, or not. ;-)</irony>
|
|
2153
2153
|
#
|
|
2154
2154
|
# @comment Types (which map to resources in the languages) are entirely composed of
|
|
2155
|
-
# attribute value pairs. Generally,
|
|
2155
|
+
# attribute value pairs. Generally, OpenVox calls any of these things an
|
|
2156
2156
|
# 'attribute', but these attributes always take one of three specific
|
|
2157
2157
|
# forms: parameters, metaparams, or properties.
|
|
2158
2158
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# A module to centralize heuristics/practices for managing character encoding in
|
|
3
|
+
# A module to centralize heuristics/practices for managing character encoding in OpenVox
|
|
4
4
|
|
|
5
5
|
module Puppet::Util::CharacterEncoding
|
|
6
6
|
class << self
|
|
@@ -22,7 +22,7 @@ module Puppet::Util::CharacterEncoding
|
|
|
22
22
|
if original_encoding == Encoding::UTF_8
|
|
23
23
|
unless string_copy.valid_encoding?
|
|
24
24
|
Puppet.debug {
|
|
25
|
-
_("%{value} is already labeled as UTF-8 but this encoding is invalid. It cannot be transcoded by
|
|
25
|
+
_("%{value} is already labeled as UTF-8 but this encoding is invalid. It cannot be transcoded by OpenVox.") % { value: string.dump }
|
|
26
26
|
}
|
|
27
27
|
end
|
|
28
28
|
# String is already valid UTF-8 - noop
|
|
@@ -44,7 +44,7 @@ module Puppet::Util::CharacterEncoding
|
|
|
44
44
|
# error on ruby's part, ie Encoding::UndefinedConversionError on a
|
|
45
45
|
# failure to encode!.
|
|
46
46
|
Puppet.debug {
|
|
47
|
-
_("%{error}: %{value} cannot be transcoded by
|
|
47
|
+
_("%{error}: %{value} cannot be transcoded by OpenVox.") % { error: detail.inspect, value: string.dump }
|
|
48
48
|
}
|
|
49
49
|
string_copy
|
|
50
50
|
end
|
|
@@ -135,7 +135,7 @@ module Puppet
|
|
|
135
135
|
Puppet::ModuleTranslations.load_from_modulepath(configured_environment.modules)
|
|
136
136
|
Puppet::ModuleTranslations.load_from_vardir(Puppet[:vardir])
|
|
137
137
|
|
|
138
|
-
#
|
|
138
|
+
# OpenVox requires OpenFact, which initializes its lookup paths. Reset OpenFact to
|
|
139
139
|
# pickup the new $LOAD_PATH.
|
|
140
140
|
Puppet.runtime[:facter].reset
|
|
141
141
|
end
|
|
@@ -106,7 +106,7 @@ module Puppet::Util::Execution
|
|
|
106
106
|
# elements should be the individual arguments to that executable.
|
|
107
107
|
# @param options [Hash] a Hash of options
|
|
108
108
|
# @option options [String] :cwd the directory from which to run the command. Raises an error if the directory does not exist.
|
|
109
|
-
# This option is only available on the agent. It cannot be used on the
|
|
109
|
+
# This option is only available on the agent. It cannot be used on the server, meaning it cannot be used in, for example,
|
|
110
110
|
# regular functions, hiera backends, or report processors.
|
|
111
111
|
# @option options [Boolean] :failonfail if this value is set to true, then this method will raise an error if the
|
|
112
112
|
# command is not executed successfully.
|
data/lib/puppet/util/filetype.rb
CHANGED
|
@@ -193,7 +193,7 @@ class Puppet::Util::FileType
|
|
|
193
193
|
# Read a specific @path's cron tab.
|
|
194
194
|
def read
|
|
195
195
|
unless Puppet::Util.uid(@path)
|
|
196
|
-
Puppet.debug _("The %{path} user does not exist. Treating their crontab file as empty in case
|
|
196
|
+
Puppet.debug _("The %{path} user does not exist. Treating their crontab file as empty in case OpenVox creates them in the middle of the run.") % { path: @path }
|
|
197
197
|
|
|
198
198
|
return ""
|
|
199
199
|
end
|
|
@@ -204,7 +204,7 @@ class Puppet::Util::FileType
|
|
|
204
204
|
when /no crontab for/
|
|
205
205
|
""
|
|
206
206
|
when /are not allowed to/
|
|
207
|
-
Puppet.debug _("The %{path} user is not authorized to use cron. Their crontab file is treated as empty in case
|
|
207
|
+
Puppet.debug _("The %{path} user is not authorized to use cron. Their crontab file is treated as empty in case OpenVox authorizes them in the middle of the run (by, for example, modifying the cron.deny or cron.allow files).") % { path: @path }
|
|
208
208
|
|
|
209
209
|
""
|
|
210
210
|
else
|
|
@@ -258,7 +258,7 @@ class Puppet::Util::FileType
|
|
|
258
258
|
# Read a specific @path's cron tab.
|
|
259
259
|
def read
|
|
260
260
|
unless Puppet::Util.uid(@path)
|
|
261
|
-
Puppet.debug _("The %{path} user does not exist. Treating their crontab file as empty in case
|
|
261
|
+
Puppet.debug _("The %{path} user does not exist. Treating their crontab file as empty in case OpenVox creates them in the middle of the run.") % { path: @path }
|
|
262
262
|
|
|
263
263
|
return ""
|
|
264
264
|
end
|
|
@@ -269,7 +269,7 @@ class Puppet::Util::FileType
|
|
|
269
269
|
when /can't open your crontab/
|
|
270
270
|
""
|
|
271
271
|
when /you are not authorized to use cron/
|
|
272
|
-
Puppet.debug _("The %{path} user is not authorized to use cron. Their crontab file is treated as empty in case
|
|
272
|
+
Puppet.debug _("The %{path} user is not authorized to use cron. Their crontab file is treated as empty in case OpenVox authorizes them in the middle of the run (by, for example, modifying the cron.deny or cron.allow files).") % { path: @path }
|
|
273
273
|
|
|
274
274
|
""
|
|
275
275
|
else
|
|
@@ -309,7 +309,7 @@ class Puppet::Util::FileType
|
|
|
309
309
|
# Read a specific @path's cron tab.
|
|
310
310
|
def read
|
|
311
311
|
unless Puppet::Util.uid(@path)
|
|
312
|
-
Puppet.debug _("The %{path} user does not exist. Treating their crontab file as empty in case
|
|
312
|
+
Puppet.debug _("The %{path} user does not exist. Treating their crontab file as empty in case OpenVox creates them in the middle of the run.") % { path: @path }
|
|
313
313
|
|
|
314
314
|
return ""
|
|
315
315
|
end
|
|
@@ -320,7 +320,7 @@ class Puppet::Util::FileType
|
|
|
320
320
|
when /open.*in.*directory/
|
|
321
321
|
""
|
|
322
322
|
when /not.*authorized.*cron/
|
|
323
|
-
Puppet.debug _("The %{path} user is not authorized to use cron. Their crontab file is treated as empty in case
|
|
323
|
+
Puppet.debug _("The %{path} user is not authorized to use cron. Their crontab file is treated as empty in case OpenVox authorizes them in the middle of the run (by, for example, modifying the cron.deny or cron.allow files).") % { path: @path }
|
|
324
324
|
|
|
325
325
|
""
|
|
326
326
|
else
|
data/lib/puppet/util/log.rb
CHANGED
|
@@ -116,7 +116,7 @@ class Puppet::Util::Log
|
|
|
116
116
|
# loglevel changed
|
|
117
117
|
@loglevel = loglevel
|
|
118
118
|
|
|
119
|
-
# Enable or disable
|
|
119
|
+
# Enable or disable OpenFact debugging
|
|
120
120
|
Puppet.runtime[:facter].debugging(level == :debug)
|
|
121
121
|
end
|
|
122
122
|
|
|
@@ -157,7 +157,7 @@ class Puppet::Util::Log
|
|
|
157
157
|
newdestination(:console)
|
|
158
158
|
end
|
|
159
159
|
|
|
160
|
-
# Re-raise (end exit
|
|
160
|
+
# Re-raise (end exit OpenVox) because we could not set up logging correctly.
|
|
161
161
|
raise detail
|
|
162
162
|
end
|
|
163
163
|
end
|
data/lib/puppet/util/logging.rb
CHANGED
|
@@ -145,7 +145,7 @@ module Logging
|
|
|
145
145
|
end
|
|
146
146
|
|
|
147
147
|
# Logs a warning whose origin comes from Puppet source rather than somewhere
|
|
148
|
-
# internal within
|
|
148
|
+
# internal within OpenVox. Otherwise the same as deprecation_warning()
|
|
149
149
|
#
|
|
150
150
|
# @param message [String] The message to log (logs via warning)
|
|
151
151
|
# @param options [Hash]
|
|
@@ -253,8 +253,8 @@ module Logging
|
|
|
253
253
|
end
|
|
254
254
|
end
|
|
255
255
|
|
|
256
|
-
# Sets up
|
|
257
|
-
# This method causes
|
|
256
|
+
# Sets up OpenFact logging.
|
|
257
|
+
# This method causes OpenFact output to be forwarded to OpenVox.
|
|
258
258
|
def self.setup_facter_logging!
|
|
259
259
|
Puppet.runtime[:facter]
|
|
260
260
|
true
|
data/lib/puppet/util/plist.rb
CHANGED
|
@@ -46,7 +46,7 @@ module Puppet::Util::Plist
|
|
|
46
46
|
{ :failonfail => true, :combine => true })
|
|
47
47
|
return parse_plist(plist)
|
|
48
48
|
rescue Puppet::ExecutionFailure => detail
|
|
49
|
-
message = _("Cannot read file %{file_path};
|
|
49
|
+
message = _("Cannot read file %{file_path}; OpenVox is skipping it.") % { file_path: file_path }
|
|
50
50
|
message += '\n' + _("Details: %{detail}") % { detail: detail }
|
|
51
51
|
Puppet.warning(message)
|
|
52
52
|
end
|
|
@@ -39,7 +39,7 @@ class Puppet::Util::Profiler::AroundProfiler
|
|
|
39
39
|
|
|
40
40
|
# Profile a block of code and log the time it took to execute.
|
|
41
41
|
#
|
|
42
|
-
# This outputs
|
|
42
|
+
# This outputs log entries to the OpenVox server's logging destination
|
|
43
43
|
# providing the time it took, a message describing the profiled code
|
|
44
44
|
# and a leaf location marking where the profile method was called
|
|
45
45
|
# in the profiled hierarchy.
|
data/lib/puppet/util/profiler.rb
CHANGED
|
@@ -40,7 +40,7 @@ module Puppet::Util::Profiler
|
|
|
40
40
|
|
|
41
41
|
# Profile a block of code and log the time it took to execute.
|
|
42
42
|
#
|
|
43
|
-
# This outputs
|
|
43
|
+
# This outputs log entries to the OpenVox server's logging destination
|
|
44
44
|
# providing the time it took, a message describing the profiled code
|
|
45
45
|
# and a leaf location marking where the profile method was called
|
|
46
46
|
# in the profiled hierarchy.
|
data/lib/puppet/util/rdoc.rb
CHANGED
|
@@ -16,9 +16,12 @@ module Puppet::Util::RDoc
|
|
|
16
16
|
|
|
17
17
|
r = RDoc::RDoc.new
|
|
18
18
|
|
|
19
|
-
#
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
# Documentation is rendered by RDoc's default generator using our custom
|
|
20
|
+
# parser. The historical custom "puppet" generator and its HTML template
|
|
21
|
+
# targeted RDoc 1.x and could not be loaded under any supported RDoc; the
|
|
22
|
+
# template also carried a CC-BY-1.0 license, which is incompatible with
|
|
23
|
+
# the Debian Free Software Guidelines. Both were removed.
|
|
24
|
+
options = ["--quiet",
|
|
22
25
|
"--exclude", "/modules/[^/]*/spec/.*$",
|
|
23
26
|
"--exclude", "/modules/[^/]*/files/.*$",
|
|
24
27
|
"--exclude", "/modules/[^/]*/tests/.*$",
|
data/lib/puppet/util/selinux.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Provides utility functions to help interface
|
|
3
|
+
# Provides utility functions to help interface OpenVox to SELinux.
|
|
4
4
|
#
|
|
5
5
|
# This requires the very new SELinux Ruby bindings. These bindings closely
|
|
6
6
|
# mirror the SELinux C library interface.
|
|
@@ -111,7 +111,7 @@ module Puppet::Util::SELinux
|
|
|
111
111
|
# This updates the actual SELinux label on the file. You can update
|
|
112
112
|
# only a single component or update the entire context.
|
|
113
113
|
# The caveat is that since setting a partial context makes no sense the
|
|
114
|
-
# file has to already exist.
|
|
114
|
+
# file has to already exist. OpenVox (via the File resource) will always
|
|
115
115
|
# just try to set components, even if all values are specified by the manifest.
|
|
116
116
|
# I believe that the OS should always provide at least a fall-through context
|
|
117
117
|
# though on any well-running system.
|
|
@@ -123,7 +123,7 @@ module Puppet::Util::SELinux
|
|
|
123
123
|
context = Selinux.lgetfilecon(file)[1]
|
|
124
124
|
if context == -1
|
|
125
125
|
# We can't set partial context components when no context exists
|
|
126
|
-
# unless/until we can find a way to make
|
|
126
|
+
# unless/until we can find a way to make OpenVox call this method
|
|
127
127
|
# once for all selinux file label attributes.
|
|
128
128
|
Puppet.warning _("Can't set SELinux context on file unless the file already has some kind of context")
|
|
129
129
|
return nil
|
|
@@ -157,7 +157,7 @@ module Puppet::Util::SELinux
|
|
|
157
157
|
|
|
158
158
|
# Since this call relies on get_selinux_default_context it also needs a
|
|
159
159
|
# full non-relative path to the file. Fortunately, that seems to be all
|
|
160
|
-
#
|
|
160
|
+
# OpenVox uses. This will set the file's SELinux context to the policy's
|
|
161
161
|
# default context (if any) if it differs from the context currently on
|
|
162
162
|
# the file.
|
|
163
163
|
def set_selinux_default_context(file, resource_ensure = nil)
|
|
@@ -178,7 +178,7 @@ module Puppet::Util::SELinux
|
|
|
178
178
|
# potential issues when mcstransd is not functional.
|
|
179
179
|
#
|
|
180
180
|
# It is not marked private because it is needed by File's
|
|
181
|
-
# selcontext.rb, but it is not intended for use outside of
|
|
181
|
+
# selcontext.rb, but it is not intended for use outside of OpenVox's
|
|
182
182
|
# code.
|
|
183
183
|
#
|
|
184
184
|
# @param category [String] An selinux category, such as "s0" or "SystemLow"
|
data/lib/puppet/util/tag_set.rb
CHANGED
|
@@ -288,7 +288,7 @@ module Puppet::Util::Windows::ADSI
|
|
|
288
288
|
rescue WIN32OLERuntimeError => e
|
|
289
289
|
# ERROR_BAD_USERNAME 2202L from winerror.h
|
|
290
290
|
if e.message =~ /8007089A/m
|
|
291
|
-
raise Puppet::Error, _("
|
|
291
|
+
raise Puppet::Error, _("OpenVox is not able to create/delete domain %{object_class} objects with the %{object_class} resource.") % { object_class: object_class }
|
|
292
292
|
end
|
|
293
293
|
|
|
294
294
|
raise Puppet::Error.new(_("%{object_class} update failed: %{error}") % { object_class: object_class.capitalize, error: e }, e)
|
|
@@ -129,7 +129,7 @@ module Puppet::Util::Windows::COM
|
|
|
129
129
|
module Instance
|
|
130
130
|
def self.[](iface)
|
|
131
131
|
Class.new(iface) do
|
|
132
|
-
|
|
132
|
+
include Helpers
|
|
133
133
|
|
|
134
134
|
def initialize(pointer)
|
|
135
135
|
self.pointer = pointer
|
|
@@ -158,7 +158,7 @@ module Puppet::Util::Windows::COM
|
|
|
158
158
|
module Factory
|
|
159
159
|
def self.[](iface, clsid)
|
|
160
160
|
Class.new(iface) do
|
|
161
|
-
|
|
161
|
+
include Helpers
|
|
162
162
|
|
|
163
163
|
const_set(:CLSID, clsid)
|
|
164
164
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
require 'ffi'
|
|
4
4
|
|
|
5
5
|
# Puppet::Util::Windows::EventLog needs to be requirable without having loaded
|
|
6
|
-
# any other parts of
|
|
7
|
-
# that runs
|
|
6
|
+
# any other parts of OpenVox so it can be leveraged independently by the code
|
|
7
|
+
# that runs OpenVox as a service on Windows.
|
|
8
8
|
#
|
|
9
9
|
# For this reason we:
|
|
10
10
|
# - Define Puppet::Util::Windows
|
|
@@ -21,7 +21,7 @@ class Puppet::Util::Windows::EventLog
|
|
|
21
21
|
EVENTLOG_INFORMATION_TYPE = 0x0004
|
|
22
22
|
|
|
23
23
|
# These are duplicate definitions from Puppet::Util::Windows::ApiTypes,
|
|
24
|
-
# established here so this class can be standalone from
|
|
24
|
+
# established here so this class can be standalone from OpenVox, and public so
|
|
25
25
|
# we can reference them in tests.
|
|
26
26
|
NULL_HANDLE = 0
|
|
27
27
|
WIN32_FALSE = 0
|
|
@@ -88,7 +88,7 @@ class Puppet::Util::Windows::EventLog
|
|
|
88
88
|
|
|
89
89
|
# Query event identifier info for a given log level
|
|
90
90
|
# @param level [Symbol] an event log level
|
|
91
|
-
# @return [Array] Win API Event ID,
|
|
91
|
+
# @return [Array] Win API Event ID, OpenVox Event ID
|
|
92
92
|
# @api public
|
|
93
93
|
def to_native(level)
|
|
94
94
|
case level
|
|
@@ -107,9 +107,9 @@ class Puppet::Util::Windows::EventLog
|
|
|
107
107
|
private
|
|
108
108
|
|
|
109
109
|
# For the purposes of allowing this class to be standalone, the following are
|
|
110
|
-
# duplicate definitions from elsewhere in
|
|
110
|
+
# duplicate definitions from elsewhere in OpenVox:
|
|
111
111
|
|
|
112
|
-
# If we're loaded via
|
|
112
|
+
# If we're loaded via OpenVox we should keep the previous behavior of raising
|
|
113
113
|
# Puppet::Util::Windows::Error on errors. If we aren't, at least concatenate
|
|
114
114
|
# the error code to the exception message to pass this information on to the
|
|
115
115
|
# user
|
|
@@ -213,7 +213,7 @@ module Puppet::Util::Windows::File
|
|
|
213
213
|
module_function :reparse_point?
|
|
214
214
|
|
|
215
215
|
def symlink?(file_name)
|
|
216
|
-
#
|
|
216
|
+
# OpenVox currently only handles mount point and symlink reparse points, ignores others
|
|
217
217
|
reparse_point?(file_name) && symlink_reparse_point?(file_name)
|
|
218
218
|
end
|
|
219
219
|
module_function :symlink?
|
|
@@ -340,7 +340,7 @@ module Puppet::Util::Windows::File
|
|
|
340
340
|
end
|
|
341
341
|
private_class_method :resolve_symlink
|
|
342
342
|
|
|
343
|
-
# these reparse point types are the only ones
|
|
343
|
+
# these reparse point types are the only ones OpenVox currently understands
|
|
344
344
|
# so rather than raising an exception in readlink, prefer to not consider
|
|
345
345
|
# the path a symlink when stat'ing later
|
|
346
346
|
def self.symlink_reparse_point?(path)
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
#
|
|
6
6
|
# The primary goal of this mapping is to ensure that owner, group, and
|
|
7
7
|
# modes can be round-tripped in a consistent and deterministic
|
|
8
|
-
# way. Otherwise,
|
|
8
|
+
# way. Otherwise, OpenVox might think file resources are out-of-sync
|
|
9
9
|
# every time it runs. A secondary goal is to provide equivalent
|
|
10
10
|
# permissions for common use-cases. For example, setting the owner to
|
|
11
11
|
# "Administrators", group to "Users", and mode to 750 (which also
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
# be mapped into the 3 class POSIX model. The get_mode method will
|
|
53
53
|
# set the S_IEXTRA bit flag indicating that an access control entry
|
|
54
54
|
# was found whose SID is neither the owner, group, or other. This
|
|
55
|
-
# enables
|
|
56
|
-
# especially those that
|
|
55
|
+
# enables OpenVox to detect when file/dirs are out-of-sync,
|
|
56
|
+
# especially those that OpenVox did not create, but is attempting
|
|
57
57
|
# to manage.
|
|
58
58
|
# * A special case of this is S_ISYSTEM_MISSING, which is set when the
|
|
59
59
|
# SYSTEM permissions are *not* present on the DACL.
|
data/lib/puppet/util.rb
CHANGED
|
@@ -44,6 +44,7 @@ module Util
|
|
|
44
44
|
# @deprecated Use ENV instead
|
|
45
45
|
# @api private
|
|
46
46
|
def get_env(name, mode = default_env)
|
|
47
|
+
Puppet.deprecation_warning(_("Puppet::Util.get_env is deprecated and will be removed in a future version. Use ENV[] directly instead."))
|
|
47
48
|
ENV.fetch(name, nil)
|
|
48
49
|
end
|
|
49
50
|
module_function :get_env
|
|
@@ -51,6 +52,7 @@ module Util
|
|
|
51
52
|
# @deprecated Use ENV instead
|
|
52
53
|
# @api private
|
|
53
54
|
def get_environment(mode = default_env)
|
|
55
|
+
Puppet.deprecation_warning(_("Puppet::Util.get_environment is deprecated and will be removed in a future version. Use ENV.to_hash directly instead."))
|
|
54
56
|
ENV.to_hash
|
|
55
57
|
end
|
|
56
58
|
module_function :get_environment
|
|
@@ -58,6 +60,7 @@ module Util
|
|
|
58
60
|
# @deprecated Use ENV instead
|
|
59
61
|
# @api private
|
|
60
62
|
def clear_environment(mode = default_env)
|
|
63
|
+
Puppet.deprecation_warning(_("Puppet::Util.clear_environment is deprecated and will be removed in a future version. Use ENV.clear directly instead."))
|
|
61
64
|
ENV.clear
|
|
62
65
|
end
|
|
63
66
|
module_function :clear_environment
|
|
@@ -65,6 +68,7 @@ module Util
|
|
|
65
68
|
# @deprecated Use ENV instead
|
|
66
69
|
# @api private
|
|
67
70
|
def set_env(name, value = nil, mode = default_env)
|
|
71
|
+
Puppet.deprecation_warning(_("Puppet::Util.set_env is deprecated and will be removed in a future version. Use ENV[]= directly instead."))
|
|
68
72
|
ENV[name] = value
|
|
69
73
|
end
|
|
70
74
|
module_function :set_env
|
|
@@ -72,7 +76,8 @@ module Util
|
|
|
72
76
|
# @deprecated Use ENV instead
|
|
73
77
|
# @api private
|
|
74
78
|
def merge_environment(env_hash, mode = default_env)
|
|
75
|
-
ENV.merge!
|
|
79
|
+
Puppet.deprecation_warning(_("Puppet::Util.merge_environment is deprecated and will be removed in a future version. Use ENV.merge! directly instead."))
|
|
80
|
+
ENV.merge!(env_hash.transform_keys(&:to_s))
|
|
76
81
|
end
|
|
77
82
|
module_function :merge_environment
|
|
78
83
|
|
|
@@ -257,7 +262,7 @@ module Util
|
|
|
257
262
|
end
|
|
258
263
|
|
|
259
264
|
# Ruby only sets File::ALT_SEPARATOR on Windows and the Ruby standard
|
|
260
|
-
# library uses that to test what platform it's on. Normally in
|
|
265
|
+
# library uses that to test what platform it's on. Normally in OpenVox we
|
|
261
266
|
# would use Puppet.features.microsoft_windows?, but this method needs to
|
|
262
267
|
# be called during the initialization of features so it can't depend on
|
|
263
268
|
# that.
|
|
@@ -739,7 +744,7 @@ module Util
|
|
|
739
744
|
module_function :deterministic_rand_int
|
|
740
745
|
|
|
741
746
|
# Executes a block of code, wrapped around Facter.load_external(false) and
|
|
742
|
-
# Facter.load_external(true) which will cause
|
|
747
|
+
# Facter.load_external(true) which will cause OpenFact to not evaluate external facts.
|
|
743
748
|
def skip_external_facts
|
|
744
749
|
return yield unless Puppet.runtime[:facter].load_external?
|
|
745
750
|
|