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
|
@@ -58,7 +58,7 @@ class Puppet::Transaction::Report
|
|
|
58
58
|
# The id of the job responsible for this run.
|
|
59
59
|
attr_accessor :job_id
|
|
60
60
|
|
|
61
|
-
# A
|
|
61
|
+
# A server generated catalog uuid, useful for connecting a single catalog to multiple reports.
|
|
62
62
|
attr_accessor :catalog_uuid
|
|
63
63
|
|
|
64
64
|
# Whether a cached catalog was used in the run, and if so, the reason that it was used.
|
|
@@ -111,13 +111,13 @@ class Puppet::Transaction::Report
|
|
|
111
111
|
#
|
|
112
112
|
attr_reader :status
|
|
113
113
|
|
|
114
|
-
# @return [String] The
|
|
114
|
+
# @return [String] The OpenVox version in String form.
|
|
115
115
|
# @see Puppet::version()
|
|
116
116
|
#
|
|
117
117
|
attr_reader :puppet_version
|
|
118
118
|
|
|
119
119
|
# @return [Integer] report format version number. This value is constant for
|
|
120
|
-
# a given version of
|
|
120
|
+
# a given version of OpenVox; it is incremented when a new release of OpenVox
|
|
121
121
|
# changes the API for the various objects that make up a report.
|
|
122
122
|
#
|
|
123
123
|
attr_reader :report_format
|
data/lib/puppet/transaction.rb
CHANGED
|
@@ -5,7 +5,6 @@ require_relative '../puppet/util/tagging'
|
|
|
5
5
|
require_relative '../puppet/util/skip_tags'
|
|
6
6
|
require_relative '../puppet/application'
|
|
7
7
|
require 'digest/sha1'
|
|
8
|
-
require 'set' # rubocop:disable Lint/RedundantRequireStatement
|
|
9
8
|
|
|
10
9
|
# the class that actually walks our resource/property tree, collects the changes,
|
|
11
10
|
# and performs them
|
data/lib/puppet/type/exec.rb
CHANGED
|
@@ -13,11 +13,11 @@ module Puppet
|
|
|
13
13
|
|
|
14
14
|
* The command itself is already idempotent. (For example, `apt-get update`.)
|
|
15
15
|
* The exec has an `onlyif`, `unless`, or `creates` attribute, which prevents
|
|
16
|
-
|
|
16
|
+
OpenVox from running the command unless some condition is met. The
|
|
17
17
|
`onlyif` and `unless` commands of an `exec` are used in the process of
|
|
18
18
|
determining whether the `exec` is already in sync, therefore they must be run
|
|
19
|
-
during a noop
|
|
20
|
-
* The exec has `refreshonly => true`, which allows
|
|
19
|
+
during a noop OpenVox run.
|
|
20
|
+
* The exec has `refreshonly => true`, which allows OpenVox to run the
|
|
21
21
|
command only when some other resource is changed. (See the notes on refreshing
|
|
22
22
|
below.)
|
|
23
23
|
|
|
@@ -40,7 +40,7 @@ module Puppet
|
|
|
40
40
|
consider developing a custom resource type instead, as it is much
|
|
41
41
|
more predictable and maintainable.
|
|
42
42
|
|
|
43
|
-
**Duplication:** Even though `command` is the namevar,
|
|
43
|
+
**Duplication:** Even though `command` is the namevar, OpenVox allows
|
|
44
44
|
multiple `exec` resources with the same `command` value.
|
|
45
45
|
|
|
46
46
|
**Refresh:** `exec` resources can respond to refresh events (via
|
|
@@ -65,9 +65,9 @@ module Puppet
|
|
|
65
65
|
In short: If there's a possibility of your exec receiving refresh events,
|
|
66
66
|
it is extremely important to make sure the run conditions are restricted.
|
|
67
67
|
|
|
68
|
-
**Autorequires:** If
|
|
68
|
+
**Autorequires:** If OpenVox is managing an exec's cwd or the executable
|
|
69
69
|
file used in an exec's command, the exec resource autorequires those
|
|
70
|
-
files. If
|
|
70
|
+
files. If OpenVox is managing the user that an exec should run as, the
|
|
71
71
|
exec resource autorequires that user."
|
|
72
72
|
|
|
73
73
|
# Create a new check mechanism. It's basically a parameter that
|
|
@@ -109,13 +109,13 @@ module Puppet
|
|
|
109
109
|
both the cmd.exe shell and the .NET runtime cast them to signed
|
|
110
110
|
integers. This means some tools will report negative numbers for exit
|
|
111
111
|
codes above 2147483647. (For example, cmd.exe reports 4294967295 as -1.)
|
|
112
|
-
Since
|
|
112
|
+
Since OpenVox uses the plain Win32 APIs, it will report the very large
|
|
113
113
|
number instead of the negative number, which might not be what you
|
|
114
114
|
expect if you got the exit code from a cmd.exe session.
|
|
115
115
|
|
|
116
116
|
Microsoft recommends against using negative/very large exit codes, and
|
|
117
117
|
you should avoid them when possible. To convert a negative exit code to
|
|
118
|
-
the positive one
|
|
118
|
+
the positive one OpenVox will use, add it to 4294967296."
|
|
119
119
|
|
|
120
120
|
# Make output a bit prettier
|
|
121
121
|
def change_to_s(currentvalue, newvalue)
|
|
@@ -202,11 +202,11 @@ module Puppet
|
|
|
202
202
|
(meaning its return code does not match the specified code) then
|
|
203
203
|
any output is logged at the `err` log level.
|
|
204
204
|
|
|
205
|
-
Multiple `exec` resources can use the same `command` value;
|
|
205
|
+
Multiple `exec` resources can use the same `command` value; OpenVox
|
|
206
206
|
only uses the resource title to ensure `exec`s are unique.
|
|
207
207
|
|
|
208
208
|
On *nix platforms, the command can be specified as an array of
|
|
209
|
-
strings and
|
|
209
|
+
strings and OpenVox will invoke it using the more secure method of
|
|
210
210
|
parameterized system calls. For example, rather than executing the
|
|
211
211
|
malicious injected code, this command will echo it out:
|
|
212
212
|
|
|
@@ -236,10 +236,10 @@ module Puppet
|
|
|
236
236
|
newparam(:user) do
|
|
237
237
|
desc "The user to run the command as.
|
|
238
238
|
|
|
239
|
-
> **Note:**
|
|
239
|
+
> **Note:** OpenVox cannot execute commands as other users on Windows.
|
|
240
240
|
|
|
241
241
|
Note that if you use this attribute, any error output is not captured
|
|
242
|
-
due to a bug within Ruby. If you use
|
|
242
|
+
due to a bug within Ruby. If you use OpenVox to create this user, the
|
|
243
243
|
exec automatically requires the user, as long as it is specified by
|
|
244
244
|
name.
|
|
245
245
|
|
|
@@ -258,7 +258,7 @@ module Puppet
|
|
|
258
258
|
newparam(:group) do
|
|
259
259
|
desc "The group to run the command as. This seems to work quite
|
|
260
260
|
haphazardly on different platforms -- it is a platform issue
|
|
261
|
-
not a Ruby or
|
|
261
|
+
not a Ruby or OpenVox one, since the same variety exists when
|
|
262
262
|
running commands as different users in the shell."
|
|
263
263
|
# Validation is handled by the SUIDManager class.
|
|
264
264
|
end
|
|
@@ -282,7 +282,7 @@ module Puppet
|
|
|
282
282
|
|
|
283
283
|
newparam(:refresh) do
|
|
284
284
|
desc "An alternate command to run when the `exec` receives a refresh event
|
|
285
|
-
from another resource. By default,
|
|
285
|
+
from another resource. By default, OpenVox runs the main command again.
|
|
286
286
|
For more details, see the notes about refresh behavior above, in the
|
|
287
287
|
description for this resource type.
|
|
288
288
|
|
|
@@ -422,7 +422,7 @@ module Puppet
|
|
|
422
422
|
A file to look for before running the command. The command will
|
|
423
423
|
only run if the file **doesn't exist.**
|
|
424
424
|
|
|
425
|
-
This parameter doesn't cause
|
|
425
|
+
This parameter doesn't cause OpenVox to create a file; it is only
|
|
426
426
|
useful if **the command itself** creates a file.
|
|
427
427
|
|
|
428
428
|
exec { 'tar -xf /Volumes/nfs02/important.tar':
|
|
@@ -435,7 +435,7 @@ module Puppet
|
|
|
435
435
|
`important.tar`. If it is ever deleted, the exec will bring it
|
|
436
436
|
back by re-extracting the tarball. If `important.tar` does **not**
|
|
437
437
|
actually contain `myfile`, the exec will keep running every time
|
|
438
|
-
|
|
438
|
+
OpenVox runs.
|
|
439
439
|
|
|
440
440
|
This parameter can also take an array of files, and the command will
|
|
441
441
|
not run if **any** of these files exist. Consider this example:
|
|
@@ -459,7 +459,7 @@ module Puppet
|
|
|
459
459
|
newcheck(:unless) do
|
|
460
460
|
desc <<-'EOT'
|
|
461
461
|
A test command that checks the state of the target system and restricts
|
|
462
|
-
when the `exec` can run. If present,
|
|
462
|
+
when the `exec` can run. If present, OpenVox runs this test command
|
|
463
463
|
first, then runs the main command unless the test has an exit code of 0
|
|
464
464
|
(success). For example:
|
|
465
465
|
|
|
@@ -476,7 +476,7 @@ module Puppet
|
|
|
476
476
|
must fully qualify the command's name.
|
|
477
477
|
|
|
478
478
|
Since this command is used in the process of determining whether the
|
|
479
|
-
`exec` is already in sync, it must be run during a noop
|
|
479
|
+
`exec` is already in sync, it must be run during a noop OpenVox run.
|
|
480
480
|
|
|
481
481
|
This parameter can also take an array of commands. For example:
|
|
482
482
|
|
|
@@ -522,7 +522,7 @@ module Puppet
|
|
|
522
522
|
newcheck(:onlyif) do
|
|
523
523
|
desc <<-'EOT'
|
|
524
524
|
A test command that checks the state of the target system and restricts
|
|
525
|
-
when the `exec` can run. If present,
|
|
525
|
+
when the `exec` can run. If present, OpenVox runs this test command
|
|
526
526
|
first, and only runs the main command if the test has an exit code of 0
|
|
527
527
|
(success). For example:
|
|
528
528
|
|
|
@@ -539,7 +539,7 @@ module Puppet
|
|
|
539
539
|
must fully qualify the command's name.
|
|
540
540
|
|
|
541
541
|
Since this command is used in the process of determining whether the
|
|
542
|
-
`exec` is already in sync, it must be run during a noop
|
|
542
|
+
`exec` is already in sync, it must be run during a noop OpenVox run.
|
|
543
543
|
|
|
544
544
|
This parameter can also take an array of commands. For example:
|
|
545
545
|
|
|
@@ -37,8 +37,8 @@ module Puppet
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
...but for larger files, this attribute is more useful when combined with the
|
|
40
|
-
[template](https://
|
|
41
|
-
or [file](https://
|
|
40
|
+
[template](https://docs.openvoxproject.org/openvox/latest/function.html#template)
|
|
41
|
+
or [file](https://docs.openvoxproject.org/openvox/latest/function.html#file)
|
|
42
42
|
function.
|
|
43
43
|
EOT
|
|
44
44
|
|
|
@@ -47,24 +47,14 @@ module Puppet
|
|
|
47
47
|
munge do |value|
|
|
48
48
|
if value == :absent
|
|
49
49
|
value
|
|
50
|
-
elsif value.is_a?(String) && checksum?(value)
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
|
|
54
|
-
# TRANSLATORS "content" is an attribute and should not be translated
|
|
55
|
-
_('Using a checksum in a file\'s "content" property is deprecated.'),
|
|
56
|
-
# TRANSLATORS "filebucket" is a resource type and should not be translated. The quoted occurrence of "content" is an attribute and should not be translated.
|
|
57
|
-
_('The ability to use a checksum to retrieve content from the filebucket using the "content" property will be removed in a future release.'),
|
|
58
|
-
# TRANSLATORS "content" is an attribute and should not be translated.
|
|
59
|
-
_('The literal value of the "content" property will be written to the file.'),
|
|
60
|
-
# TRANSLATORS "static catalogs" should not be translated.
|
|
61
|
-
_('The checksum retrieval functionality is being replaced by the use of static catalogs.'),
|
|
62
|
-
_('See https://puppet.com/docs/puppet/latest/static_catalogs.html for more information.')
|
|
63
|
-
].join(" "),
|
|
64
|
-
:file => @resource.file,
|
|
65
|
-
:line => @resource.line) if !@actual_content && !resource.parameter(:source)
|
|
50
|
+
elsif value.is_a?(String) && checksum?(value) && (@actual_content || resource.parameter(:source))
|
|
51
|
+
# The actual content is already known, either because it was
|
|
52
|
+
# previously set or because it comes from a source, and the value is
|
|
53
|
+
# its checksum.
|
|
66
54
|
value
|
|
67
55
|
else
|
|
56
|
+
# The value is the desired file content, even if it happens to look
|
|
57
|
+
# like a checksum.
|
|
68
58
|
@actual_content = value.is_a?(Puppet::Pops::Types::PBinaryType::Binary) ? value.binary_buffer : value
|
|
69
59
|
resource.parameter(:checksum).sum(@actual_content)
|
|
70
60
|
end
|
|
@@ -150,31 +140,14 @@ module Puppet
|
|
|
150
140
|
|
|
151
141
|
private
|
|
152
142
|
|
|
153
|
-
#
|
|
154
|
-
#
|
|
143
|
+
# actual_content is only nil when the munged value is a checksum of
|
|
144
|
+
# content that comes from a source
|
|
155
145
|
def each_chunk_from
|
|
156
146
|
if actual_content.is_a?(String)
|
|
157
147
|
yield actual_content
|
|
158
|
-
elsif content_is_really_a_checksum? && actual_content.nil?
|
|
159
|
-
yield read_file_from_filebucket
|
|
160
148
|
elsif actual_content.nil?
|
|
161
149
|
yield ''
|
|
162
150
|
end
|
|
163
151
|
end
|
|
164
|
-
|
|
165
|
-
def content_is_really_a_checksum?
|
|
166
|
-
checksum?(should)
|
|
167
|
-
end
|
|
168
|
-
|
|
169
|
-
def read_file_from_filebucket
|
|
170
|
-
dipper = resource.bucket
|
|
171
|
-
raise "Could not get filebucket from file" unless dipper
|
|
172
|
-
|
|
173
|
-
sum = should.sub(/\{\w+\}/, '')
|
|
174
|
-
|
|
175
|
-
dipper.getfile(sum)
|
|
176
|
-
rescue => detail
|
|
177
|
-
self.fail Puppet::Error, "Could not retrieve content for #{should} from filebucket: #{detail}", detail
|
|
178
|
-
end
|
|
179
152
|
end
|
|
180
153
|
end
|
|
@@ -21,14 +21,14 @@ module Puppet
|
|
|
21
21
|
* `link` ensures the file is a symlink, and **requires** that you also
|
|
22
22
|
set the `target` attribute. Symlinks are supported on all Posix
|
|
23
23
|
systems and on Windows Vista / 2008 and higher. On Windows, managing
|
|
24
|
-
symlinks requires
|
|
24
|
+
symlinks requires the OpenVox agent's user account to have the "Create
|
|
25
25
|
Symbolic Links" privilege; this can be configured in the "User Rights
|
|
26
|
-
Assignment" section in the Windows policy editor. By default,
|
|
26
|
+
Assignment" section in the Windows policy editor. By default, the OpenVox
|
|
27
27
|
agent runs as the Administrator account, which has this privilege.
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
OpenVox avoids destroying directories unless the `force` attribute is set
|
|
30
30
|
to `true`. This means that if a file is currently a directory, setting
|
|
31
|
-
`ensure` to anything but `directory` or `present` will cause
|
|
31
|
+
`ensure` to anything but `directory` or `present` will cause OpenVox to
|
|
32
32
|
skip managing the resource and log either a notice or an error.
|
|
33
33
|
|
|
34
34
|
There is one other non-standard value for `ensure`. If you specify the
|
|
@@ -14,7 +14,7 @@ module Puppet
|
|
|
14
14
|
notation. This value **must** be specified as a string; do not use
|
|
15
15
|
un-quoted numbers to represent file modes.
|
|
16
16
|
|
|
17
|
-
If the mode is omitted (or explicitly set to `undef`),
|
|
17
|
+
If the mode is omitted (or explicitly set to `undef`), OpenVox does not
|
|
18
18
|
enforce permissions on existing files and creates new files with
|
|
19
19
|
permissions of `0644`.
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ module Puppet
|
|
|
22
22
|
them to equivalent permissions for systems which represent permissions
|
|
23
23
|
differently, including Windows. For detailed ACL controls on Windows,
|
|
24
24
|
you can leave `mode` unmanaged and use
|
|
25
|
-
[the puppetlabs/acl module.](https://forge.
|
|
25
|
+
[the puppetlabs/acl module.](https://forge.puppet.com/puppetlabs/acl)
|
|
26
26
|
|
|
27
27
|
Numeric modes should use the standard octal notation of
|
|
28
28
|
`<SETUID/SETGID/STICKY><OWNER><GROUP><OTHER>` (for example, "0644").
|
|
@@ -32,10 +32,10 @@ module Puppet
|
|
|
32
32
|
execute/search = 1.
|
|
33
33
|
* The setuid/setgid/sticky digit is also a sum, where setuid = 4, setgid = 2,
|
|
34
34
|
and sticky = 1.
|
|
35
|
-
* The setuid/setgid/sticky digit is optional. If it is absent,
|
|
35
|
+
* The setuid/setgid/sticky digit is optional. If it is absent, OpenVox will
|
|
36
36
|
clear any existing setuid/setgid/sticky permissions. (So to make your intent
|
|
37
37
|
clear, you should use at least four digits for numeric modes.)
|
|
38
|
-
* When specifying numeric permissions for directories,
|
|
38
|
+
* When specifying numeric permissions for directories, OpenVox sets the search
|
|
39
39
|
permission wherever the read permission is set.
|
|
40
40
|
|
|
41
41
|
Symbolic modes should be represented as a string of comma-separated
|
|
@@ -86,10 +86,10 @@ module Puppet
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
Puppet::Type.type(:file).newparam(:selinux_ignore_defaults) do
|
|
89
|
-
desc "If this is set,
|
|
89
|
+
desc "If this is set, OpenVox will not call the SELinux function selabel_lookup to
|
|
90
90
|
supply defaults for the SELinux attributes (seluser, selrole,
|
|
91
91
|
seltype, and selrange). In general, you should leave this set at its
|
|
92
|
-
default and only set it to true when you need
|
|
92
|
+
default and only set it to true when you need OpenVox to not try to fix
|
|
93
93
|
SELinux labels automatically."
|
|
94
94
|
newvalues(:true, :false)
|
|
95
95
|
|
|
@@ -20,7 +20,7 @@ module Puppet
|
|
|
20
20
|
attribute is mutually exclusive with `content` and `target`. Allowed
|
|
21
21
|
values are:
|
|
22
22
|
|
|
23
|
-
* `puppet:` URIs, which point to files in modules or
|
|
23
|
+
* `puppet:` URIs, which point to files in modules or OpenVox file server
|
|
24
24
|
mount points.
|
|
25
25
|
* Fully qualified paths to locally available files (including files on NFS
|
|
26
26
|
shares or Windows mapped drives).
|
|
@@ -31,8 +31,8 @@ module Puppet
|
|
|
31
31
|
|
|
32
32
|
`puppet:///modules/<MODULE NAME>/<FILE PATH>`
|
|
33
33
|
|
|
34
|
-
This will fetch a file from a module on the
|
|
35
|
-
local module when using
|
|
34
|
+
This will fetch a file from a module on the OpenVox server (or from a
|
|
35
|
+
local module when using puppet apply). Given a `modulepath` of
|
|
36
36
|
`/etc/puppetlabs/code/modules`, the example above would resolve to
|
|
37
37
|
`/etc/puppetlabs/code/modules/<MODULE NAME>/files/<FILE PATH>`.
|
|
38
38
|
|
|
@@ -46,28 +46,28 @@ module Puppet
|
|
|
46
46
|
because HTTP servers do not transfer any metadata that translates to
|
|
47
47
|
ownership or permission details.
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
OpenVox determines if file content is synchronized by computing a checksum
|
|
50
50
|
for the local file and comparing it against the `checksum_value`
|
|
51
51
|
parameter. If the `checksum_value` parameter is not specified for
|
|
52
|
-
`puppet` and `file` sources,
|
|
53
|
-
`Puppet[:digest_algorithm]`. For `http(s)` sources,
|
|
52
|
+
`puppet` and `file` sources, OpenVox computes a checksum based on its
|
|
53
|
+
`Puppet[:digest_algorithm]`. For `http(s)` sources, OpenVox uses the
|
|
54
54
|
first HTTP header it recognizes out of the following list:
|
|
55
55
|
`X-Checksum-Sha256`, `X-Checksum-Sha1`, `X-Checksum-Md5` or `Content-MD5`.
|
|
56
|
-
If the server response does not include one of these headers,
|
|
57
|
-
defaults to using the `Last-Modified` header.
|
|
56
|
+
If the server response does not include one of these headers, OpenVox
|
|
57
|
+
defaults to using the `Last-Modified` header. OpenVox updates the local
|
|
58
58
|
file if the header is newer than the modified time (mtime) of the local
|
|
59
59
|
file.
|
|
60
60
|
|
|
61
|
-
_HTTP_ URIs can include a user information component so that
|
|
61
|
+
_HTTP_ URIs can include a user information component so that OpenVox can
|
|
62
62
|
retrieve file metadata and content from HTTP servers that require HTTP Basic
|
|
63
63
|
authentication. For example `https://<user>:<pass>@<server>:<port>/path/to/file.`
|
|
64
64
|
|
|
65
|
-
When connecting to _HTTPS_ servers,
|
|
66
|
-
puppet-agent certificate bundle and the
|
|
65
|
+
When connecting to _HTTPS_ servers, OpenVox trusts CA certificates in the
|
|
66
|
+
puppet-agent certificate bundle and the OpenVox CA. You can configure OpenVox
|
|
67
67
|
to trust additional CA certificates using the `Puppet[:ssl_trust_store]`
|
|
68
68
|
setting.
|
|
69
69
|
|
|
70
|
-
Multiple `source` values can be specified as an array, and
|
|
70
|
+
Multiple `source` values can be specified as an array, and OpenVox will
|
|
71
71
|
use the first source that exists. This can be used to serve different
|
|
72
72
|
files to different system types:
|
|
73
73
|
|
|
@@ -323,9 +323,9 @@ module Puppet
|
|
|
323
323
|
|
|
324
324
|
def chunk_file_from_source(&block)
|
|
325
325
|
if uri.scheme =~ /^https?/
|
|
326
|
-
# Historically
|
|
326
|
+
# Historically OpenVox has not encoded the http(s) source URL before parsing
|
|
327
327
|
# it, for example, if the path contains spaces, then it must be URL encoded
|
|
328
|
-
# as %20 in the manifest.
|
|
328
|
+
# as %20 in the manifest. OpenVox behaves the same when retrieving file
|
|
329
329
|
# metadata via http(s), see Puppet::Indirector::FileMetadata::Http#find.
|
|
330
330
|
url = URI.parse(metadata.source)
|
|
331
331
|
get_from_http_source(url, &block)
|
|
@@ -347,7 +347,7 @@ module Puppet
|
|
|
347
347
|
|
|
348
348
|
Puppet::Type.type(:file).newparam(:source_permissions) do
|
|
349
349
|
desc <<-'EOT'
|
|
350
|
-
Whether (and how)
|
|
350
|
+
Whether (and how) OpenVox should copy owner, group, and mode permissions from
|
|
351
351
|
the `source` to `file` resources when the permissions are not explicitly
|
|
352
352
|
specified. (In all cases, explicit permissions will take precedence.)
|
|
353
353
|
Valid values are `use`, `use_when_creating`, and `ignore`:
|
|
@@ -355,10 +355,10 @@ module Puppet
|
|
|
355
355
|
* `ignore` (the default) will never apply the owner, group, or mode from
|
|
356
356
|
the `source` when managing a file. When creating new files without explicit
|
|
357
357
|
permissions, the permissions they receive will depend on platform-specific
|
|
358
|
-
behavior. On POSIX,
|
|
359
|
-
On Windows,
|
|
358
|
+
behavior. On POSIX, OpenVox will use the umask of the user it is running as.
|
|
359
|
+
On Windows, OpenVox will use the default DACL associated with the user it is
|
|
360
360
|
running as.
|
|
361
|
-
* `use` will cause
|
|
361
|
+
* `use` will cause OpenVox to apply the owner, group,
|
|
362
362
|
and mode from the `source` to any files it is managing.
|
|
363
363
|
* `use_when_creating` will only apply the owner, group, and mode from the
|
|
364
364
|
`source` when creating a file; existing files will not have their permissions
|
data/lib/puppet/type/file.rb
CHANGED
|
@@ -27,11 +27,11 @@ Puppet::Type.newtype(:file) do
|
|
|
27
27
|
downloaded from a remote source using the `source` attribute; the latter
|
|
28
28
|
can also be used to recursively serve directories (when the `recurse`
|
|
29
29
|
attribute is set to `true` or `local`). On Windows, note that file
|
|
30
|
-
contents are managed in binary mode;
|
|
30
|
+
contents are managed in binary mode; OpenVox never automatically translates
|
|
31
31
|
line endings.
|
|
32
32
|
|
|
33
|
-
**Autorequires:** If
|
|
34
|
-
file, the file resource will autorequire them. If
|
|
33
|
+
**Autorequires:** If OpenVox is managing the user or group that owns a
|
|
34
|
+
file, the file resource will autorequire them. If OpenVox is managing any
|
|
35
35
|
parent directories of a file, the file resource autorequires them.
|
|
36
36
|
|
|
37
37
|
Warning: Enabling `recurse` on directories containing large numbers of
|
|
@@ -80,11 +80,11 @@ Puppet::Type.newtype(:file) do
|
|
|
80
80
|
(`File { backup => main }`), so it can affect all file resources.
|
|
81
81
|
|
|
82
82
|
* If set to `false`, file content won't be backed up.
|
|
83
|
-
* If set to a string beginning with `.`, such as `.puppet-bak`,
|
|
83
|
+
* If set to a string beginning with `.`, such as `.puppet-bak`, OpenVox will
|
|
84
84
|
use copy the file in the same directory with that value as the extension
|
|
85
85
|
of the backup. (A value of `true` is a synonym for `.puppet-bak`.)
|
|
86
|
-
* If set to any other string,
|
|
87
|
-
with that title.
|
|
86
|
+
* If set to any other string, OpenVox will try to back up to a filebucket
|
|
87
|
+
with that title. OpenVox automatically creates a **local** filebucket
|
|
88
88
|
named `puppet` if one doesn't already exist. See the `filebucket` resource
|
|
89
89
|
type for more details.
|
|
90
90
|
|
|
@@ -92,18 +92,25 @@ Puppet::Type.newtype(:file) do
|
|
|
92
92
|
|
|
93
93
|
Backing up to a local filebucket isn't particularly useful. If you want
|
|
94
94
|
to make organized use of backups, you will generally want to use the
|
|
95
|
-
primary
|
|
95
|
+
primary OpenVox server's filebucket service. This requires declaring a
|
|
96
96
|
filebucket resource and a resource default for the `backup` attribute
|
|
97
97
|
in site.pp:
|
|
98
98
|
|
|
99
99
|
# /etc/puppetlabs/puppet/manifests/site.pp
|
|
100
100
|
filebucket { 'main':
|
|
101
101
|
path => false, # This is required for remote filebuckets.
|
|
102
|
-
server => 'puppet.example.com', # Optional; defaults to the configured primary
|
|
102
|
+
server => 'puppet.example.com', # Optional; defaults to the configured primary OpenVox server.
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
File { backup => main, }
|
|
106
106
|
|
|
107
|
+
> **Note**: A central filebucket is shared by every node that backs up to it,
|
|
108
|
+
and stored content is addressed only by checksum, with no record of which
|
|
109
|
+
node submitted it. Treat anything backed up there as readable by every
|
|
110
|
+
certificate the server's `auth.conf` allows to reach the `file_bucket_file`
|
|
111
|
+
endpoint, and avoid pointing `backup` at a central filebucket for files whose
|
|
112
|
+
contents are sensitive. See the `filebucket` resource type for details.
|
|
113
|
+
|
|
107
114
|
If you are using multiple primary servers, you will want to
|
|
108
115
|
centralize the contents of the filebucket. Either configure your load
|
|
109
116
|
balancer to direct all filebucket traffic to a single primary server, or use
|
|
@@ -149,7 +156,7 @@ Puppet::Type.newtype(:file) do
|
|
|
149
156
|
|
|
150
157
|
* `false` --- The default behavior. The contents of the directory will not be
|
|
151
158
|
automatically managed.
|
|
152
|
-
* `remote` --- If the `source` attribute is set,
|
|
159
|
+
* `remote` --- If the `source` attribute is set, OpenVox will automatically
|
|
153
160
|
manage the contents of the source directory (or directories), ensuring
|
|
154
161
|
that equivalent files and directories exist on the target system and
|
|
155
162
|
that their contents match.
|
|
@@ -188,13 +195,13 @@ Puppet::Type.newtype(:file) do
|
|
|
188
195
|
end
|
|
189
196
|
|
|
190
197
|
newparam(:recurselimit) do
|
|
191
|
-
desc "How far
|
|
198
|
+
desc "How far OpenVox should descend into subdirectories, when using
|
|
192
199
|
`ensure => directory` and either `recurse => true` or `recurse => remote`.
|
|
193
200
|
The recursion limit affects which files will be copied from the `source`
|
|
194
201
|
directory, as well as which files can be purged when `purge => true`.
|
|
195
202
|
|
|
196
203
|
Setting `recurselimit => 0` is the same as setting `recurse => false` ---
|
|
197
|
-
|
|
204
|
+
OpenVox will manage the directory, but all of its contents will be treated
|
|
198
205
|
as unmanaged.
|
|
199
206
|
|
|
200
207
|
Setting `recurselimit => 1` will manage files and directories that are
|
|
@@ -241,7 +248,7 @@ Puppet::Type.newtype(:file) do
|
|
|
241
248
|
whose content doesn't match what the `source` or `content` attribute
|
|
242
249
|
specifies. Setting this to false allows file resources to initialize files
|
|
243
250
|
without overwriting future changes. Note that this only affects content;
|
|
244
|
-
|
|
251
|
+
OpenVox will still manage ownership and permissions."
|
|
245
252
|
defaultto :true
|
|
246
253
|
end
|
|
247
254
|
|
|
@@ -320,7 +327,7 @@ Puppet::Type.newtype(:file) do
|
|
|
320
327
|
newparam(:show_diff, :boolean => true, :parent => Puppet::Parameter::Boolean) do
|
|
321
328
|
desc "Whether to display differences when the file changes, defaulting to
|
|
322
329
|
true. This parameter is useful for files that may contain passwords or
|
|
323
|
-
other secret data, which might otherwise be included in
|
|
330
|
+
other secret data, which might otherwise be included in OpenVox reports or
|
|
324
331
|
other insecure outputs. If the global `show_diff` setting
|
|
325
332
|
is false, then no diffs will be shown even if this parameter is true."
|
|
326
333
|
|
|
@@ -353,14 +360,14 @@ Puppet::Type.newtype(:file) do
|
|
|
353
360
|
|
|
354
361
|
newparam(:validate_cmd) do
|
|
355
362
|
desc "A command for validating the file's syntax before replacing it. If
|
|
356
|
-
|
|
363
|
+
OpenVox would need to rewrite a file due to new `source` or `content`, it
|
|
357
364
|
will check the new content's validity first. If validation fails, the file
|
|
358
365
|
resource will fail.
|
|
359
366
|
|
|
360
367
|
This command must have a fully qualified path, and should contain a
|
|
361
368
|
percent (`%`) token where it would expect an input file. It must exit `0`
|
|
362
369
|
if the syntax is correct, and non-zero otherwise. The command will be
|
|
363
|
-
run on the target system while applying the catalog, not on the primary
|
|
370
|
+
run on the target system while applying the catalog, not on the primary OpenVox server.
|
|
364
371
|
|
|
365
372
|
Example:
|
|
366
373
|
|
|
@@ -6,19 +6,18 @@ module Puppet
|
|
|
6
6
|
Type.newtype(:filebucket) do
|
|
7
7
|
@doc = <<-EOT
|
|
8
8
|
A repository for storing and retrieving file content by cryptographic checksum. Can
|
|
9
|
-
be local to each agent node, or centralized on a primary
|
|
10
|
-
|
|
9
|
+
be local to each agent node, or centralized on a primary OpenVox server. All
|
|
10
|
+
OpenVox servers provide a filebucket service that agent nodes can access
|
|
11
11
|
via HTTP, but you must declare a filebucket resource before any agents
|
|
12
12
|
will do so.
|
|
13
13
|
|
|
14
14
|
Filebuckets are used for the following features:
|
|
15
15
|
|
|
16
16
|
- **Content backups.** If the `file` type's `backup` attribute is set to
|
|
17
|
-
the name of a filebucket,
|
|
17
|
+
the name of a filebucket, OpenVox will back up the _old_ content whenever
|
|
18
18
|
it rewrites a file; see the documentation for the `file` type for more
|
|
19
19
|
details. These backups can be used for manual recovery of content, but
|
|
20
|
-
are more commonly used to display changes and differences
|
|
21
|
-
Puppet Dashboard.
|
|
20
|
+
are more commonly used to display changes and differences.
|
|
22
21
|
|
|
23
22
|
To use a central filebucket for backups, you will usually want to declare
|
|
24
23
|
a filebucket resource and a resource default for the `backup` attribute
|
|
@@ -32,10 +31,25 @@ module Puppet
|
|
|
32
31
|
|
|
33
32
|
File { backup => main, }
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
OpenVox Servers automatically provide the filebucket service, so
|
|
36
35
|
this will work in a default configuration. If you have a heavily
|
|
37
|
-
restricted
|
|
36
|
+
restricted OpenVox Server `auth.conf` file, you may need to allow access to the
|
|
38
37
|
`file_bucket_file` endpoint.
|
|
38
|
+
|
|
39
|
+
> **Security note**: a central filebucket is shared by every node that backs
|
|
40
|
+
up to it. Content is addressed purely by checksum, and the service records no
|
|
41
|
+
association between stored content and the node that submitted it, so a
|
|
42
|
+
request for `/puppet/v3/file_bucket_file/<digest>/<checksum>` returns the
|
|
43
|
+
matching content to any client the server's `auth.conf` permits, regardless
|
|
44
|
+
of which node originally backed that file up. Retrieving content requires
|
|
45
|
+
knowing the checksum of the exact bytes, so this is not a general-purpose
|
|
46
|
+
read primitive, but you should treat a central filebucket as readable by
|
|
47
|
+
every certificate allowed to reach the endpoint and avoid backing up files
|
|
48
|
+
whose contents are sensitive. Since OpenVox 9 the default `auth.conf` grants
|
|
49
|
+
agents only the `HEAD` and `PUT` access they need in order to store backups,
|
|
50
|
+
and restricts `GET` to certificates carrying the `pp_cli_auth` extension. If
|
|
51
|
+
you restore remotely using some other administrative certificate, add a rule
|
|
52
|
+
of your own rather than widening the shipped one.
|
|
39
53
|
EOT
|
|
40
54
|
|
|
41
55
|
newparam(:name) do
|
|
@@ -98,7 +112,7 @@ module Puppet
|
|
|
98
112
|
def mkbucket
|
|
99
113
|
# Default is a local filebucket, if no server is given.
|
|
100
114
|
# If the default path has been removed, too, then
|
|
101
|
-
# the
|
|
115
|
+
# the OpenVox server is used as default server
|
|
102
116
|
|
|
103
117
|
type = "local"
|
|
104
118
|
args = {}
|
data/lib/puppet/type/group.rb
CHANGED
|
@@ -151,9 +151,9 @@ module Puppet
|
|
|
151
151
|
desc "Configures the behavior of the `members` parameter.
|
|
152
152
|
|
|
153
153
|
* `false` (default) --- The provided list of group members is partial,
|
|
154
|
-
and
|
|
154
|
+
and OpenVox **ignores** any members that aren't listed there.
|
|
155
155
|
* `true` --- The provided list of of group members is comprehensive, and
|
|
156
|
-
|
|
156
|
+
OpenVox **purges** any members that aren't listed there."
|
|
157
157
|
defaultto false
|
|
158
158
|
end
|
|
159
159
|
|
|
@@ -162,7 +162,7 @@ module Puppet
|
|
|
162
162
|
it is advisable to restrict names to the lowest common denominator,
|
|
163
163
|
which is a maximum of 8 characters beginning with a letter.
|
|
164
164
|
|
|
165
|
-
Note that
|
|
165
|
+
Note that OpenVox considers group names to be case-sensitive, regardless
|
|
166
166
|
of the platform's own rules; be sure to always use the same case when
|
|
167
167
|
referring to a given group."
|
|
168
168
|
isnamevar
|
|
@@ -197,10 +197,10 @@ module Puppet
|
|
|
197
197
|
newparam(:attribute_membership) do
|
|
198
198
|
desc "AIX only. Configures the behavior of the `attributes` parameter.
|
|
199
199
|
|
|
200
|
-
* `minimum` (default) --- The provided list of attributes is partial, and
|
|
200
|
+
* `minimum` (default) --- The provided list of attributes is partial, and OpenVox
|
|
201
201
|
**ignores** any attributes that aren't listed there.
|
|
202
202
|
* `inclusive` --- The provided list of attributes is comprehensive, and
|
|
203
|
-
|
|
203
|
+
OpenVox **purges** any attributes that aren't listed there."
|
|
204
204
|
|
|
205
205
|
newvalues(:inclusive, :minimum)
|
|
206
206
|
|
data/lib/puppet/type/notify.rb
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
module Puppet
|
|
7
7
|
Type.newtype(:notify) do
|
|
8
|
-
@doc = "Sends an arbitrary message, specified as a string, to the agent run-time log. It's important to note that the notify resource type is not idempotent. As a result, notifications are shown as a change on every
|
|
8
|
+
@doc = "Sends an arbitrary message, specified as a string, to the agent run-time log. It's important to note that the notify resource type is not idempotent. As a result, notifications are shown as a change on every OpenVox run."
|
|
9
9
|
|
|
10
10
|
apply_to_all
|
|
11
11
|
|