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
|
@@ -5,7 +5,7 @@ Puppet::Parser::Functions.newfunction(
|
|
|
5
5
|
:type => :rvalue,
|
|
6
6
|
:arity => -1,
|
|
7
7
|
:doc => <<~DOC
|
|
8
|
-
Call a [lambda](https://
|
|
8
|
+
Call a [lambda](https://docs.openvoxproject.org/openvox/latest/lang_lambdas.html)
|
|
9
9
|
with the given arguments and return the result. Since a lambda's scope is
|
|
10
10
|
local to the lambda, you can use the `with` function to create private blocks
|
|
11
11
|
of code within a class using variables whose values cannot be accessed outside
|
|
@@ -117,15 +117,15 @@ module Puppet::Parser::Functions
|
|
|
117
117
|
#
|
|
118
118
|
# **The {newfunction} method provides a public API.**
|
|
119
119
|
#
|
|
120
|
-
# This method is used both internally inside of
|
|
120
|
+
# This method is used both internally inside of OpenVox to define parser
|
|
121
121
|
# functions. For example, template() is defined in
|
|
122
122
|
# {file:lib/puppet/parser/functions/template.rb template.rb} using the
|
|
123
123
|
# {newfunction} method. Third party Puppet modules such as
|
|
124
124
|
# [stdlib](https://forge.puppetlabs.com/puppetlabs/stdlib) use this method to
|
|
125
|
-
# extend the behavior and functionality of
|
|
125
|
+
# extend the behavior and functionality of OpenVox.
|
|
126
126
|
#
|
|
127
127
|
# See also [Docs: Custom
|
|
128
|
-
# Functions](https://
|
|
128
|
+
# Functions](https://docs.openvoxproject.org/openvox/latest/lang_write_functions_in_puppet.html)
|
|
129
129
|
#
|
|
130
130
|
# @example Define a new Puppet DSL Function
|
|
131
131
|
# >> Puppet::Parser::Functions.newfunction(:double, :arity => 1,
|
data/lib/puppet/parser/scope.rb
CHANGED
|
@@ -8,7 +8,7 @@ require_relative '../../puppet/parser'
|
|
|
8
8
|
require_relative '../../puppet/parser/templatewrapper'
|
|
9
9
|
require_relative '../../puppet/parser/resource'
|
|
10
10
|
|
|
11
|
-
# This class is part of the internal parser/evaluator/compiler functionality of
|
|
11
|
+
# This class is part of the internal parser/evaluator/compiler functionality of OpenVox.
|
|
12
12
|
# It is passed between the various classes that participate in evaluation.
|
|
13
13
|
# None of its methods are API except those that are clearly marked as such.
|
|
14
14
|
#
|
|
@@ -7,7 +7,7 @@ module SyntaxCheckers
|
|
|
7
7
|
# @api public
|
|
8
8
|
SYNTAX_CHECKERS_KEY = :'puppet::syntaxcheckers'
|
|
9
9
|
|
|
10
|
-
# SyntaxChecker is
|
|
10
|
+
# SyntaxChecker is an OpenVox Extension Point for the purpose of extending OpenVox with syntax checkers.
|
|
11
11
|
# The intended use is to create a class derived from this class and then register it with the Puppet context
|
|
12
12
|
#
|
|
13
13
|
# Creating the Extension Class
|
|
@@ -17,7 +17,7 @@ module SyntaxCheckers
|
|
|
17
17
|
# e.g. 'Puppetx::Exampleorg::XmlData::XmlChecker" and
|
|
18
18
|
# be located in `lib/puppetx/exampleorg/xml_data/xml_checker.rb`. The Puppet Binder will auto-load this file when it
|
|
19
19
|
# has a binding to the class `Puppetx::Exampleorg::XmlData::XmlChecker'
|
|
20
|
-
# The Ruby Module `Puppetx` is created by
|
|
20
|
+
# The Ruby Module `Puppetx` is created by OpenVox, the remaining modules should be created by the loaded logic - e.g.:
|
|
21
21
|
#
|
|
22
22
|
# @example Defining an XmlChecker
|
|
23
23
|
# module Puppetx::Exampleorg
|
data/lib/puppet/plugins.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# The Puppet Plugins module defines extension points where plugins can be configured
|
|
4
|
-
# to add or modify
|
|
4
|
+
# to add or modify OpenVox's behavior. See the respective classes in this module for more
|
|
5
5
|
# details.
|
|
6
6
|
#
|
|
7
7
|
# @api public
|
|
@@ -48,7 +48,10 @@ class DeferredResolver
|
|
|
48
48
|
# # Server facts are always about the local node's version etc.
|
|
49
49
|
# @scope.set_server_facts(node.server_facts)
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
# Must be wrapped in with_context_overrides to ensure global_scope is valid for Puppet-language functions
|
|
52
|
+
compiler.with_context_overrides do
|
|
53
|
+
resolver.resolve_futures(catalog)
|
|
54
|
+
end
|
|
52
55
|
nil
|
|
53
56
|
end
|
|
54
57
|
|
data/lib/puppet/pops/issues.rb
CHANGED
|
@@ -392,7 +392,7 @@ module Issues
|
|
|
392
392
|
# Issues when expressions that are not implemented or activated in the current version are used.
|
|
393
393
|
#
|
|
394
394
|
UNSUPPORTED_EXPRESSION = issue :UNSUPPORTED_EXPRESSION do
|
|
395
|
-
_("Expressions of type %{expression} are not supported in this version of
|
|
395
|
+
_("Expressions of type %{expression} are not supported in this version of OpenVox") % { expression: label.a_an(semantic) }
|
|
396
396
|
end
|
|
397
397
|
|
|
398
398
|
ILLEGAL_RELATIONSHIP_OPERAND_TYPE = issue :ILLEGAL_RELATIONSHIP_OPERAND_TYPE, :operand do
|
|
@@ -859,11 +859,11 @@ module Issues
|
|
|
859
859
|
end
|
|
860
860
|
|
|
861
861
|
HIERA_OPTION_RESERVED_BY_PUPPET = hard_issue :HIERA_OPTION_RESERVED_BY_PUPPET, :key, :name do
|
|
862
|
-
_("Option key '%{key}' used in hierarchy '%{name}' is reserved by
|
|
862
|
+
_("Option key '%{key}' used in hierarchy '%{name}' is reserved by OpenVox") % { key: key, name: name }
|
|
863
863
|
end
|
|
864
864
|
|
|
865
865
|
HIERA_DEFAULT_OPTION_RESERVED_BY_PUPPET = hard_issue :HIERA_DEFAULT_OPTION_RESERVED_BY_PUPPET, :key do
|
|
866
|
-
_("Option key '%{key}' used in defaults is reserved by
|
|
866
|
+
_("Option key '%{key}' used in defaults is reserved by OpenVox") % { key: key }
|
|
867
867
|
end
|
|
868
868
|
|
|
869
869
|
HIERA_DATA_PROVIDER_FUNCTION_NOT_FOUND = hard_issue :HIERA_DATA_PROVIDER_FUNCTION_NOT_FOUND, :function_type, :function_name do
|
|
@@ -38,10 +38,10 @@ module ModuleLoaders
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
def self.system_loader_from(parent_loader, loaders)
|
|
41
|
-
#
|
|
42
|
-
# The only way to find
|
|
43
|
-
# to search up the path from this source file's __FILE__ location until it finds the
|
|
44
|
-
#
|
|
41
|
+
# OpenVox may be installed in a fixed location via RPM, installed as a Gem, via source etc.
|
|
42
|
+
# The only way to find the OpenVox code across these different installation methods is
|
|
43
|
+
# to search up the path from this source file's __FILE__ location until it finds the root
|
|
44
|
+
# of the OpenVox codebase.
|
|
45
45
|
#
|
|
46
46
|
puppet_lib = File.realpath(File.join(File.dirname(__FILE__), '../../..'))
|
|
47
47
|
LibRootedFileBased.new(parent_loader,
|
|
@@ -99,7 +99,7 @@ class Puppet::Pops::Loader::RubyLegacyFunctionInstantiator
|
|
|
99
99
|
method_name: mname,
|
|
100
100
|
source_ref: source_ref,
|
|
101
101
|
line: mline,
|
|
102
|
-
url: "https://
|
|
102
|
+
url: "https://docs.openvoxproject.org/openvox/latest/functions_refactor_legacy.html"
|
|
103
103
|
}
|
|
104
104
|
end
|
|
105
105
|
x.each { |v| walk(v, source_ref, result) }
|
data/lib/puppet/pops/loaders.rb
CHANGED
|
@@ -56,7 +56,7 @@ class Loaders
|
|
|
56
56
|
# 2. Cache loader(optional) - i.e. what puppet stores on disk via pluginsync; gate behind the for_agent flag.
|
|
57
57
|
# 3. Environment loader - i.e. what is bound across the environment, may change for each setup
|
|
58
58
|
# TODO: loaders need to work when also running in an agent doing catalog application. There is no
|
|
59
|
-
# concept of environment the same way as when running as a
|
|
59
|
+
# concept of environment the same way as when running as a server (except when doing apply).
|
|
60
60
|
# The creation mechanisms should probably differ between the two.
|
|
61
61
|
@private_environment_loader =
|
|
62
62
|
if for_agent
|
|
@@ -274,11 +274,11 @@ class Loaders
|
|
|
274
274
|
#
|
|
275
275
|
# There are two sources that can be used for the initial parse:
|
|
276
276
|
#
|
|
277
|
-
# 1. The value of `Puppet[:code]`:
|
|
277
|
+
# 1. The value of `Puppet[:code]`: OpenVox can take a string from
|
|
278
278
|
# its settings and parse that as a manifest. This is used by various
|
|
279
|
-
#
|
|
279
|
+
# OpenVox applications to read in a manifest and pass it to the
|
|
280
280
|
# environment as a side effect. This is attempted first.
|
|
281
|
-
# 2. The contents of the environment's +manifest+ attribute:
|
|
281
|
+
# 2. The contents of the environment's +manifest+ attribute: OpenVox will
|
|
282
282
|
# try to load the environment manifest. The manifest must be a file.
|
|
283
283
|
#
|
|
284
284
|
# @return [Model::Program] The manifest parsed into a model object
|
|
@@ -124,27 +124,9 @@ class LookupAdapter < DataAdapter
|
|
|
124
124
|
end
|
|
125
125
|
|
|
126
126
|
def lookup_global(key, lookup_invocation, merge_strategy)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
when :hiera, 'hiera'
|
|
131
|
-
provider = global_provider(lookup_invocation)
|
|
132
|
-
throw :no_such_key if provider.nil?
|
|
133
|
-
provider.key_lookup(key, lookup_invocation, merge_strategy)
|
|
134
|
-
when :none, 'none', '', nil
|
|
135
|
-
# If global lookup is disabled, immediately report as not found
|
|
136
|
-
lookup_invocation.report_not_found(key)
|
|
137
|
-
throw :no_such_key
|
|
138
|
-
else
|
|
139
|
-
lookup_invocation.with(:global, terminus) do
|
|
140
|
-
catch(:no_such_key) do
|
|
141
|
-
return lookup_invocation.report_found(key, Puppet::DataBinding.indirection.find(key.root_key,
|
|
142
|
-
{ :environment => environment, :variables => lookup_invocation.scope, :merge => merge_strategy }))
|
|
143
|
-
end
|
|
144
|
-
lookup_invocation.report_not_found(key)
|
|
145
|
-
throw :no_such_key
|
|
146
|
-
end
|
|
147
|
-
end
|
|
127
|
+
provider = global_provider(lookup_invocation)
|
|
128
|
+
throw :no_such_key if provider.nil?
|
|
129
|
+
provider.key_lookup(key, lookup_invocation, merge_strategy)
|
|
148
130
|
rescue Puppet::DataBinding::LookupError => detail
|
|
149
131
|
raise detail unless detail.issue_code.nil?
|
|
150
132
|
|
|
@@ -468,55 +450,14 @@ class LookupAdapter < DataAdapter
|
|
|
468
450
|
env_conf = environment.configuration
|
|
469
451
|
return nil if env_conf.nil? || env_conf.path_to_env.nil?
|
|
470
452
|
|
|
471
|
-
# Get the name of the data provider from the environment's configuration
|
|
472
|
-
provider_name = env_conf.environment_data_provider
|
|
473
453
|
env_path = Pathname(env_conf.path_to_env)
|
|
474
454
|
config_path = env_path + HieraConfig::CONFIG_FILE_NAME
|
|
475
455
|
|
|
476
|
-
|
|
477
|
-
if config_path.exist?
|
|
478
|
-
ep = EnvironmentDataProvider.new
|
|
479
|
-
# A version 5 hiera.yaml trumps any data provider setting in the environment.conf
|
|
480
|
-
ep_config = ep.config(lookup_invocation)
|
|
481
|
-
if ep_config.nil?
|
|
482
|
-
ep = nil
|
|
483
|
-
elsif ep_config.version >= 5
|
|
484
|
-
unless provider_name.nil? || Puppet[:strict] == :off
|
|
485
|
-
Puppet.warn_once('deprecations', 'environment.conf#data_provider',
|
|
486
|
-
_("Defining environment_data_provider='%{provider_name}' in environment.conf is deprecated") % { provider_name: provider_name }, env_path + 'environment.conf')
|
|
487
|
-
|
|
488
|
-
unless provider_name == 'hiera'
|
|
489
|
-
Puppet.warn_once('deprecations', 'environment.conf#data_provider_overridden',
|
|
490
|
-
_("The environment_data_provider='%{provider_name}' setting is ignored since '%{config_path}' version >= 5") % { provider_name: provider_name, config_path: config_path }, env_path + 'environment.conf')
|
|
491
|
-
end
|
|
492
|
-
end
|
|
493
|
-
provider_name = nil
|
|
494
|
-
end
|
|
495
|
-
end
|
|
496
|
-
|
|
497
|
-
if provider_name.nil?
|
|
498
|
-
ep
|
|
499
|
-
else
|
|
500
|
-
unless Puppet[:strict] == :off
|
|
501
|
-
msg = _("Defining environment_data_provider='%{provider_name}' in environment.conf is deprecated.") % { provider_name: provider_name }
|
|
502
|
-
msg += " " + _("A '%{hiera_config}' file should be used instead") % { hiera_config: HieraConfig::CONFIG_FILE_NAME } if ep.nil?
|
|
503
|
-
Puppet.warn_once('deprecations', 'environment.conf#data_provider', msg, env_path + 'environment.conf')
|
|
504
|
-
end
|
|
456
|
+
return nil unless config_path.exist?
|
|
505
457
|
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
when 'hiera'
|
|
510
|
-
# Use hiera.yaml or default settings if it is missing
|
|
511
|
-
ep || EnvironmentDataProvider.new
|
|
512
|
-
when 'function'
|
|
513
|
-
ep = EnvironmentDataProvider.new
|
|
514
|
-
ep.config = HieraConfigV5.v4_function_config(env_path, 'environment::data', ep)
|
|
515
|
-
ep
|
|
516
|
-
else
|
|
517
|
-
raise Puppet::Error, _("Environment '%{env}', cannot find environment_data_provider '%{provider}'") % { env: environment.name, provider: provider_name }
|
|
518
|
-
end
|
|
519
|
-
end
|
|
458
|
+
ep = EnvironmentDataProvider.new
|
|
459
|
+
ep_config = ep.config(lookup_invocation)
|
|
460
|
+
ep_config.nil? ? nil : ep
|
|
520
461
|
end
|
|
521
462
|
|
|
522
463
|
# @return [Puppet::Node::Environment] the environment of the compiler that this adapter is associated with
|
|
@@ -532,15 +532,15 @@ class Factory
|
|
|
532
532
|
|
|
533
533
|
def and(r) f_build_binary(AndExpression, self, r); end
|
|
534
534
|
|
|
535
|
-
def not
|
|
535
|
+
def not; f_build_unary(NotExpression, self); end
|
|
536
536
|
|
|
537
|
-
def minus
|
|
537
|
+
def minus; f_build_unary(UnaryMinusExpression, self); end
|
|
538
538
|
|
|
539
|
-
def unfold
|
|
539
|
+
def unfold; f_build_unary(UnfoldExpression, self); end
|
|
540
540
|
|
|
541
|
-
def text
|
|
541
|
+
def text; f_build_unary(TextExpression, self); end
|
|
542
542
|
|
|
543
|
-
def var
|
|
543
|
+
def var; f_build_unary(VariableExpression, self); end
|
|
544
544
|
|
|
545
545
|
def access(r); f_build_binary(AccessExpression, self, r); end
|
|
546
546
|
|
|
@@ -267,7 +267,7 @@ class ResourceTypeImpl
|
|
|
267
267
|
# * meta parameters
|
|
268
268
|
#
|
|
269
269
|
def allattrs
|
|
270
|
-
raise NotImplementedError, "allattrs() - return all attribute names in order - probably not used
|
|
270
|
+
raise NotImplementedError, "allattrs() - return all attribute names in order - probably not used on the server side"
|
|
271
271
|
# key_attributes | (parameters & [:provider]) | properties.collect { |property| property.name } | parameters | metaparams
|
|
272
272
|
end
|
|
273
273
|
|
|
@@ -136,7 +136,7 @@ module Puppet::Pops::Types
|
|
|
136
136
|
end
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
# Answers the question if there is an end to the iteration.
|
|
139
|
+
# Answers the question if there is an end to the iteration. OpenVox does not currently provide any unbounded
|
|
140
140
|
# iterables.
|
|
141
141
|
#
|
|
142
142
|
# @return [Boolean] `true` if the iteration is unbounded
|
|
@@ -47,7 +47,7 @@ module Puppet
|
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
def hashify_should
|
|
50
|
-
#
|
|
50
|
+
# OpenVox casts all should values to arrays. Thus, if the user
|
|
51
51
|
# passed in a hash for our property's should value, the should_value
|
|
52
52
|
# parameter will be a single element array so we just extract our value
|
|
53
53
|
# directly.
|
|
@@ -79,8 +79,8 @@ module Puppet
|
|
|
79
79
|
# shared keys will get overwritten by members
|
|
80
80
|
should_value = current.merge(members)
|
|
81
81
|
|
|
82
|
-
# Figure out the keys that will actually change in our
|
|
83
|
-
# This lets us reduce the verbosity of
|
|
82
|
+
# Figure out the keys that will actually change in our OpenVox run.
|
|
83
|
+
# This lets us reduce the verbosity of OpenVox's logging for instances
|
|
84
84
|
# of this class when we want to.
|
|
85
85
|
#
|
|
86
86
|
# NOTE: We use ||= here because we only need to compute the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# Group
|
|
3
|
+
# Group OpenVox provider for AIX. It uses standard commands to manage groups:
|
|
4
4
|
# mkgroup, rmgroup, lsgroup, chgroup
|
|
5
5
|
require_relative '../../../puppet/provider/aix_object'
|
|
6
6
|
|
|
@@ -94,7 +94,7 @@ Puppet::Type.type(:group).provide :aix, :parent => Puppet::Provider::AixObject d
|
|
|
94
94
|
# to do it this way so that we do not accidentally break something.
|
|
95
95
|
# This is ok for now, since we do plan on moving this and the
|
|
96
96
|
# auth_membership management over to the property class in a future
|
|
97
|
-
#
|
|
97
|
+
# OpenVox release.
|
|
98
98
|
def members_insync?(current, should)
|
|
99
99
|
current.sort == @resource.parameter(:members).actual_should(current, should)
|
|
100
100
|
end
|
|
@@ -263,7 +263,7 @@ class Puppet::Provider::NameService::DirectoryService < Puppet::Provider::NameSe
|
|
|
263
263
|
# converted_hash_plist['SALTED-SHA512'] is a Base64 encoded
|
|
264
264
|
# string. The password_hash provided as a resource attribute is a
|
|
265
265
|
# hex value. We need to convert the Base64 encoded string to a
|
|
266
|
-
# hex value and provide it back to
|
|
266
|
+
# hex value and provide it back to OpenVox.
|
|
267
267
|
converted_hash_plist['SALTED-SHA512'].unpack1("H*")
|
|
268
268
|
|
|
269
269
|
end
|
|
@@ -393,7 +393,7 @@ class Puppet::Provider::NameService::DirectoryService < Puppet::Provider::NameSe
|
|
|
393
393
|
# of the password hash if required
|
|
394
394
|
# Shelling out sucks, but for a single use case it doesn't seem worth
|
|
395
395
|
# requiring people install a UUID library that doesn't come with the system.
|
|
396
|
-
# This should be revisited if
|
|
396
|
+
# This should be revisited if OpenVox starts managing UUIDs for other platform
|
|
397
397
|
# user records.
|
|
398
398
|
guid = %x(/usr/bin/uuidgen).chomp
|
|
399
399
|
|
|
@@ -6,7 +6,7 @@ require_relative '../../../puppet/util/package'
|
|
|
6
6
|
Puppet::Type.type(:package).provide :aix, :parent => Puppet::Provider::Package do
|
|
7
7
|
desc "Installation from an AIX software directory, using the AIX `installp`
|
|
8
8
|
command. The `source` parameter is required for this provider, and should
|
|
9
|
-
be set to the absolute path (on the
|
|
9
|
+
be set to the absolute path (on the OpenVox agent machine) of a directory
|
|
10
10
|
containing one or more BFF package files.
|
|
11
11
|
|
|
12
12
|
The `installp` command will generate a table of contents file (named `.toc`)
|
|
@@ -149,9 +149,9 @@ Puppet::Type.type(:package).provide :apt, :parent => :dpkg, :source => :dpkg do
|
|
|
149
149
|
when true, false, Symbol
|
|
150
150
|
# pass
|
|
151
151
|
else
|
|
152
|
-
# Add the package version and --force-yes
|
|
152
|
+
# Add the package version and --allow-downgrades option (it was --force-yes before)
|
|
153
153
|
str += "=#{should}"
|
|
154
|
-
cmd << "--
|
|
154
|
+
cmd << "--allow-downgrades"
|
|
155
155
|
end
|
|
156
156
|
|
|
157
157
|
cmd += install_options if @resource[:install_options]
|
|
@@ -14,7 +14,6 @@ Puppet::Type.type(:package).provide :aptitude, :parent => :apt, :source => :dpkg
|
|
|
14
14
|
args.flatten!
|
|
15
15
|
# Apparently aptitude hasn't always supported a -q flag.
|
|
16
16
|
args.delete("-q") if args.include?("-q")
|
|
17
|
-
args.delete("--force-yes") if args.include?("--force-yes")
|
|
18
17
|
output = aptitude(*args)
|
|
19
18
|
|
|
20
19
|
# Yay, stupid aptitude doesn't throw an error when the package is missing.
|
|
@@ -6,7 +6,7 @@ require_relative '../../../puppet/util/package'
|
|
|
6
6
|
Puppet::Type.type(:package).provide :nim, :parent => :aix, :source => :aix do
|
|
7
7
|
desc "Installation from an AIX NIM LPP source. The `source` parameter is required
|
|
8
8
|
for this provider, and should specify the name of a NIM `lpp_source` resource
|
|
9
|
-
that is visible to the
|
|
9
|
+
that is visible to the OpenVox agent machine. This provider supports the
|
|
10
10
|
management of both BFF/installp and RPM packages.
|
|
11
11
|
|
|
12
12
|
Note that package downgrades are *not* supported; if your resource specifies
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative '../../../puppet/provider/package'
|
|
4
|
-
require 'set' # rubocop:disable Lint/RedundantRequireStatement
|
|
5
4
|
require 'uri'
|
|
6
5
|
|
|
7
6
|
Puppet::Type.type(:package).provide :pacman, :parent => Puppet::Provider::Package do
|
|
@@ -248,7 +247,7 @@ Puppet::Type.type(:package).provide :pacman, :parent => Puppet::Provider::Packag
|
|
|
248
247
|
else
|
|
249
248
|
fail _("Source %{source} is not supported by pacman") % { source: source }
|
|
250
249
|
end
|
|
251
|
-
pacman "--noconfirm", "--noprogressbar", "--
|
|
250
|
+
pacman "--noconfirm", "--noprogressbar", "--upgrade", source
|
|
252
251
|
end
|
|
253
252
|
|
|
254
253
|
def install_from_repo
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# OpenVox package provider for Python's `pip` package management frontend.
|
|
4
4
|
# <http://pip.pypa.io/>
|
|
5
5
|
|
|
6
6
|
require_relative '../../../puppet/util/package/version/pip'
|
|
@@ -19,7 +19,7 @@ Puppet::Type.type(:package).provide :pkgdmg, :parent => Puppet::Provider::Packag
|
|
|
19
19
|
|
|
20
20
|
This provider works by checking the contents of a DMG image for Apple pkg or
|
|
21
21
|
mpkg files. Any number of pkg or mpkg files may exist in the root directory
|
|
22
|
-
of the DMG file system, and
|
|
22
|
+
of the DMG file system, and OpenVox will install all of them. Subdirectories
|
|
23
23
|
are not checked for packages.
|
|
24
24
|
|
|
25
25
|
This provider can also accept plain .pkg (but not .mpkg) files in addition
|
|
@@ -32,7 +32,7 @@ Puppet::Type.type(:package).provide :pkgdmg, :parent => Puppet::Provider::Packag
|
|
|
32
32
|
* The `name` of the resource must be the filename (without path) of the DMG file.
|
|
33
33
|
* When installing the packages from a DMG, this provider writes a file to
|
|
34
34
|
disk at `/var/db/.puppet_pkgdmg_installed_NAME`. If that file is present,
|
|
35
|
-
|
|
35
|
+
OpenVox assumes all packages from that DMG are already installed.
|
|
36
36
|
* This provider is not versionable and uses DMG filenames to determine
|
|
37
37
|
whether a package has been installed. Thus, to install new a version of a
|
|
38
38
|
package, you must create a new DMG with a different filename."
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
Puppet::Type.type(:package).provide :puppet_gem, :parent => :gem do
|
|
4
|
-
desc "
|
|
5
|
-
gems needed by the ruby provided in the
|
|
4
|
+
desc "OpenVox Ruby Gem support. This provider is useful for managing
|
|
5
|
+
gems needed by the ruby provided in the openvox-agent package."
|
|
6
6
|
|
|
7
7
|
has_feature :versionable, :install_options, :uninstall_options
|
|
8
8
|
|
|
@@ -9,7 +9,7 @@ require 'uri'
|
|
|
9
9
|
|
|
10
10
|
# Ruby gems support.
|
|
11
11
|
Puppet::Type.type(:package).provide :puppetserver_gem, :parent => :gem do
|
|
12
|
-
desc "
|
|
12
|
+
desc "OpenVox Server Ruby Gem support. If a URL is passed via `source`, then
|
|
13
13
|
that URL is appended to the list of remote gem repositories which by default
|
|
14
14
|
contains rubygems.org; To ensure that only the specified source is used also
|
|
15
15
|
pass `--clear-sources` in via `install_options`; if a source is present but
|
|
@@ -19,7 +19,7 @@ Puppet::Type.type(:package).provide(:windows, :parent => Puppet::Provider::Packa
|
|
|
19
19
|
|
|
20
20
|
If the executable requires special arguments to perform a silent install or
|
|
21
21
|
uninstall, then the appropriate arguments should be specified using the
|
|
22
|
-
`install_options` or `uninstall_options` attributes, respectively.
|
|
22
|
+
`install_options` or `uninstall_options` attributes, respectively. OpenVox
|
|
23
23
|
will automatically quote any option that contains spaces."
|
|
24
24
|
|
|
25
25
|
confine 'os.name' => :windows
|
|
@@ -86,7 +86,7 @@ Puppet::Type.type(:service).provide :freebsd, :parent => :init do
|
|
|
86
86
|
|
|
87
87
|
# Add a new setting to the rc files
|
|
88
88
|
def rc_add(service, rcvar, yesno)
|
|
89
|
-
append = "\# Added by
|
|
89
|
+
append = "\# Added by OpenVox\n#{rcvar}_enable=\"#{yesno}\"\n"
|
|
90
90
|
# First, try the one-file-per-service style
|
|
91
91
|
if Puppet::FileSystem.exist?(rcconf_dir)
|
|
92
92
|
File.open(rcconf_dir + "/#{service}", File::WRONLY | File::APPEND | File::CREAT, 0o644) { |f|
|
|
@@ -52,21 +52,21 @@ Puppet::Type.type(:service).provide :init, :parent => :base do
|
|
|
52
52
|
excludes += %w[wait-for-state portmap-wait]
|
|
53
53
|
# these excludes were found with grep -r -L start /etc/init.d
|
|
54
54
|
excludes += %w[rcS module-init-tools]
|
|
55
|
-
# Prevent
|
|
55
|
+
# Prevent OpenVox failing on unsafe scripts from Yocto Linux
|
|
56
56
|
if Puppet.runtime[:facter].value('os.family') == "cisco-wrlinux"
|
|
57
57
|
excludes += %w[banner.sh bootmisc.sh checkroot.sh devpts.sh dmesg.sh
|
|
58
58
|
hostname.sh mountall.sh mountnfs.sh populate-volatile.sh
|
|
59
59
|
rmnologin.sh save-rtc.sh sendsigs sysfs.sh umountfs
|
|
60
60
|
umountnfs.sh]
|
|
61
61
|
end
|
|
62
|
-
# Prevent
|
|
62
|
+
# Prevent OpenVox failing to get status of the new service introduced
|
|
63
63
|
# by the fix for this (bug https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/982889)
|
|
64
|
-
# due to
|
|
64
|
+
# due to OpenVox's inability to deal with upstart services with instances.
|
|
65
65
|
excludes += %w[plymouth-ready]
|
|
66
|
-
# Prevent
|
|
66
|
+
# Prevent OpenVox failing to get status of these services, which need parameters
|
|
67
67
|
# passed in (see https://bugs.launchpad.net/ubuntu/+source/puppet/+bug/1276766).
|
|
68
68
|
excludes += %w[idmapd-mounting startpar-bridge]
|
|
69
|
-
# Prevent
|
|
69
|
+
# Prevent OpenVox failing to get status of these services, additional upstart
|
|
70
70
|
# service with instances
|
|
71
71
|
excludes += %w[cryptdisks-udev]
|
|
72
72
|
excludes += %w[statd-mounting]
|
|
@@ -26,7 +26,7 @@ Puppet::Type.type(:service).provide :launchd, :parent => :base do
|
|
|
26
26
|
* status
|
|
27
27
|
* restart
|
|
28
28
|
|
|
29
|
-
Here is how the
|
|
29
|
+
Here is how the OpenVox states correspond to `launchd` states:
|
|
30
30
|
|
|
31
31
|
* stopped --- job unloaded
|
|
32
32
|
* started --- job loaded
|
|
@@ -148,7 +148,7 @@ Puppet::Type.type(:service).provide :launchd, :parent => :base do
|
|
|
148
148
|
@label_to_path_map[job["Label"]] = filepath
|
|
149
149
|
else
|
|
150
150
|
# TRANSLATORS 'plist' and label' should not be translated
|
|
151
|
-
Puppet.debug(_("The %{file} plist does not contain a 'label' key;
|
|
151
|
+
Puppet.debug(_("The %{file} plist does not contain a 'label' key; OpenVox is skipping it") % { file: filepath })
|
|
152
152
|
next
|
|
153
153
|
end
|
|
154
154
|
end
|
|
@@ -33,7 +33,7 @@ Puppet::Type.type(:service).provide :smf, :parent => :base do
|
|
|
33
33
|
def self.instances
|
|
34
34
|
service_instances = svcs("-H", "-o", "state,fmri").split("\n")
|
|
35
35
|
|
|
36
|
-
#
|
|
36
|
+
# OpenVox does not manage services in the legacy_run state, so filter those out.
|
|
37
37
|
service_instances.reject! { |line| line =~ /^legacy_run/ }
|
|
38
38
|
|
|
39
39
|
service_instances.collect! do |line|
|
|
@@ -36,7 +36,7 @@ Puppet::Type.type(:service).provide :upstart, :parent => :debian do
|
|
|
36
36
|
# Puppet::Util::Execution.execute does not currently work on jRuby.
|
|
37
37
|
# Unfortunately, since this confine is invoked whenever we check for
|
|
38
38
|
# provider suitability and since provider suitability is still checked
|
|
39
|
-
# on the
|
|
39
|
+
# on the server, this confine will still be invoked on the server. Thus
|
|
40
40
|
# to avoid raising an exception, we do an early return if we're running
|
|
41
41
|
# on jRuby.
|
|
42
42
|
return false if Puppet::Util::Platform.jruby?
|
|
@@ -60,7 +60,7 @@ Puppet::Type.type(:service).provide :upstart, :parent => :debian do
|
|
|
60
60
|
def self.excludes
|
|
61
61
|
excludes = super
|
|
62
62
|
if Puppet.runtime[:facter].value('os.family') == 'RedHat'
|
|
63
|
-
#
|
|
63
|
+
# OpenVox cannot deal with services that have instances, so we have to
|
|
64
64
|
# ignore these services using instances on redhat based systems.
|
|
65
65
|
excludes += %w[serial tty]
|
|
66
66
|
end
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
# User
|
|
3
|
+
# User OpenVox provider for AIX. It uses standard commands to manage users:
|
|
4
4
|
# mkuser, rmuser, lsuser, chuser
|
|
5
5
|
#
|
|
6
6
|
# Notes:
|
|
7
7
|
# - AIX users can have expiry date defined with minute granularity,
|
|
8
|
-
# but
|
|
8
|
+
# but OpenVox does not allow it. There is a ticket open for that (#5431)
|
|
9
9
|
#
|
|
10
10
|
# - AIX maximum password age is in WEEKs, not days
|
|
11
11
|
#
|
|
12
|
-
# See https://
|
|
12
|
+
# See https://docs.openvoxproject.org/openvox/latest/provider_development.html
|
|
13
13
|
# for more information
|
|
14
14
|
require_relative '../../../puppet/provider/aix_object'
|
|
15
15
|
require_relative '../../../puppet/util/posix'
|