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
|
@@ -70,7 +70,7 @@ Puppet::Type.type(:user).provide :directoryservice do
|
|
|
70
70
|
# variable so you don't have to read from the system every time you need
|
|
71
71
|
# to gather the 'is' values for a resource. The downside here is that
|
|
72
72
|
# populating this instance variable for every resource on the system
|
|
73
|
-
# takes time and front-loads your
|
|
73
|
+
# takes time and front-loads your OpenVox run.
|
|
74
74
|
def self.prefetch(resources)
|
|
75
75
|
instances.each do |prov|
|
|
76
76
|
resource = resources[prov.name]
|
|
@@ -224,7 +224,7 @@ Puppet::Type.type(:user).provide :directoryservice do
|
|
|
224
224
|
when 'iterations'
|
|
225
225
|
Integer(embedded_binary_plist['SALTED-SHA512-PBKDF2'][field])
|
|
226
226
|
else
|
|
227
|
-
raise Puppet::Error, "
|
|
227
|
+
raise Puppet::Error, "OpenVox has tried to read an incorrect value from the user #{user_name} in the SALTED-SHA512-PBKDF2 hash. Acceptable fields are 'salt', 'entropy', or 'iterations'."
|
|
228
228
|
end
|
|
229
229
|
end
|
|
230
230
|
|
|
@@ -370,16 +370,16 @@ Puppet::Type.type(:user).provide :directoryservice do
|
|
|
370
370
|
# the user's plist directly. DSCL has its own caching mechanism, which
|
|
371
371
|
# means that every time we call dscl in this provider we're not directly
|
|
372
372
|
# changing values on disk (instead, those calls are cached and written
|
|
373
|
-
# to disk according to Apple's prioritization algorithms). When
|
|
373
|
+
# to disk according to Apple's prioritization algorithms). When OpenVox
|
|
374
374
|
# needs to set the password property on OS X > 10.6, the provider has to
|
|
375
375
|
# tell dscl to write its cache to disk before modifying the user's
|
|
376
376
|
# plist. The 'dscacheutil -flushcache' command does this. Another issue
|
|
377
|
-
# is how fast
|
|
377
|
+
# is how fast OpenVox makes calls to dscl and how long it takes dscl to
|
|
378
378
|
# enter those calls into its cache. We have to sleep for 2 seconds before
|
|
379
379
|
# flushing the dscl cache to allow all dscl calls to get INTO the cache
|
|
380
380
|
# first. This could be made faster (and avoid a sleep call) by finding
|
|
381
381
|
# a way to enter calls into the dscl cache faster. A sleep time of 1
|
|
382
|
-
# second would intermittently require a second
|
|
382
|
+
# second would intermittently require a second OpenVox run to set
|
|
383
383
|
# properties, so 2 seconds seems to be the minimum working value.
|
|
384
384
|
sleep 2
|
|
385
385
|
flush_dscl_cache
|
|
@@ -414,7 +414,7 @@ Puppet::Type.type(:user).provide :directoryservice do
|
|
|
414
414
|
def salt=(value)
|
|
415
415
|
if Puppet::Util::Package.versioncmp(self.class.get_os_version, '10.15') >= 0
|
|
416
416
|
if value.length != 64
|
|
417
|
-
self.fail "macOS versions 10.15 and higher require the salt to be 32-bytes. Since
|
|
417
|
+
self.fail "macOS versions 10.15 and higher require the salt to be 32-bytes. Since OpenVox's user resource requires the value to be hex encoded, the length of the salt's string must be 64. Please check your salt and try again."
|
|
418
418
|
end
|
|
419
419
|
end
|
|
420
420
|
if Puppet::Util::Package.versioncmp(self.class.get_os_version, '10.7') > 0
|
|
@@ -442,7 +442,7 @@ Puppet::Type.type(:user).provide :directoryservice do
|
|
|
442
442
|
# value from the @property_hash variable and then use the value passed as
|
|
443
443
|
# the new value. Because we're prefetching instances of the provider, it's
|
|
444
444
|
# possible that the value determined at the start of the run may be stale
|
|
445
|
-
# (i.e. someone changed the value by hand during
|
|
445
|
+
# (i.e. someone changed the value by hand during an OpenVox run) - if that's
|
|
446
446
|
# the case we rescue the error from dscl and alert the user.
|
|
447
447
|
#
|
|
448
448
|
# In the event that the user doesn't HAVE a value for the attribute, the
|
|
@@ -636,7 +636,7 @@ Puppet::Type.type(:user).provide :directoryservice do
|
|
|
636
636
|
Base64.decode64([[value].pack("H*")].pack("m").strip)
|
|
637
637
|
end
|
|
638
638
|
|
|
639
|
-
#
|
|
639
|
+
# OpenVox requires a salted-sha512 password hash for 10.7 users to be passed
|
|
640
640
|
# in Hex, but the embedded plist stores that value as a Base64 encoded
|
|
641
641
|
# string. This method converts the string and calls the
|
|
642
642
|
# set_shadow_hash_data method to serialize and write the plist to disk.
|
|
@@ -667,7 +667,7 @@ Puppet::Type.type(:user).provide :directoryservice do
|
|
|
667
667
|
when 'iterations'
|
|
668
668
|
shadow_hash_data['SALTED-SHA512-PBKDF2'][field] = Integer(value)
|
|
669
669
|
else
|
|
670
|
-
raise Puppet::Error "
|
|
670
|
+
raise Puppet::Error "OpenVox has tried to set an incorrect field for the 'SALTED-SHA512-PBKDF2' hash. Acceptable fields are 'salt', 'entropy', or 'iterations'."
|
|
671
671
|
end
|
|
672
672
|
|
|
673
673
|
# on 10.8, this field *must* contain 8 stars, or authentication will
|
|
@@ -70,7 +70,7 @@ Puppet::Type.type(:user).provide :pw, :parent => Puppet::Provider::NameService::
|
|
|
70
70
|
# use pw to update password hash
|
|
71
71
|
def password=(cryptopw)
|
|
72
72
|
Puppet.debug "change password for user '#{@resource[:name]}' method called with hash [redacted]"
|
|
73
|
-
stdin, _, _ = Open3.popen3(
|
|
73
|
+
stdin, _, _ = Open3.popen3('pw', 'user', 'mod', @resource[:name], '-H', '0')
|
|
74
74
|
stdin.puts(cryptopw)
|
|
75
75
|
stdin.close
|
|
76
76
|
Puppet.debug "finished password for user '#{@resource[:name]}' method called with hash [redacted]"
|
|
@@ -79,7 +79,7 @@ Puppet::Type.type(:user).provide :pw, :parent => Puppet::Provider::NameService::
|
|
|
79
79
|
# get password from /etc/master.passwd
|
|
80
80
|
def password
|
|
81
81
|
Puppet.debug "checking password for user '#{@resource[:name]}' method called"
|
|
82
|
-
current_passline =
|
|
82
|
+
current_passline, _ = Open3.capture2('getent', 'passwd', @resource[:name])
|
|
83
83
|
current_password = current_passline.chomp.split(':')[1] if current_passline
|
|
84
84
|
Puppet.debug "finished password for user '#{@resource[:name]}' method called : [redacted]"
|
|
85
85
|
current_password
|
|
@@ -94,7 +94,7 @@ Puppet::Type.type(:user).provide :pw, :parent => Puppet::Provider::NameService::
|
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
97
|
-
# Get expiry from system and convert to
|
|
97
|
+
# Get expiry from system and convert to OpenVox-style date
|
|
98
98
|
def expiry
|
|
99
99
|
expiry = get(:expiry)
|
|
100
100
|
expiry = :absent if expiry == 0
|
data/lib/puppet/provider.rb
CHANGED
|
@@ -380,7 +380,7 @@ class Puppet::Provider
|
|
|
380
380
|
# @raise [Puppet::DevError] Error indicating that the method should have been implemented by subclass.
|
|
381
381
|
# @see prefetch
|
|
382
382
|
def self.instances
|
|
383
|
-
raise Puppet::DevError, _("To support listing resources of this type the '%{provider}' provider needs to implement an 'instances' class method returning the current set of resources. We recommend porting your module to the simpler Resource API instead: https://
|
|
383
|
+
raise Puppet::DevError, _("To support listing resources of this type the '%{provider}' provider needs to implement an 'instances' class method returning the current set of resources. We recommend porting your module to the simpler Resource API instead: https://github.com/puppetlabs/puppet-resource_api") % { provider: name }
|
|
384
384
|
end
|
|
385
385
|
|
|
386
386
|
# Creates getter- and setter- methods for each property supported by the resource type.
|
|
@@ -38,9 +38,9 @@ config = Puppet::Util::Reference.newreference(:configuration, :depth => 1, :doc
|
|
|
38
38
|
when 'logdir'
|
|
39
39
|
val = 'Unix/Linux: /var/log/puppetlabs/puppet -- Windows: C:\ProgramData\PuppetLabs\puppet\var\log -- Non-root user: ~/.puppetlabs/var/log'
|
|
40
40
|
when 'hiera_config'
|
|
41
|
-
val = '$confdir/hiera.yaml. However, for backwards compatibility, if a file exists at $codedir/hiera.yaml,
|
|
41
|
+
val = '$confdir/hiera.yaml. However, for backwards compatibility, if a file exists at $codedir/hiera.yaml, OpenVox uses that instead.'
|
|
42
42
|
when 'certname'
|
|
43
|
-
val = "the Host's fully qualified domain name, as determined by
|
|
43
|
+
val = "the Host's fully qualified domain name, as determined by OpenFact"
|
|
44
44
|
when 'hostname'
|
|
45
45
|
val = "(the system's fully qualified hostname)"
|
|
46
46
|
when 'domain'
|
|
@@ -67,18 +67,11 @@ config.header = <<~EOT
|
|
|
67
67
|
|
|
68
68
|
* Each of these settings can be specified in `puppet.conf` or on the
|
|
69
69
|
command line.
|
|
70
|
-
* Puppet Enterprise (PE) and open source Puppet share the configuration settings
|
|
71
|
-
documented here. However, PE defaults differ from open source defaults for some
|
|
72
|
-
settings, such as `node_terminus`, `storeconfigs`, `always_retry_plugins`,
|
|
73
|
-
`disable18n`, `environment_timeout` (when Code Manager is enabled), and the
|
|
74
|
-
Puppet Server JRuby `max-active-instances` setting. To verify PE configuration
|
|
75
|
-
defaults, check the `puppet.conf` or `pe-puppet-server.conf` file after
|
|
76
|
-
installation.
|
|
77
70
|
* When using boolean settings on the command line, use `--setting` and
|
|
78
71
|
`--no-setting` instead of `--setting (true|false)`. (Using `--setting false`
|
|
79
72
|
results in "Error: Could not parse application options: needless argument".)
|
|
80
73
|
* Settings can be interpolated as `$variables` in other settings; `$environment`
|
|
81
|
-
is special, in that
|
|
74
|
+
is special, in that OpenVox Server will interpolate each agent node's
|
|
82
75
|
environment instead of its own.
|
|
83
76
|
* Multiple values should be specified as comma-separated lists; multiple
|
|
84
77
|
directories should be separated with the system path separator (usually
|
|
@@ -90,16 +83,16 @@ config.header = <<~EOT
|
|
|
90
83
|
'3600' which is equivalent to '1h' (one hour), and '1825d' which is equivalent
|
|
91
84
|
to '5y' (5 years).
|
|
92
85
|
* If you use the `splay` setting, note that the period that it waits changes
|
|
93
|
-
each time the
|
|
86
|
+
each time the OpenVox agent is restarted.
|
|
94
87
|
* Settings that take a single file or directory can optionally set the owner,
|
|
95
88
|
group, and mode for their value: `rundir = $vardir/run { owner = puppet,
|
|
96
89
|
group = puppet, mode = 644 }`
|
|
97
|
-
* The
|
|
90
|
+
* The OpenVox executables ignores any setting that isn't relevant to
|
|
98
91
|
their function.
|
|
99
92
|
|
|
100
93
|
See the [configuration guide][confguide] for more details.
|
|
101
94
|
|
|
102
|
-
[confguide]: https://
|
|
95
|
+
[confguide]: https://docs.openvoxproject.org/openvox/latest/config_about_settings.html
|
|
103
96
|
|
|
104
97
|
|
|
105
98
|
EOT
|
|
@@ -4,16 +4,16 @@ function = Puppet::Util::Reference.newreference :function, :doc => "All function
|
|
|
4
4
|
Puppet::Parser::Functions.functiondocs
|
|
5
5
|
end
|
|
6
6
|
function.header = "
|
|
7
|
-
There are two types of functions in Puppet: Statements and rvalues.
|
|
7
|
+
There are two types of functions in the Puppet language: Statements and rvalues.
|
|
8
8
|
Statements stand on their own and do not return arguments; they are used for
|
|
9
9
|
performing stand-alone work like importing. Rvalues return values and can
|
|
10
10
|
only be used in a statement requiring a value, such as an assignment or a case
|
|
11
11
|
statement.
|
|
12
12
|
|
|
13
|
-
Functions execute on the
|
|
14
|
-
Hence they only have access to the commands and data available on the
|
|
13
|
+
Functions execute on the OpenVox server. They do not execute on the OpenVox agent.
|
|
14
|
+
Hence they only have access to the commands and data available on the OpenVox server
|
|
15
15
|
host.
|
|
16
16
|
|
|
17
|
-
Here are the functions available in Puppet:
|
|
17
|
+
Here are the functions available in the Puppet language:
|
|
18
18
|
|
|
19
19
|
"
|
|
@@ -36,10 +36,10 @@ reference.header = <<~HEADER
|
|
|
36
36
|
|
|
37
37
|
## About Indirection
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
OpenVox's indirector support pluggable backends (termini) for a variety of key-value stores (indirections).
|
|
40
40
|
Each indirection type corresponds to a particular Ruby class (the "Indirected Class" below) and values are instances of that class.
|
|
41
41
|
Each instance's key is available from its `name` method.
|
|
42
|
-
The termini can be local (e.g., on-disk files) or remote (e.g., using a REST interface to talk to
|
|
42
|
+
The termini can be local (e.g., on-disk files) or remote (e.g., using a REST interface to talk to an OpenVox server).
|
|
43
43
|
|
|
44
44
|
An indirector has five methods, which are mapped into HTTP verbs for the REST interface:
|
|
45
45
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
Puppet::Util::Reference.newreference :metaparameter, :doc => "All
|
|
3
|
+
Puppet::Util::Reference.newreference :metaparameter, :doc => "All OpenVox metaparameters and all their details" do
|
|
4
4
|
str = %{
|
|
5
5
|
|
|
6
6
|
Metaparameters are attributes that work with any resource type, including custom
|
|
7
7
|
types and defined types.
|
|
8
8
|
|
|
9
|
-
In general, they affect
|
|
9
|
+
In general, they affect _OpenVox's_ behavior rather than the desired state of the
|
|
10
10
|
resource. Metaparameters do things like add metadata to a resource (`alias`,
|
|
11
11
|
`tag`), set limits on when the resource should be synced (`require`, `schedule`,
|
|
12
|
-
etc.), prevent
|
|
12
|
+
etc.), prevent OpenVox from making changes (`noop`), and change logging verbosity
|
|
13
13
|
(`loglevel`).
|
|
14
14
|
|
|
15
15
|
## Available Metaparameters
|
|
@@ -17,7 +17,7 @@ providers = Puppet::Util::Reference.newreference :providers, :title => "Provider
|
|
|
17
17
|
|
|
18
18
|
# Throw some facts in there, so we know where the report is from.
|
|
19
19
|
ret << option('Ruby Version', Facter.value('ruby.version'))
|
|
20
|
-
ret << option('
|
|
20
|
+
ret << option('OpenVox Version', Facter.value('puppetversion'))
|
|
21
21
|
ret << option('Operating System', Facter.value('os.name'))
|
|
22
22
|
ret << option('Operating System Release', Facter.value('os.release.full'))
|
|
23
23
|
ret << "\n"
|
|
@@ -91,7 +91,7 @@ providers = Puppet::Util::Reference.newreference :providers, :title => "Provider
|
|
|
91
91
|
|
|
92
92
|
ret << markdown_header(type.name.to_s + "_", 2)
|
|
93
93
|
|
|
94
|
-
ret << "[#{type.name}](https://
|
|
94
|
+
ret << "[#{type.name}](https://docs.openvoxproject.org/openvox/latest/type.html##{type.name})\n\n"
|
|
95
95
|
ret << option("Default provider", default)
|
|
96
96
|
ret << doctable(headers, table_data)
|
|
97
97
|
|
|
@@ -107,7 +107,7 @@ providers = Puppet::Util::Reference.newreference :providers, :title => "Provider
|
|
|
107
107
|
ret
|
|
108
108
|
end
|
|
109
109
|
providers.header = "
|
|
110
|
-
|
|
110
|
+
OpenVox resource types are usually backed by multiple implementations called `providers`,
|
|
111
111
|
which handle variance between platforms and tools.
|
|
112
112
|
|
|
113
113
|
Different providers are suitable or unsuitable on different platforms based on things
|
|
@@ -7,16 +7,16 @@ report = Puppet::Util::Reference.newreference :report, :doc => "All available tr
|
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
report.header = "
|
|
10
|
-
|
|
10
|
+
OpenVox can generate a report after applying a catalog. This report includes
|
|
11
11
|
events, log messages, resource statuses, and metrics and metadata about the run.
|
|
12
|
-
|
|
12
|
+
OpenVox agent sends its report to an OpenVox server, and puppet apply
|
|
13
13
|
processes its own reports.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
OpenVox Server and puppet apply will handle every report with a set of report
|
|
16
16
|
processors, configurable with the `reports` setting in puppet.conf. This page
|
|
17
17
|
documents the built-in report processors.
|
|
18
18
|
|
|
19
|
-
See [About Reporting](https://
|
|
19
|
+
See [About Reporting](https://docs.openvoxproject.org/openvox/latest/reporting_about.html)
|
|
20
20
|
for more details.
|
|
21
21
|
|
|
22
22
|
"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
Puppet::Util::Reference.newreference :type, :doc => "All
|
|
3
|
+
Puppet::Util::Reference.newreference :type, :doc => "All OpenVox resource types and all their details" do
|
|
4
4
|
types = {}
|
|
5
5
|
Puppet::Type.loadall
|
|
6
6
|
|
|
@@ -41,7 +41,7 @@ Puppet::Util::Reference.newreference :type, :doc => "All Puppet resource types a
|
|
|
41
41
|
|
|
42
42
|
When required binaries are specified for providers, fully qualified paths
|
|
43
43
|
indicate that the binary must exist at that specific path and unqualified
|
|
44
|
-
binaries indicate that
|
|
44
|
+
binaries indicate that OpenVox will search for the binary using the shell
|
|
45
45
|
path.
|
|
46
46
|
|
|
47
47
|
- *Features* are abilities that some providers might not support. You can use the list
|
data/lib/puppet/relationship.rb
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# subscriptions are permanent associations determining how different
|
|
4
4
|
# objects react to an event
|
|
5
5
|
|
|
6
|
-
# This is
|
|
6
|
+
# This is OpenVox's class for modeling edges in its configuration graph.
|
|
7
7
|
# It used to be a subclass of GRATR::Edge, but that class has weird hash
|
|
8
8
|
# overrides that dramatically slow down the graphing.
|
|
9
9
|
class Puppet::Relationship
|
data/lib/puppet/reports/http.rb
CHANGED
|
@@ -8,7 +8,7 @@ Puppet::Reports.register_report(:http) do
|
|
|
8
8
|
desc <<-DESC
|
|
9
9
|
Send reports via HTTP or HTTPS. This report processor submits reports as
|
|
10
10
|
POST requests to the address in the `reporturl` setting. When a HTTPS URL
|
|
11
|
-
is used, the remote server must present a certificate issued by the
|
|
11
|
+
is used, the remote server must present a certificate issued by the OpenVox
|
|
12
12
|
CA or the connection will fail validation. The body of each POST request
|
|
13
13
|
is the YAML dump of a Puppet::Transaction::Report object, and the
|
|
14
14
|
Content-Type is set as `application/x-yaml`.
|
|
@@ -17,8 +17,8 @@ Puppet::Reports.register_report(:http) do
|
|
|
17
17
|
def process
|
|
18
18
|
url = URI.parse(Puppet[:reporturl])
|
|
19
19
|
headers = { "Content-Type" => "application/x-yaml" }
|
|
20
|
-
# This metric_id option is silently ignored by
|
|
21
|
-
# (Puppet::Network::HTTP) but is used by
|
|
20
|
+
# This metric_id option is silently ignored by OpenVox's http client
|
|
21
|
+
# (Puppet::Network::HTTP) but is used by OpenVox Server's http client
|
|
22
22
|
# (Puppet::Server::HttpClient) to track metrics on the request made to the
|
|
23
23
|
# `reporturl` to store a report.
|
|
24
24
|
options = {
|
|
@@ -26,7 +26,7 @@ Puppet::Reports.register_report(:http) do
|
|
|
26
26
|
:include_system_store => Puppet[:report_include_system_store],
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
#
|
|
29
|
+
# OpenVox's http client implementation accepts userinfo in the URL
|
|
30
30
|
# but puppetserver's does not. So pass credentials explicitly.
|
|
31
31
|
if url.user && url.password
|
|
32
32
|
options[:basic_auth] = {
|
data/lib/puppet/reports.rb
CHANGED
|
@@ -23,7 +23,7 @@ require_relative '../puppet/util/instance_loader'
|
|
|
23
23
|
#
|
|
24
24
|
# Required configuration:
|
|
25
25
|
# --
|
|
26
|
-
# * A .rb file that defines a new report should be placed in the
|
|
26
|
+
# * A .rb file that defines a new report should be placed in the server's directory `lib/puppet/reports`
|
|
27
27
|
# * The `puppet.conf` file must have `report = true` in the `[agent]` section
|
|
28
28
|
#
|
|
29
29
|
# @see Puppet::Transaction::Report
|
|
@@ -37,8 +37,8 @@ class Puppet::Resource::Catalog < Puppet::Graph::SimpleGraph
|
|
|
37
37
|
attr_accessor :catalog_uuid
|
|
38
38
|
|
|
39
39
|
# @return [Integer] catalog format version number. This value is constant
|
|
40
|
-
# for a given version of
|
|
41
|
-
#
|
|
40
|
+
# for a given version of OpenVox; it is incremented when a new release of
|
|
41
|
+
# OpenVox changes the API for the various objects that make up the catalog.
|
|
42
42
|
attr_accessor :catalog_format
|
|
43
43
|
|
|
44
44
|
# Inlined file metadata for non-recursive find
|
|
@@ -521,7 +521,7 @@ class Puppet::Resource::Catalog < Puppet::Graph::SimpleGraph
|
|
|
521
521
|
# Store the classes in the classfile.
|
|
522
522
|
def write_class_file
|
|
523
523
|
# classfile paths may contain UTF-8
|
|
524
|
-
# https://
|
|
524
|
+
# https://docs.openvoxproject.org/openvox/latest/configuration.html#classfile
|
|
525
525
|
classfile = Puppet.settings.setting(:classfile)
|
|
526
526
|
Puppet::FileSystem.open(classfile.value, classfile.mode.to_i(8), "w:UTF-8") do |f|
|
|
527
527
|
f.puts classes.join("\n")
|
|
@@ -533,7 +533,7 @@ class Puppet::Resource::Catalog < Puppet::Graph::SimpleGraph
|
|
|
533
533
|
# Store the list of resources we manage
|
|
534
534
|
def write_resource_file
|
|
535
535
|
# resourcefile contains resources that may be UTF-8 names
|
|
536
|
-
# https://
|
|
536
|
+
# https://docs.openvoxproject.org/openvox/latest/configuration.html#resourcefile
|
|
537
537
|
resourcefile = Puppet.settings.setting(:resourcefile)
|
|
538
538
|
Puppet::FileSystem.open(resourcefile.value, resourcefile.mode.to_i(8), "w:UTF-8") do |f|
|
|
539
539
|
to_print = resources.filter_map do |resource|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
require 'set' # rubocop:disable Lint/RedundantRequireStatement
|
|
4
3
|
require_relative '../../puppet/settings/errors'
|
|
5
4
|
|
|
6
5
|
# The base setting type
|
|
@@ -41,7 +40,7 @@ class Puppet::Settings::BaseSetting
|
|
|
41
40
|
value = :on_write_only
|
|
42
41
|
end
|
|
43
42
|
unless HOOK_TYPES.include?(value)
|
|
44
|
-
# TRANSLATORS 'call_hook' is
|
|
43
|
+
# TRANSLATORS 'call_hook' is an OpenVox option name and should not be translated
|
|
45
44
|
raise ArgumentError, _("Invalid option %{value} for call_hook") % { value: value }
|
|
46
45
|
end
|
|
47
46
|
|
|
@@ -199,7 +198,7 @@ class Puppet::Settings::BaseSetting
|
|
|
199
198
|
|
|
200
199
|
def deprecated=(deprecation)
|
|
201
200
|
unless [:completely, :allowed_on_commandline].include?(deprecation)
|
|
202
|
-
# TRANSLATORS 'deprecated' is
|
|
201
|
+
# TRANSLATORS 'deprecated' is an OpenVox setting and ':completely' and ':allowed_on_commandline' are possible values and should not be translated
|
|
203
202
|
raise ArgumentError, _("Unsupported deprecated value '%{deprecation}'.") % { deprecation: deprecation } +
|
|
204
203
|
' ' + _("Supported values for deprecated are ':completely' or ':allowed_on_commandline'")
|
|
205
204
|
end
|
|
@@ -5,7 +5,7 @@ require_relative '../../puppet/settings/ini_file'
|
|
|
5
5
|
##
|
|
6
6
|
# @api private
|
|
7
7
|
#
|
|
8
|
-
# Parses
|
|
8
|
+
# Parses OpenVox configuration files
|
|
9
9
|
#
|
|
10
10
|
class Puppet::Settings::ConfigFile
|
|
11
11
|
##
|
|
@@ -86,11 +86,11 @@ class Puppet::Settings::ConfigFile
|
|
|
86
86
|
error_location_str = Puppet::Util::Errors.error_location(file, section.line_number)
|
|
87
87
|
message = _("Illegal section '%{name}' in config file at %{error_location}.") %
|
|
88
88
|
{ name: section.name, error_location: error_location_str }
|
|
89
|
-
# TRANSLATORS 'puppet.conf' is the name of the
|
|
89
|
+
# TRANSLATORS 'puppet.conf' is the name of the OpenVox configuration file and should not be translated.
|
|
90
90
|
message += ' ' + _("The only valid puppet.conf sections are: [%{allowed_sections_list}].") %
|
|
91
91
|
{ allowed_sections_list: allowed_section_names.join(", ") }
|
|
92
92
|
message += ' ' + _("Please use the directory environments feature to specify environments.")
|
|
93
|
-
message += ' ' + _("(See https://
|
|
93
|
+
message += ' ' + _("(See https://docs.openvoxproject.org/openvox/latest/environments_about.html)")
|
|
94
94
|
raise(Puppet::Error, message)
|
|
95
95
|
end
|
|
96
96
|
section.name
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# @api private
|
|
5
5
|
class Puppet::Settings::EnvironmentConf
|
|
6
6
|
ENVIRONMENT_CONF_ONLY_SETTINGS = [:modulepath, :manifest, :config_version].freeze
|
|
7
|
-
VALID_SETTINGS = (ENVIRONMENT_CONF_ONLY_SETTINGS + [:environment_timeout, :
|
|
7
|
+
VALID_SETTINGS = (ENVIRONMENT_CONF_ONLY_SETTINGS + [:environment_timeout, :static_catalogs, :rich_data]).freeze
|
|
8
8
|
|
|
9
9
|
# Given a path to a directory environment, attempts to load and parse an
|
|
10
10
|
# environment.conf in ini format, and return an EnvironmentConf instance.
|
|
@@ -41,7 +41,7 @@ class Puppet::Settings::EnvironmentConf
|
|
|
41
41
|
# without interpolation. This is a special case for the default configured
|
|
42
42
|
# environment returned by the Puppet::Environments::StaticPrivate loader.
|
|
43
43
|
def self.static_for(environment, environment_timeout = 0, static_catalogs = false, rich_data = false)
|
|
44
|
-
Static.new(environment, environment_timeout, static_catalogs,
|
|
44
|
+
Static.new(environment, environment_timeout, static_catalogs, rich_data)
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
attr_reader :section, :path_to_env, :global_modulepath
|
|
@@ -91,12 +91,6 @@ class Puppet::Settings::EnvironmentConf
|
|
|
91
91
|
end
|
|
92
92
|
end
|
|
93
93
|
|
|
94
|
-
def environment_data_provider
|
|
95
|
-
get_setting(:environment_data_provider, Puppet.settings.value(:environment_data_provider)) do |value|
|
|
96
|
-
value
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
|
|
100
94
|
def modulepath
|
|
101
95
|
default_modulepath = [File.join(@path_to_env, "modules")] + @global_module_path
|
|
102
96
|
get_setting(:modulepath, default_modulepath) do |modulepath|
|
|
@@ -197,15 +191,13 @@ class Puppet::Settings::EnvironmentConf
|
|
|
197
191
|
# @api private
|
|
198
192
|
class Static
|
|
199
193
|
attr_reader :environment_timeout
|
|
200
|
-
attr_reader :environment_data_provider
|
|
201
194
|
attr_reader :rich_data
|
|
202
195
|
attr_reader :static_catalogs
|
|
203
196
|
|
|
204
|
-
def initialize(environment, environment_timeout, static_catalogs,
|
|
197
|
+
def initialize(environment, environment_timeout, static_catalogs, rich_data = false)
|
|
205
198
|
@environment = environment
|
|
206
199
|
@environment_timeout = environment_timeout
|
|
207
200
|
@static_catalogs = static_catalogs
|
|
208
|
-
@environment_data_provider = environment_data_provider
|
|
209
201
|
@rich_data = rich_data
|
|
210
202
|
end
|
|
211
203
|
|
data/lib/puppet/settings.rb
CHANGED
|
@@ -54,7 +54,7 @@ class Puppet::Settings
|
|
|
54
54
|
|
|
55
55
|
NONE = 'none'
|
|
56
56
|
|
|
57
|
-
# This method is intended for
|
|
57
|
+
# This method is intended for OpenVox internal use only; it is a convenience method that
|
|
58
58
|
# returns reasonable application default settings values for a given run_mode.
|
|
59
59
|
def self.app_defaults_for_run_mode(run_mode)
|
|
60
60
|
{
|
|
@@ -321,10 +321,10 @@ class Puppet::Settings
|
|
|
321
321
|
def initialize_global_settings(args = [], require_config = true)
|
|
322
322
|
raise Puppet::DevError, _("Attempting to initialize global default settings more than once!") if global_defaults_initialized?
|
|
323
323
|
|
|
324
|
-
# The first two phases of the lifecycle of
|
|
324
|
+
# The first two phases of the lifecycle of an OpenVox application are:
|
|
325
325
|
# 1) Parse the command line options and handle any of them that are
|
|
326
|
-
# registered, defined "global"
|
|
327
|
-
# 2) Parse the
|
|
326
|
+
# registered, defined "global" OpenVox settings (mostly from defaults.rb).
|
|
327
|
+
# 2) Parse the OpenVox config file(s).
|
|
328
328
|
|
|
329
329
|
parse_global_options(args)
|
|
330
330
|
parse_config_files(require_config)
|
|
@@ -335,7 +335,7 @@ class Puppet::Settings
|
|
|
335
335
|
# This method is called during application bootstrapping. It is responsible for parsing all of the
|
|
336
336
|
# command line options and initializing the settings accordingly.
|
|
337
337
|
#
|
|
338
|
-
# It will ignore options that are not defined in the global
|
|
338
|
+
# It will ignore options that are not defined in the global OpenVox settings list, because they may
|
|
339
339
|
# be valid options for the specific application that we are about to launch... however, at this point
|
|
340
340
|
# in the bootstrapping lifecycle, we don't yet know what that application is.
|
|
341
341
|
def parse_global_options(args)
|
|
@@ -806,7 +806,7 @@ class Puppet::Settings
|
|
|
806
806
|
# The order in which to search for values, without defaults.
|
|
807
807
|
#
|
|
808
808
|
# @param environment [String,Symbol] symbolic reference to an environment name
|
|
809
|
-
# @param run_mode [Symbol] symbolic reference to
|
|
809
|
+
# @param run_mode [Symbol] symbolic reference to an OpenVox run mode
|
|
810
810
|
# @return [Array<SearchPathElement>]
|
|
811
811
|
# @api private
|
|
812
812
|
def configsearchpath(environment = nil, run_mode = preferred_run_mode)
|
|
@@ -831,7 +831,7 @@ class Puppet::Settings
|
|
|
831
831
|
# The order in which to search for values.
|
|
832
832
|
#
|
|
833
833
|
# @param environment [String,Symbol] symbolic reference to an environment name
|
|
834
|
-
# @param run_mode [Symbol] symbolic reference to
|
|
834
|
+
# @param run_mode [Symbol] symbolic reference to an OpenVox run mode
|
|
835
835
|
# @return [Array<SearchPathElement>]
|
|
836
836
|
# @api private
|
|
837
837
|
def searchpath(environment = nil, run_mode = preferred_run_mode)
|
|
@@ -968,9 +968,9 @@ class Puppet::Settings
|
|
|
968
968
|
# you do not specify it, it will default to "string". Legal values include:
|
|
969
969
|
# :string - A generic string setting
|
|
970
970
|
# :boolean - A boolean setting; values are expected to be "true" or "false"
|
|
971
|
-
# :file - A (single) file path;
|
|
971
|
+
# :file - A (single) file path; OpenVox may attempt to create this file depending on how the settings are used. This type
|
|
972
972
|
# also supports additional options such as "mode", "owner", "group"
|
|
973
|
-
# :directory - A (single) directory path;
|
|
973
|
+
# :directory - A (single) directory path; OpenVox may attempt to create this file depending on how the settings are used. This type
|
|
974
974
|
# also supports additional options such as "mode", "owner", "group"
|
|
975
975
|
# :path - This is intended to be used for settings whose value can contain multiple directory paths, represented
|
|
976
976
|
# as strings separated by the system path separator (e.g. system path, module path, etc.).
|
|
@@ -1490,7 +1490,7 @@ Generated on #{Time.now}.
|
|
|
1490
1490
|
interpolated_expression
|
|
1491
1491
|
end
|
|
1492
1492
|
if failed_environment_interpolation
|
|
1493
|
-
# TRANSLATORS '$environment' is
|
|
1493
|
+
# TRANSLATORS '$environment' is an OpenVox specific variable and should not be translated
|
|
1494
1494
|
Puppet.warning(_("You cannot interpolate $environment within '%{setting_name}' when using directory environments.") % { setting_name: setting_name } +
|
|
1495
1495
|
' ' + _("Its value will remain %{value}.") % { value: interpolated_value })
|
|
1496
1496
|
end
|
|
@@ -202,7 +202,7 @@ class Puppet::SSL::CertificateRequest < Puppet::SSL::Base
|
|
|
202
202
|
|
|
203
203
|
private
|
|
204
204
|
|
|
205
|
-
# Exclude OIDs that may conflict with how
|
|
205
|
+
# Exclude OIDs that may conflict with how OpenVox creates CSRs.
|
|
206
206
|
#
|
|
207
207
|
# We only have nominal support for Microsoft extension requests, but since we
|
|
208
208
|
# ultimately respect that field when looking for extension requests in a CSR
|
data/lib/puppet/ssl/oids.rb
CHANGED
|
@@ -4,7 +4,7 @@ require_relative '../../puppet/util/platform'
|
|
|
4
4
|
|
|
5
5
|
# This file should be required instead of writing `require 'openssl'`
|
|
6
6
|
# or any library that loads openssl like `net/https`. This allows the
|
|
7
|
-
# core
|
|
7
|
+
# core OpenVox code to load correctly in JRuby environments that do not
|
|
8
8
|
# have a functioning openssl (eg a FIPS enabled one).
|
|
9
9
|
|
|
10
10
|
if Puppet::Util::Platform.jruby_fips?
|
|
@@ -18,7 +18,7 @@ require_relative '../../puppet/ssl'
|
|
|
18
18
|
# cert = <OpenSSL::X509::Certificate>
|
|
19
19
|
# ssl_context = provider.create_context(cacerts: cacerts, crls: crls, private_key: key, client_cert: cert)
|
|
20
20
|
#
|
|
21
|
-
# @example To create an SSLContext to connect to non-
|
|
21
|
+
# @example To create an SSLContext to connect to non-OpenVox HTTPS servers:
|
|
22
22
|
# cacerts = [<OpenSSL::X509::Certificate>]
|
|
23
23
|
# ssl_context = provider.create_root_context(cacerts: cacerts)
|
|
24
24
|
#
|
|
@@ -56,9 +56,9 @@ class Puppet::SSL::SSLProvider
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
# Create an `SSLContext` using the trusted `cacerts` and any certs in OpenSSL's
|
|
59
|
-
# default verify path locations. When running
|
|
60
|
-
# system dependent. When running
|
|
61
|
-
# refers to the cacerts bundle in the
|
|
59
|
+
# default verify path locations. When running OpenVox as a gem, the location is
|
|
60
|
+
# system dependent. When running OpenVox from openvox-agent packages, the location
|
|
61
|
+
# refers to the cacerts bundle in the openvox-agent package.
|
|
62
62
|
#
|
|
63
63
|
# Connections made from the returned context will authenticate the server,
|
|
64
64
|
# i.e. `VERIFY_PEER`, but will not use a client certificate (unless requested)
|
|
@@ -296,7 +296,7 @@ class Puppet::SSL::SSLProvider
|
|
|
296
296
|
|
|
297
297
|
def verify_cert_with_store(store, cert)
|
|
298
298
|
# StoreContext#initialize accepts a chain argument, but it's set to [] because
|
|
299
|
-
#
|
|
299
|
+
# OpenVox requires any intermediate CA certs needed to complete the client's
|
|
300
300
|
# chain to be in the CA bundle that we downloaded from the server, and
|
|
301
301
|
# they've already been added to the store. See PUP-9500.
|
|
302
302
|
|
|
@@ -444,11 +444,11 @@ class Puppet::SSL::StateMachine
|
|
|
444
444
|
# sleeping, start over from the top
|
|
445
445
|
NeedCACerts.new(@machine)
|
|
446
446
|
elsif @machine.waitforlock < 1
|
|
447
|
-
LockFailure.new(@machine, _("Another
|
|
447
|
+
LockFailure.new(@machine, _("Another OpenVox instance is already running and the waitforlock setting is set to 0; exiting"))
|
|
448
448
|
elsif Time.now.to_i >= @machine.waitlock_deadline
|
|
449
|
-
LockFailure.new(@machine, _("Another
|
|
449
|
+
LockFailure.new(@machine, _("Another OpenVox instance is already running and the maxwaitforlock timeout has been exceeded; exiting"))
|
|
450
450
|
else
|
|
451
|
-
Puppet.info _("Another
|
|
451
|
+
Puppet.info _("Another OpenVox instance is already running; waiting for it to finish")
|
|
452
452
|
Puppet.info _("Will try again in %{time} seconds.") % { time: @machine.waitforlock }
|
|
453
453
|
Kernel.sleep @machine.waitforlock
|
|
454
454
|
|