openvox 9.0.0.pre.beta1 → 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 +60 -2
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile +3 -3
- 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 +156 -194
- 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/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/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 +1 -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 -1
- 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/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/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 +10 -10
- 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 +3 -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 +4 -4
- 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 +18 -18
- 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 +2 -2
- 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 +3 -6
- 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/package.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Puppet
|
|
|
17
17
|
cannot. For those package formats that cannot retrieve their own files,
|
|
18
18
|
you can use the `source` parameter to point to the correct file.
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
OpenVox will automatically guess the packaging format that you are
|
|
21
21
|
using based on the platform you are on, but you can override it
|
|
22
22
|
using the `provider` parameter; each provider defines what it
|
|
23
23
|
requires in order to function, and you must meet those requirements
|
|
@@ -30,7 +30,7 @@ module Puppet
|
|
|
30
30
|
resource; `Package[<NAME>]` is not a synonym for `Package[<TITLE>]` like
|
|
31
31
|
it is for many other resource types.
|
|
32
32
|
|
|
33
|
-
**Autorequires:** If
|
|
33
|
+
**Autorequires:** If OpenVox is managing the files specified as a
|
|
34
34
|
package's `adminfile`, `responsefile`, or `source`, the package
|
|
35
35
|
resource will autorequire those files."
|
|
36
36
|
|
|
@@ -431,7 +431,7 @@ module Puppet
|
|
|
431
431
|
|
|
432
432
|
Different providers accept different values for `source`. Most providers
|
|
433
433
|
accept paths to local files stored on the target system. Some providers
|
|
434
|
-
may also accept URLs or network drive paths.
|
|
434
|
+
may also accept URLs or network drive paths. OpenVox will not
|
|
435
435
|
automatically retrieve source files for you, and usually just passes the
|
|
436
436
|
value of `source` to the package installation command.
|
|
437
437
|
|
|
@@ -598,7 +598,7 @@ module Puppet
|
|
|
598
598
|
option will automatically be quoted when passed to the uninstall
|
|
599
599
|
command.
|
|
600
600
|
|
|
601
|
-
On Windows, this is the **only** place in
|
|
601
|
+
On Windows, this is the **only** place in OpenVox where backslash
|
|
602
602
|
separators should be used. Note that backslashes in double-quoted
|
|
603
603
|
strings _must_ be double-escaped and backslashes in single-quoted
|
|
604
604
|
strings _may_ be double-escaped.
|
data/lib/puppet/type/schedule.rb
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
module Puppet
|
|
4
4
|
Type.newtype(:schedule) do
|
|
5
5
|
@doc = <<-'EOT'
|
|
6
|
-
Define schedules for
|
|
7
|
-
[`schedule`](https://
|
|
6
|
+
Define schedules for OpenVox. Resources can be limited to a schedule by using the
|
|
7
|
+
[`schedule`](https://docs.openvoxproject.org/openvox/latest/metaparameter.html#schedule)
|
|
8
8
|
metaparameter.
|
|
9
9
|
|
|
10
10
|
Currently, **schedules can only be used to stop a resource from being
|
|
@@ -12,11 +12,11 @@ module Puppet
|
|
|
12
12
|
wouldn't be, and they cannot accurately specify a time when a resource
|
|
13
13
|
should run.
|
|
14
14
|
|
|
15
|
-
Every time
|
|
15
|
+
Every time OpenVox applies its configuration, it will apply the
|
|
16
16
|
set of resources whose schedule does not eliminate them from
|
|
17
17
|
running right then, but there is currently no system in place to
|
|
18
18
|
guarantee that a given resource runs at a given time. If you
|
|
19
|
-
specify a very restrictive schedule and
|
|
19
|
+
specify a very restrictive schedule and OpenVox happens to run at a
|
|
20
20
|
time within that schedule, then the resources will get applied;
|
|
21
21
|
otherwise, that work may never get done.
|
|
22
22
|
|
|
@@ -31,13 +31,13 @@ module Puppet
|
|
|
31
31
|
repeat => 1,
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
With this schedule, the first time that
|
|
34
|
+
With this schedule, the first time that OpenVox runs between 2 and 4 AM,
|
|
35
35
|
all resources with this schedule will get applied, but they won't
|
|
36
36
|
get applied again between 2 and 4 because they will have already
|
|
37
37
|
run once that day, and they won't get applied outside that schedule
|
|
38
38
|
because they will be outside the scheduled range.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
OpenVox automatically creates a schedule for each of the valid periods
|
|
41
41
|
with the same name as that period (such as hourly and daily).
|
|
42
42
|
Additionally, a schedule named `puppet` is created and used as the
|
|
43
43
|
default, with the following attributes:
|
|
@@ -195,7 +195,7 @@ module Puppet
|
|
|
195
195
|
newparam(:period) do
|
|
196
196
|
desc <<-EOT
|
|
197
197
|
The period of repetition for resources on this schedule. The default is
|
|
198
|
-
for resources to get applied every time
|
|
198
|
+
for resources to get applied every time OpenVox runs.
|
|
199
199
|
|
|
200
200
|
Note that the period defines how often a given resource will get
|
|
201
201
|
applied but not when; if you would like to restrict the hours
|
|
@@ -203,7 +203,7 @@ module Puppet
|
|
|
203
203
|
during a maintenance window), then use the `range` attribute.
|
|
204
204
|
|
|
205
205
|
If the provided periods are not sufficient, you can provide a
|
|
206
|
-
value to the *repeat* attribute, which will cause
|
|
206
|
+
value to the *repeat* attribute, which will cause OpenVox to
|
|
207
207
|
schedule the affected resources evenly in the period the
|
|
208
208
|
specified number of times. Take this schedule:
|
|
209
209
|
|
|
@@ -212,12 +212,12 @@ module Puppet
|
|
|
212
212
|
repeat => 6,
|
|
213
213
|
}
|
|
214
214
|
|
|
215
|
-
This can cause
|
|
215
|
+
This can cause OpenVox to apply that resource up to every 10 minutes.
|
|
216
216
|
|
|
217
|
-
At the moment,
|
|
217
|
+
At the moment, OpenVox cannot guarantee that level of repetition; that
|
|
218
218
|
is, the resource can applied _up to_ every 10 minutes, but internal
|
|
219
219
|
factors might prevent it from actually running that often (for instance,
|
|
220
|
-
if
|
|
220
|
+
if an OpenVox run is still in progress when the next run is scheduled to
|
|
221
221
|
start, that next run will be suppressed).
|
|
222
222
|
|
|
223
223
|
See the `periodmatch` attribute for tuning whether to match
|
data/lib/puppet/type/service.rb
CHANGED
|
@@ -11,24 +11,24 @@ module Puppet
|
|
|
11
11
|
@doc = "Manage running services. Service support unfortunately varies
|
|
12
12
|
widely by platform --- some platforms have very little if any concept of a
|
|
13
13
|
running service, and some have a very codified and powerful concept.
|
|
14
|
-
|
|
14
|
+
OpenVox's service support is usually capable of doing the right thing, but
|
|
15
15
|
the more information you can provide, the better behaviour you will get.
|
|
16
16
|
|
|
17
17
|
Puppet 2.7 and newer expect init scripts to have a working status command.
|
|
18
18
|
If this isn't the case for any of your services' init scripts, you will
|
|
19
19
|
need to set `hasstatus` to false and possibly specify a custom status
|
|
20
|
-
command in the `status` attribute. As a last resort,
|
|
20
|
+
command in the `status` attribute. As a last resort, OpenVox will attempt to
|
|
21
21
|
search the process table by calling whatever command is listed in the `ps`
|
|
22
22
|
fact. The default search pattern is the name of the service, but you can
|
|
23
23
|
specify it with the `pattern` attribute.
|
|
24
24
|
|
|
25
25
|
**Refresh:** `service` resources can respond to refresh events (via
|
|
26
26
|
`notify`, `subscribe`, or the `~>` arrow). If a `service` receives an
|
|
27
|
-
event from another resource,
|
|
27
|
+
event from another resource, OpenVox will restart the service it manages.
|
|
28
28
|
The actual command used to restart the service depends on the platform and
|
|
29
29
|
can be configured:
|
|
30
30
|
|
|
31
|
-
* If you set `hasrestart` to true,
|
|
31
|
+
* If you set `hasrestart` to true, OpenVox will use the init script's restart command.
|
|
32
32
|
* You can provide an explicit command for restarting with the `restart` attribute.
|
|
33
33
|
* If you do neither, the service's stop and start commands will be used."
|
|
34
34
|
|
|
@@ -61,7 +61,7 @@ module Puppet
|
|
|
61
61
|
wherever possible, it relies on local tools to enable or disable
|
|
62
62
|
a given service. Default values depend on the platform.
|
|
63
63
|
|
|
64
|
-
If you don't specify a value for the `enable` attribute,
|
|
64
|
+
If you don't specify a value for the `enable` attribute, OpenVox leaves
|
|
65
65
|
that aspect of the service alone and your operating system determines
|
|
66
66
|
the behavior."
|
|
67
67
|
|
|
@@ -175,12 +175,12 @@ module Puppet
|
|
|
175
175
|
The init script's status command must return 0 if the service is
|
|
176
176
|
running and a nonzero value otherwise. Ideally, these exit codes
|
|
177
177
|
should conform to [the LSB's specification][lsb-exit-codes] for init
|
|
178
|
-
script status actions, but
|
|
178
|
+
script status actions, but OpenVox only considers the difference
|
|
179
179
|
between 0 and nonzero to be relevant.
|
|
180
180
|
|
|
181
181
|
If a service's init script does not support any kind of status command,
|
|
182
182
|
you should set `hasstatus` to false and either provide a specific
|
|
183
|
-
command using the `status` attribute or expect that
|
|
183
|
+
command using the `status` attribute or expect that OpenVox will look for
|
|
184
184
|
the service name in the process table. Be aware that 'virtual' init
|
|
185
185
|
scripts (like 'network' under Red Hat systems) will respond poorly to
|
|
186
186
|
refresh events from other resources if you override the default behavior
|
|
@@ -240,7 +240,7 @@ module Puppet
|
|
|
240
240
|
return 0 if the service is running and a nonzero value otherwise.
|
|
241
241
|
Ideally, these exit codes should conform to [the LSB's
|
|
242
242
|
specification][lsb-exit-codes] for init script status actions, but
|
|
243
|
-
|
|
243
|
+
OpenVox only considers the difference between 0 and nonzero to be
|
|
244
244
|
relevant.
|
|
245
245
|
|
|
246
246
|
If left unspecified, the status of the service will be determined
|
data/lib/puppet/type/stage.rb
CHANGED
|
@@ -4,7 +4,7 @@ Puppet::Type.newtype(:stage) do
|
|
|
4
4
|
desc "A resource type for creating new run stages. Once a stage is available,
|
|
5
5
|
classes can be assigned to it by declaring them with the resource-like syntax
|
|
6
6
|
and using
|
|
7
|
-
[the `stage` metaparameter](https://
|
|
7
|
+
[the `stage` metaparameter](https://docs.openvoxproject.org/openvox/latest/metaparameter.html#stage).
|
|
8
8
|
|
|
9
9
|
Note that new stages are not useful unless you also declare their order
|
|
10
10
|
in relation to the default `main` stage.
|
data/lib/puppet/type/user.rb
CHANGED
|
@@ -16,9 +16,9 @@ module Puppet
|
|
|
16
16
|
groups and generally uses POSIX APIs for retrieving information
|
|
17
17
|
about them. It does not directly modify `/etc/passwd` or anything.
|
|
18
18
|
|
|
19
|
-
**Autorequires:** If
|
|
19
|
+
**Autorequires:** If OpenVox is managing the user's primary group (as
|
|
20
20
|
provided in the `gid` attribute) or any group listed in the `groups`
|
|
21
|
-
attribute then the user resource will autorequire that group. If
|
|
21
|
+
attribute then the user resource will autorequire that group. If OpenVox
|
|
22
22
|
is managing any role accounts corresponding to the user's roles, the
|
|
23
23
|
user resource will autorequire those role accounts."
|
|
24
24
|
|
|
@@ -126,7 +126,7 @@ module Puppet
|
|
|
126
126
|
automatically. This will likely result in the same user having
|
|
127
127
|
different UIDs on different systems, which is not recommended. This is
|
|
128
128
|
especially noteworthy when managing the same user on both Darwin and
|
|
129
|
-
other platforms, since
|
|
129
|
+
other platforms, since OpenVox does UID generation on Darwin, but
|
|
130
130
|
the underlying tools do so on other platforms.
|
|
131
131
|
|
|
132
132
|
On Windows, this property is read-only and will return the user's
|
|
@@ -149,7 +149,7 @@ module Puppet
|
|
|
149
149
|
|
|
150
150
|
This attribute is not supported on Windows systems; use the `groups`
|
|
151
151
|
attribute instead. (On Windows, designating a primary group is only
|
|
152
|
-
meaningful for domain accounts, which
|
|
152
|
+
meaningful for domain accounts, which OpenVox does not currently manage.)"
|
|
153
153
|
|
|
154
154
|
munge do |value|
|
|
155
155
|
if value.is_a?(String) and value =~ /^[-0-9]+$/
|
|
@@ -223,26 +223,24 @@ module Puppet
|
|
|
223
223
|
encryption formats and requirements.
|
|
224
224
|
|
|
225
225
|
* Mac OS X 10.5 and 10.6, and some older Linux distributions, use salted SHA1
|
|
226
|
-
hashes. You can use
|
|
226
|
+
hashes. You can use OpenVox's built-in `sha1` function to generate a salted SHA1
|
|
227
227
|
hash from a password.
|
|
228
228
|
* Mac OS X 10.7 (Lion), and many recent Linux distributions, use salted SHA512
|
|
229
|
-
hashes. The
|
|
229
|
+
hashes. The puppetlabs [stdlib](https://forge.puppet.com/modules/puppetlabs/stdlib) module contains a `str2saltedsha512` function
|
|
230
230
|
which can generate password hashes for these operating systems.
|
|
231
231
|
* OS X 10.8 and higher use salted SHA512 PBKDF2 hashes. When managing passwords
|
|
232
232
|
on these systems, the `salt` and `iterations` attributes need to be specified as
|
|
233
233
|
well as the password.
|
|
234
|
-
* macOS 10.15 and later require the salt to be 32 bytes. Because
|
|
234
|
+
* macOS 10.15 and later require the salt to be 32 bytes. Because OpenVox's user
|
|
235
235
|
resource requires the value to be hex encoded, the length of the salt's
|
|
236
236
|
string must be 64.
|
|
237
237
|
* Windows passwords can be managed only in cleartext, because there is no Windows
|
|
238
238
|
API for setting the password hash.
|
|
239
239
|
|
|
240
|
-
[stdlib]: https://github.com/puppetlabs/puppetlabs-stdlib/
|
|
241
|
-
|
|
242
240
|
Enclose any value that includes a dollar sign ($) in single quotes (') to avoid
|
|
243
241
|
accidental variable interpolation.
|
|
244
242
|
|
|
245
|
-
To redact passwords from reports to
|
|
243
|
+
To redact passwords from reports to OpenVoxDB, use the `Sensitive` data type. For
|
|
246
244
|
example, this resource protects the password:
|
|
247
245
|
|
|
248
246
|
```puppet
|
|
@@ -388,18 +386,18 @@ module Puppet
|
|
|
388
386
|
it is advisable to restrict names to the lowest common denominator,
|
|
389
387
|
which is a maximum of 8 characters beginning with a letter.
|
|
390
388
|
|
|
391
|
-
Note that
|
|
389
|
+
Note that OpenVox considers user names to be case-sensitive, regardless
|
|
392
390
|
of the platform's own rules; be sure to always use the same case when
|
|
393
391
|
referring to a given user."
|
|
394
392
|
isnamevar
|
|
395
393
|
end
|
|
396
394
|
|
|
397
395
|
newparam(:membership) do
|
|
398
|
-
desc "If `minimum` is specified,
|
|
396
|
+
desc "If `minimum` is specified, OpenVox will ensure that the user is a
|
|
399
397
|
member of all specified groups, but will not remove any other groups
|
|
400
398
|
that the user is a part of.
|
|
401
399
|
|
|
402
|
-
If `inclusive` is specified,
|
|
400
|
+
If `inclusive` is specified, OpenVox will ensure that the user is a
|
|
403
401
|
member of **only** specified groups."
|
|
404
402
|
|
|
405
403
|
newvalues(:inclusive, :minimum)
|
|
@@ -423,14 +421,14 @@ module Puppet
|
|
|
423
421
|
end
|
|
424
422
|
|
|
425
423
|
newparam(:managehome, :boolean => true, :parent => Puppet::Parameter::Boolean) do
|
|
426
|
-
desc "Whether to manage the home directory when
|
|
427
|
-
This creates the home directory if
|
|
428
|
-
home directory if
|
|
429
|
-
|
|
430
|
-
This parameter has no effect unless
|
|
431
|
-
resource at the same time. For instance,
|
|
432
|
-
user if `ensure => present` and the user does not exist at the time of the
|
|
433
|
-
If the home directory is then deleted manually,
|
|
424
|
+
desc "Whether to manage the home directory when OpenVox creates or removes the user.
|
|
425
|
+
This creates the home directory if OpenVox also creates the user account, and deletes the
|
|
426
|
+
home directory if OpenVox also removes the user account.
|
|
427
|
+
|
|
428
|
+
This parameter has no effect unless OpenVox is also creating or removing the user in the
|
|
429
|
+
resource at the same time. For instance, OpenVox creates a home directory for a managed
|
|
430
|
+
user if `ensure => present` and the user does not exist at the time of the OpenVox run.
|
|
431
|
+
If the home directory is then deleted manually, OpenVox will not recreate it on the next
|
|
434
432
|
run.
|
|
435
433
|
|
|
436
434
|
Note that on Windows, this manages creation/deletion of the user profile instead of the
|
data/lib/puppet/type/whit.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
Puppet::Type.newtype(:whit) do
|
|
4
|
-
desc "Whits are internal artifacts of
|
|
5
|
-
|
|
4
|
+
desc "Whits are internal artifacts of OpenVox's current implementation, and
|
|
5
|
+
OpenVox suppresses their appearance in all logs. We make no guarantee of
|
|
6
6
|
the whit's continued existence, and it should never be used in an actual
|
|
7
7
|
manifest. Use the `anchor` type from the puppetlabs-stdlib module if you
|
|
8
8
|
need arbitrary whit-like no-op resources."
|
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
|