puppet 5.3.3-x86-mingw32 → 5.3.4-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +3 -0
- data/ext/puppet-test +3 -2
- data/lib/hiera/puppet_function.rb +5 -2
- data/lib/hiera_puppet.rb +3 -3
- data/lib/puppet.rb +2 -5
- data/lib/puppet/agent.rb +22 -2
- data/lib/puppet/agent/locker.rb +6 -5
- data/lib/puppet/application.rb +18 -1
- data/lib/puppet/application/agent.rb +9 -2
- data/lib/puppet/application/apply.rb +1 -1
- data/lib/puppet/application/config.rb +1 -0
- data/lib/puppet/application/device.rb +1 -2
- data/lib/puppet/application/filebucket.rb +22 -5
- data/lib/puppet/application/help.rb +1 -0
- data/lib/puppet/application/lookup.rb +1 -3
- data/lib/puppet/application_support.rb +6 -1
- data/lib/puppet/bindings.rb +2 -1
- data/lib/puppet/configurer.rb +9 -4
- data/lib/puppet/configurer/downloader_factory.rb +10 -0
- data/lib/puppet/configurer/plugin_handler.rb +11 -4
- data/lib/puppet/daemon.rb +2 -2
- data/lib/puppet/defaults.rb +99 -27
- data/lib/puppet/environments.rb +2 -0
- data/lib/puppet/error.rb +5 -15
- data/lib/puppet/external/pson/common.rb +2 -2
- data/lib/puppet/face/catalog.rb +1 -1
- data/lib/puppet/face/config.rb +14 -1
- data/lib/puppet/face/epp.rb +4 -2
- data/lib/puppet/face/help.rb +12 -14
- data/lib/puppet/face/man.rb +1 -0
- data/lib/puppet/face/module/build.rb +1 -1
- data/lib/puppet/face/module/list.rb +6 -17
- data/lib/puppet/face/module/uninstall.rb +14 -3
- data/lib/puppet/face/node.rb +1 -0
- data/lib/puppet/face/status.rb +1 -0
- data/lib/puppet/file_serving/base.rb +2 -1
- data/lib/puppet/file_serving/configuration.rb +3 -0
- data/lib/puppet/file_serving/configuration/parser.rb +23 -9
- data/lib/puppet/file_serving/mount/locales.rb +35 -0
- data/lib/puppet/forge.rb +2 -1
- data/lib/puppet/forge/errors.rb +24 -22
- data/lib/puppet/functions/binary_file.rb +1 -0
- data/lib/puppet/functions/each.rb +10 -4
- data/lib/puppet/functions/eyaml_lookup_key.rb +4 -2
- data/lib/puppet/functions/lookup.rb +2 -2
- data/lib/puppet/functions/map.rb +12 -2
- data/lib/puppet/functions/slice.rb +2 -3
- data/lib/puppet/functions/unique.rb +1 -1
- data/lib/puppet/functions/yaml_data.rb +1 -1
- data/lib/puppet/gettext/config.rb +144 -41
- data/lib/puppet/gettext/module_translations.rb +42 -0
- data/lib/puppet/graph/relationship_graph.rb +1 -1
- data/lib/puppet/graph/simple_graph.rb +3 -3
- data/lib/puppet/indirector/catalog/compiler.rb +40 -25
- data/lib/puppet/indirector/exec.rb +1 -1
- data/lib/puppet/indirector/facts/facter.rb +3 -3
- data/lib/puppet/indirector/facts/network_device.rb +2 -2
- data/lib/puppet/indirector/file_bucket_file/file.rb +4 -1
- data/lib/puppet/indirector/indirection.rb +17 -9
- data/lib/puppet/indirector/ldap.rb +2 -2
- data/lib/puppet/indirector/node/write_only_yaml.rb +3 -1
- data/lib/puppet/indirector/rest.rb +8 -5
- data/lib/puppet/indirector/ssl_file.rb +2 -2
- data/lib/puppet/indirector/terminus.rb +3 -3
- data/lib/puppet/interface.rb +2 -1
- data/lib/puppet/interface/action.rb +41 -24
- data/lib/puppet/interface/action_builder.rb +14 -5
- data/lib/puppet/interface/action_manager.rb +1 -1
- data/lib/puppet/interface/documentation.rb +21 -10
- data/lib/puppet/interface/face_collection.rb +4 -2
- data/lib/puppet/interface/option.rb +36 -15
- data/lib/puppet/interface/option_builder.rb +23 -9
- data/lib/puppet/interface/option_manager.rb +8 -3
- data/lib/puppet/metatype/manager.rb +7 -3
- data/lib/puppet/module.rb +18 -21
- data/lib/puppet/module_tool/errors/installer.rb +18 -20
- data/lib/puppet/module_tool/errors/shared.rb +20 -15
- data/lib/puppet/module_tool/errors/uninstaller.rb +1 -0
- data/lib/puppet/module_tool/errors/upgrader.rb +1 -1
- data/lib/puppet/module_tool/tar/mini.rb +57 -4
- data/lib/puppet/network/auth_config_parser.rb +18 -13
- data/lib/puppet/network/authstore.rb +2 -2
- data/lib/puppet/network/client_request.rb +1 -1
- data/lib/puppet/network/format.rb +3 -3
- data/lib/puppet/network/http/api/indirection_type.rb +1 -1
- data/lib/puppet/network/http/api/master/v3/environment.rb +5 -2
- data/lib/puppet/network/http/error.rb +7 -7
- data/lib/puppet/network/http/factory.rb +9 -0
- data/lib/puppet/network/http/rack.rb +2 -2
- data/lib/puppet/network/http/webrick.rb +2 -4
- data/lib/puppet/node.rb +25 -6
- data/lib/puppet/node/environment.rb +14 -0
- data/lib/puppet/node/facts.rb +9 -0
- data/lib/puppet/parameter.rb +3 -3
- data/lib/puppet/parameter/value_collection.rb +9 -9
- data/lib/puppet/parser/ast/leaf.rb +1 -1
- data/lib/puppet/parser/ast/node.rb +2 -2
- data/lib/puppet/parser/ast/pops_bridge.rb +1 -1
- data/lib/puppet/parser/compiler.rb +6 -5
- data/lib/puppet/parser/functions.rb +1 -1
- data/lib/puppet/parser/functions/generate.rb +2 -4
- data/lib/puppet/parser/functions/inline_template.rb +1 -2
- data/lib/puppet/parser/functions/sprintf.rb +17 -3
- data/lib/puppet/parser/functions/template.rb +6 -2
- data/lib/puppet/parser/resource.rb +30 -31
- data/lib/puppet/parser/scope.rb +20 -11
- data/lib/puppet/parser/templatewrapper.rb +4 -3
- data/lib/puppet/pops/evaluator/collector_transformer.rb +2 -1
- data/lib/puppet/pops/evaluator/collectors/abstract_collector.rb +1 -1
- data/lib/puppet/pops/evaluator/epp_evaluator.rb +21 -8
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +2 -1
- data/lib/puppet/pops/evaluator/external_syntax_support.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_converter.rb +3 -1
- data/lib/puppet/pops/evaluator/runtime3_resource_support.rb +1 -1
- data/lib/puppet/pops/evaluator/runtime3_support.rb +4 -4
- data/lib/puppet/pops/functions/dispatch.rb +1 -1
- data/lib/puppet/pops/functions/function.rb +8 -2
- data/lib/puppet/pops/issue_reporter.rb +7 -2
- data/lib/puppet/pops/issues.rb +10 -4
- data/lib/puppet/pops/label_provider.rb +1 -1
- data/lib/puppet/pops/loader/module_loaders.rb +5 -2
- data/lib/puppet/pops/loader/static_loader.rb +1 -1
- data/lib/puppet/pops/loaders.rb +7 -3
- data/lib/puppet/pops/lookup/explainer.rb +2 -1
- data/lib/puppet/pops/lookup/hiera_config.rb +2 -2
- data/lib/puppet/pops/lookup/lookup_adapter.rb +4 -4
- data/lib/puppet/pops/merge_strategy.rb +6 -3
- data/lib/puppet/pops/migration/migration_checker.rb +8 -8
- data/lib/puppet/pops/model/ast_transformer.rb +1 -1
- data/lib/puppet/pops/model/factory.rb +4 -2
- data/lib/puppet/pops/resource/resource_type_impl.rb +1 -1
- data/lib/puppet/pops/serialization/abstract_writer.rb +2 -1
- data/lib/puppet/pops/types/iterable.rb +2 -0
- data/lib/puppet/pops/types/p_object_type.rb +36 -15
- data/lib/puppet/pops/types/type_calculator.rb +2 -1
- data/lib/puppet/pops/types/type_factory.rb +3 -1
- data/lib/puppet/pops/types/type_mismatch_describer.rb +19 -6
- data/lib/puppet/pops/types/type_parser.rb +7 -7
- data/lib/puppet/pops/types/types.rb +10 -4
- data/lib/puppet/pops/validation.rb +14 -12
- data/lib/puppet/property.rb +14 -6
- data/lib/puppet/property/ensure.rb +2 -2
- data/lib/puppet/provider.rb +4 -4
- data/lib/puppet/provider/group/aix.rb +4 -2
- data/lib/puppet/provider/ldap.rb +2 -2
- data/lib/puppet/provider/naginator.rb +1 -1
- data/lib/puppet/provider/nameservice.rb +7 -4
- data/lib/puppet/provider/nameservice/directoryservice.rb +4 -3
- data/lib/puppet/provider/package/aix.rb +1 -1
- data/lib/puppet/provider/package/nim.rb +7 -8
- data/lib/puppet/provider/package/opkg.rb +1 -1
- data/lib/puppet/provider/package/pkg.rb +9 -6
- data/lib/puppet/provider/package/pkgutil.rb +3 -3
- data/lib/puppet/provider/package/yum.rb +1 -1
- data/lib/puppet/provider/parsedfile.rb +4 -4
- data/lib/puppet/provider/selmodule/semodule.rb +5 -3
- data/lib/puppet/provider/service/base.rb +1 -1
- data/lib/puppet/provider/service/init.rb +1 -1
- data/lib/puppet/provider/service/launchd.rb +2 -2
- data/lib/puppet/provider/service/runit.rb +2 -1
- data/lib/puppet/provider/service/smf.rb +2 -0
- data/lib/puppet/provider/service/systemd.rb +1 -0
- data/lib/puppet/provider/service/upstart.rb +1 -1
- data/lib/puppet/provider/user/aix.rb +13 -6
- data/lib/puppet/provider/user/openbsd.rb +2 -1
- data/lib/puppet/provider/yumrepo/inifile.rb +2 -1
- data/lib/puppet/provider/zone/solaris.rb +2 -2
- data/lib/puppet/reference/configuration.rb +4 -2
- data/lib/puppet/relationship.rb +2 -1
- data/lib/puppet/reports/store.rb +1 -1
- data/lib/puppet/resource.rb +7 -5
- data/lib/puppet/resource/capability_finder.rb +14 -11
- data/lib/puppet/resource/catalog.rb +33 -18
- data/lib/puppet/resource/type.rb +5 -5
- data/lib/puppet/settings.rb +19 -13
- data/lib/puppet/settings/base_setting.rb +23 -8
- data/lib/puppet/settings/config_file.rb +14 -4
- data/lib/puppet/settings/environment_conf.rb +19 -9
- data/lib/puppet/ssl/base.rb +9 -4
- data/lib/puppet/ssl/oids.rb +8 -2
- data/lib/puppet/syntax_checkers/base64.rb +5 -6
- data/lib/puppet/transaction.rb +7 -3
- data/lib/puppet/transaction/persistence.rb +16 -1
- data/lib/puppet/transaction/report.rb +6 -0
- data/lib/puppet/type.rb +27 -35
- data/lib/puppet/type/file.rb +2 -1
- data/lib/puppet/type/file/data_sync.rb +2 -1
- data/lib/puppet/type/file/source.rb +1 -1
- data/lib/puppet/type/group.rb +1 -1
- data/lib/puppet/type/mount.rb +1 -1
- data/lib/puppet/type/resources.rb +1 -1
- data/lib/puppet/type/schedule.rb +26 -14
- data/lib/puppet/type/user.rb +9 -3
- data/lib/puppet/type/zone.rb +1 -1
- data/lib/puppet/util.rb +27 -21
- data/lib/puppet/util/at_fork/solaris.rb +6 -4
- data/lib/puppet/util/command_line.rb +5 -0
- data/lib/puppet/util/command_line/trollop.rb +6 -5
- data/lib/puppet/util/errors.rb +61 -8
- data/lib/puppet/util/fileparsing.rb +3 -5
- data/lib/puppet/util/http_proxy.rb +14 -6
- data/lib/puppet/util/instance_loader.rb +1 -3
- data/lib/puppet/util/ldap/manager.rb +6 -3
- data/lib/puppet/util/log.rb +19 -24
- data/lib/puppet/util/logging.rb +21 -28
- data/lib/puppet/util/methodhelper.rb +1 -1
- data/lib/puppet/util/nagios_maker.rb +1 -1
- data/lib/puppet/util/network_device/config.rb +21 -13
- data/lib/puppet/util/plist.rb +3 -1
- data/lib/puppet/util/posix.rb +1 -1
- data/lib/puppet/util/provider_features.rb +1 -1
- data/lib/puppet/util/rdoc/generators/puppet_generator.rb +1 -1
- data/lib/puppet/util/reference.rb +2 -3
- data/lib/puppet/util/selinux.rb +1 -1
- data/lib/puppet/util/storage.rb +2 -2
- data/lib/puppet/util/windows/eventlog.rb +10 -5
- data/lib/puppet/util/windows/file.rb +61 -9
- data/lib/puppet/util/windows/process.rb +1 -1
- data/lib/puppet/util/windows/taskscheduler.rb +2 -2
- data/lib/puppet/vendor/semantic_puppet/lib/semantic_puppet.rb +5 -1
- data/lib/puppet/version.rb +1 -1
- data/locales/en/puppet.po +19 -0
- data/locales/ja/puppet.po +2739 -809
- data/locales/puppet.pot +2367 -734
- data/spec/fixtures/unit/application/environments/production/data/common.yaml +2 -0
- data/spec/integration/agent/logging_spec.rb +2 -0
- data/spec/integration/faces/plugin_spec.rb +1 -0
- data/spec/integration/network/authconfig_spec.rb +2 -2
- data/spec/integration/parser/collection_spec.rb +2 -2
- data/spec/integration/parser/scope_spec.rb +16 -3
- data/spec/integration/provider/cron/crontab_spec.rb +1 -0
- data/spec/integration/transaction/report_spec.rb +5 -0
- data/spec/lib/matchers/json.rb +14 -13
- data/spec/unit/agent_spec.rb +33 -0
- data/spec/unit/application/config_spec.rb +4 -0
- data/spec/unit/application/lookup_spec.rb +30 -0
- data/spec/unit/application_spec.rb +18 -0
- data/spec/unit/configurer/downloader_factory_spec.rb +33 -0
- data/spec/unit/configurer/plugin_handler_spec.rb +71 -16
- data/spec/unit/environments_spec.rb +15 -0
- data/spec/unit/face/config_spec.rb +8 -9
- data/spec/unit/face/epp_face_spec.rb +2 -2
- data/spec/unit/face/plugin_spec.rb +50 -4
- data/spec/unit/file_serving/configuration/parser_spec.rb +2 -2
- data/spec/unit/file_serving/mount/locales_spec.rb +73 -0
- data/spec/unit/functions/break_spec.rb +108 -50
- data/spec/unit/functions/defined_spec.rb +2 -2
- data/spec/unit/functions/hiera_spec.rb +0 -1
- data/spec/unit/functions/lookup_spec.rb +85 -19
- data/spec/unit/functions/next_spec.rb +1 -1
- data/spec/unit/functions/return_spec.rb +2 -2
- data/spec/unit/gettext/config_spec.rb +125 -0
- data/spec/unit/gettext/module_loading_spec.rb +53 -0
- data/spec/unit/indirector/json_spec.rb +0 -11
- data/spec/unit/indirector/node/exec_spec.rb +1 -1
- data/spec/unit/info_service_spec.rb +1 -1
- data/spec/unit/interface_spec.rb +12 -0
- data/spec/unit/module_spec.rb +0 -28
- data/spec/unit/module_tool/tar/mini_spec.rb +34 -5
- data/spec/unit/network/http/factory_spec.rb +22 -0
- data/spec/unit/network/http/webrick_spec.rb +30 -29
- data/spec/unit/node/environment_spec.rb +16 -0
- data/spec/unit/node_spec.rb +102 -16
- data/spec/unit/parser/environment_compiler_spec.rb +1 -1
- data/spec/unit/parser/functions/sprintf_spec.rb +26 -0
- data/spec/unit/parser/resource/param_spec.rb +1 -1
- data/spec/unit/pops/evaluator/evaluating_parser_spec.rb +9 -9
- data/spec/unit/pops/loaders/static_loader_spec.rb +1 -1
- data/spec/unit/pops/parser/parse_containers_spec.rb +1 -1
- data/spec/unit/pops/types/type_calculator_spec.rb +40 -0
- data/spec/unit/pops/types/type_mismatch_describer_spec.rb +9 -0
- data/spec/unit/provider/selmodule_spec.rb +6 -0
- data/spec/unit/provider/service/init_spec.rb +1 -1
- data/spec/unit/provider/service/smf_spec.rb +2 -0
- data/spec/unit/provider/service/systemd_spec.rb +14 -0
- data/spec/unit/resource/catalog_spec.rb +12 -2
- data/spec/unit/settings/config_file_spec.rb +1 -1
- data/spec/unit/transaction/persistence_spec.rb +42 -0
- data/spec/unit/transaction/report_spec.rb +19 -4
- data/spec/unit/transaction_spec.rb +27 -0
- data/spec/unit/type/schedule_spec.rb +14 -0
- data/spec/unit/type_spec.rb +3 -3
- data/spec/unit/util/errors_spec.rb +1 -1
- data/spec/unit/util/http_proxy_spec.rb +37 -0
- data/spec/unit/util/log_spec.rb +3 -3
- data/spec/unit/util/logging_spec.rb +7 -7
- data/spec/unit/util/monkey_patches_spec.rb +6 -2
- metadata +3445 -3416
- checksums.yaml +0 -7
- data/spec/unit/gettext_config_spec.rb +0 -57
data/lib/puppet/provider.rb
CHANGED
@@ -143,7 +143,7 @@ class Puppet::Provider
|
|
143
143
|
elsif superclass.respond_to? :command and command = superclass.command(name)
|
144
144
|
# nothing
|
145
145
|
else
|
146
|
-
raise Puppet::DevError, "No command
|
146
|
+
raise Puppet::DevError, _("No command %{command} defined for provider %{provider}") % { command: name, provider: self.name }
|
147
147
|
end
|
148
148
|
|
149
149
|
which(command)
|
@@ -374,7 +374,7 @@ class Puppet::Provider
|
|
374
374
|
# @raise [Puppet::DevError] Error indicating that the method should have been implemented by subclass.
|
375
375
|
# @see prefetch
|
376
376
|
def self.instances
|
377
|
-
raise Puppet::DevError, "Provider
|
377
|
+
raise Puppet::DevError, _("Provider %{provider} has not defined the 'instances' class method") % { provider: self.name }
|
378
378
|
end
|
379
379
|
|
380
380
|
# Creates getter- and setter- methods for each property supported by the resource type.
|
@@ -446,7 +446,7 @@ class Puppet::Provider
|
|
446
446
|
klass = param
|
447
447
|
else
|
448
448
|
unless klass = resource_type.attrclass(param)
|
449
|
-
raise Puppet::DevError, "'
|
449
|
+
raise Puppet::DevError, _("'%{parameter_name}' is not a valid parameter for %{resource_type}") % { parameter_name: param, resource_type: resource_type.name }
|
450
450
|
end
|
451
451
|
end
|
452
452
|
return true unless features = klass.required_features
|
@@ -530,7 +530,7 @@ class Puppet::Provider
|
|
530
530
|
elsif self.resource
|
531
531
|
resource.name
|
532
532
|
else
|
533
|
-
raise Puppet::DevError, "No resource and no name in property hash in
|
533
|
+
raise Puppet::DevError, _("No resource and no name in property hash in %{class_name} instance") % { class_name: self.class.name }
|
534
534
|
end
|
535
535
|
end
|
536
536
|
|
@@ -98,8 +98,10 @@ Puppet::Type.type(:group).provide :aix, :parent => Puppet::Provider::AixObject d
|
|
98
98
|
def get_arguments(key, value, mapping, objectinfo)
|
99
99
|
# In the case of attributes, return a list of key=value
|
100
100
|
if key == :attributes
|
101
|
-
|
102
|
-
|
101
|
+
unless value and value.is_a? Hash
|
102
|
+
raise Puppet::Error, _("Attributes must be a list of pairs key=value on %{resource}[%{name}]") %
|
103
|
+
{ resource: @resource.class.name, name: @resource.name }
|
104
|
+
end
|
103
105
|
return value.select { |k,v| true }.map { |pair| pair.join("=") }
|
104
106
|
end
|
105
107
|
super(key, value, mapping, objectinfo)
|
data/lib/puppet/provider/ldap.rb
CHANGED
@@ -74,8 +74,8 @@ class Puppet::Provider::Ldap < Puppet::Provider
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def initialize(*args)
|
77
|
-
raise(Puppet::DevError, "No LDAP Configuration defined for
|
78
|
-
raise(Puppet::DevError, "Invalid LDAP Configuration defined for
|
77
|
+
raise(Puppet::DevError, _("No LDAP Configuration defined for %{class_name}") % { class_name: self.class }) unless self.class.manager
|
78
|
+
raise(Puppet::DevError, _("Invalid LDAP Configuration defined for %{class_name}") % { class_name: self.class }) unless self.class.manager.valid?
|
79
79
|
super
|
80
80
|
|
81
81
|
@property_hash = @property_hash.inject({}) do |result, ary|
|
@@ -10,7 +10,7 @@ class Puppet::Provider::Naginator < Puppet::Provider::ParsedFile
|
|
10
10
|
unless @nagios_type
|
11
11
|
name = resource_type.name.to_s.sub(/^nagios_/, '')
|
12
12
|
unless @nagios_type = Nagios::Base.type(name.to_sym)
|
13
|
-
raise Puppet::DevError, "Could not find nagios type '
|
13
|
+
raise Puppet::DevError, _("Could not find nagios type '%{name}'") % { name: name }
|
14
14
|
end
|
15
15
|
|
16
16
|
# And add our 'ensure' settings, since they aren't a part of
|
@@ -41,7 +41,9 @@ class Puppet::Provider::NameService < Puppet::Provider
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def options(name, hash)
|
44
|
-
|
44
|
+
unless resource_type.valid_parameter?(name)
|
45
|
+
raise Puppet::DevError, _("%{name} is not a valid attribute for %{resource_type}") % { name: name, resource_type: resource_type.name }
|
46
|
+
end
|
45
47
|
@options ||= {}
|
46
48
|
@options[name] ||= {}
|
47
49
|
|
@@ -115,7 +117,7 @@ class Puppet::Provider::NameService < Puppet::Provider
|
|
115
117
|
end
|
116
118
|
|
117
119
|
# Autogenerate a value. Mostly used for uid/gid, but also used heavily
|
118
|
-
# with DirectoryServices
|
120
|
+
# with DirectoryServices
|
119
121
|
def autogen(field)
|
120
122
|
field = field.intern
|
121
123
|
id_generators = {:user => :uid, :group => :gid}
|
@@ -141,7 +143,8 @@ class Puppet::Provider::NameService < Puppet::Provider
|
|
141
143
|
when :user; database = :passwd; method = :uid
|
142
144
|
when :group; database = :group; method = :gid
|
143
145
|
else
|
144
|
-
|
146
|
+
#TRANSLATORS "autogen_id()" is a method name and should not be translated
|
147
|
+
raise Puppet::DevError, _("autogen_id() does not support auto generation of id for resource type %{resource_type}") % { resource_type: resource_type }
|
145
148
|
end
|
146
149
|
|
147
150
|
# Initialize from the data set, if needed.
|
@@ -291,7 +294,7 @@ class Puppet::Provider::NameService < Puppet::Provider
|
|
291
294
|
def set(param, value)
|
292
295
|
self.class.validate(param, value)
|
293
296
|
cmd = modifycmd(param, munge(param, value))
|
294
|
-
raise Puppet::DevError, "Nameservice command must be an array" unless cmd.is_a?(Array)
|
297
|
+
raise Puppet::DevError, _("Nameservice command must be an array") unless cmd.is_a?(Array)
|
295
298
|
begin
|
296
299
|
execute(cmd)
|
297
300
|
rescue Puppet::ExecutionFailure => detail
|
@@ -196,8 +196,9 @@ class Puppet::Provider::NameService::DirectoryService < Puppet::Provider::NameSe
|
|
196
196
|
# zeroes. If someone attempts to use a password hash that worked with
|
197
197
|
# a previous version of OS X, we will fail early and warn them.
|
198
198
|
if password_hash.length != 136
|
199
|
-
|
200
|
-
|
199
|
+
#TRANSLATORS 'OS X 10.7' is an operating system and should not be translated, 'Salted SHA512' is the name of a hashing algorithm
|
200
|
+
fail(_("OS X 10.7 requires a Salted SHA512 hash password of 136 characters.") +
|
201
|
+
' ' + _("Please check your password and try again."))
|
201
202
|
end
|
202
203
|
|
203
204
|
plist_file = "#{users_plist_dir}/#{resource_name}.plist"
|
@@ -372,7 +373,7 @@ class Puppet::Provider::NameService::DirectoryService < Puppet::Provider::NameSe
|
|
372
373
|
# expects to be returned by addcmd. Thus we don't bother defining addcmd.
|
373
374
|
def create
|
374
375
|
if exists?
|
375
|
-
info "already exists"
|
376
|
+
info _("already exists")
|
376
377
|
return nil
|
377
378
|
end
|
378
379
|
|
@@ -136,7 +136,7 @@ Puppet::Type.type(:package).provide :aix, :parent => Puppet::Provider::Package d
|
|
136
136
|
unless upd.nil?
|
137
137
|
return "#{upd[:version]}"
|
138
138
|
else
|
139
|
-
raise Puppet::DevError, "Tried to get latest on a missing package" if properties[:ensure] == :absent
|
139
|
+
raise Puppet::DevError, _("Tried to get latest on a missing package") if properties[:ensure] == :absent
|
140
140
|
|
141
141
|
return properties[:ensure]
|
142
142
|
end
|
@@ -97,14 +97,13 @@ Puppet::Type.type(:package).provide :nim, :parent => :aix, :source => :aix do
|
|
97
97
|
end
|
98
98
|
|
99
99
|
if (package_type == nil)
|
100
|
-
|
101
|
-
errmsg =
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
errmsg << "on lpp_source '#{source}'"
|
100
|
+
|
101
|
+
errmsg = if version_specified
|
102
|
+
_("Unable to find package '%{package}' with version '%{version}' on lpp_source '%{source}'") %
|
103
|
+
{ package: pkg, version: version, source: source }
|
104
|
+
else
|
105
|
+
_("Unable to find package '%{package}' on lpp_source '%{source}'") % { package: pkg, source: source }
|
106
|
+
end
|
108
107
|
self.fail errmsg
|
109
108
|
end
|
110
109
|
|
@@ -43,7 +43,8 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
43
43
|
when '-'
|
44
44
|
{:status => 'known'}
|
45
45
|
else
|
46
|
-
raise ArgumentError, _('Unknown format %
|
46
|
+
raise ArgumentError, _('Unknown format %{resource_name}: %{full_flags}[%{bad_flag}]') %
|
47
|
+
{ resource_name: self.name, full_flags: flags, bad_flag: flags[0..0] }
|
47
48
|
end
|
48
49
|
).merge(
|
49
50
|
case flags[1..1]
|
@@ -52,7 +53,8 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
52
53
|
when '-'
|
53
54
|
{}
|
54
55
|
else
|
55
|
-
raise ArgumentError, _('Unknown format %
|
56
|
+
raise ArgumentError, _('Unknown format %{resource_name}: %{full_flags}[%{bad_flag}]') %
|
57
|
+
{ resource_name: self.name, full_flags: flags, bad_flag: flags[1..1] }
|
56
58
|
end
|
57
59
|
)
|
58
60
|
end
|
@@ -82,7 +84,7 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
82
84
|
when /known/
|
83
85
|
{:status => 'known'}
|
84
86
|
else
|
85
|
-
raise ArgumentError, _('Unknown format %
|
87
|
+
raise ArgumentError, _('Unknown format %{resource_name}: %{state}') % { resource_name: self.name, state: state }
|
86
88
|
end
|
87
89
|
end
|
88
90
|
|
@@ -101,7 +103,7 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
101
103
|
{:publisher => $1, :name => $2, :ensure => $3}.merge pkg_state($4).merge(ufoxi_flag($5))
|
102
104
|
|
103
105
|
else
|
104
|
-
raise ArgumentError, _('Unknown line format %
|
106
|
+
raise ArgumentError, _('Unknown line format %{resource_name}: %{parse_line}') % { resource_name: self.name, parse_line: line }
|
105
107
|
end).merge({:provider => self.name})
|
106
108
|
end
|
107
109
|
|
@@ -161,7 +163,8 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
161
163
|
return false
|
162
164
|
end
|
163
165
|
}
|
164
|
-
raise Puppet::DevError, "No version of
|
166
|
+
raise Puppet::DevError, _("No version of %{name} matching %{should} is installable, even though the package is currently installed") %
|
167
|
+
{ name: name, should: should }
|
165
168
|
end
|
166
169
|
|
167
170
|
false
|
@@ -176,7 +179,7 @@ Puppet::Type.type(:package).provide :pkg, :parent => Puppet::Provider::Package d
|
|
176
179
|
# remove certificate expiration warnings from the output, but report them
|
177
180
|
cert_warnings = lines.select { |line| line =~ /^Certificate/ }
|
178
181
|
unless cert_warnings.empty?
|
179
|
-
Puppet.warning("pkg warning:
|
182
|
+
Puppet.warning(_("pkg warning: %{warnings}") % { warnings: cert_warnings.join(', ') })
|
180
183
|
end
|
181
184
|
|
182
185
|
lst = lines.select { |line| line !~ /^Certificate/ }.map { |line| self.class.parse_line(line) }
|
@@ -70,7 +70,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
|
|
70
70
|
if line =~ /\s*(\S+)\s+(\S+)\s+(.*)/
|
71
71
|
{ :alias => $1, :name => $2, :avail => $3 }
|
72
72
|
else
|
73
|
-
Puppet.warning _("Cannot match %
|
73
|
+
Puppet.warning _("Cannot match %{line}") % { line: line }
|
74
74
|
end
|
75
75
|
end.reject { |h| h.nil? }
|
76
76
|
end
|
@@ -88,7 +88,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
|
|
88
88
|
output = output.split("\n")
|
89
89
|
|
90
90
|
if output[-1] == "Not in catalog"
|
91
|
-
Puppet.warning _("Package not in pkgutil catalog: %
|
91
|
+
Puppet.warning _("Package not in pkgutil catalog: %{package}") % { package: hash[:justme] }
|
92
92
|
return nil
|
93
93
|
end
|
94
94
|
|
@@ -142,7 +142,7 @@ Puppet::Type.type(:package).provide :pkgutil, :parent => :sun, :source => :sun d
|
|
142
142
|
|
143
143
|
return hash
|
144
144
|
else
|
145
|
-
Puppet.warning _("Cannot match %
|
145
|
+
Puppet.warning _("Cannot match %{line}") % { line: line }
|
146
146
|
return nil
|
147
147
|
end
|
148
148
|
end
|
@@ -230,7 +230,7 @@ Puppet::Type.type(:package).provide :yum, :parent => :rpm, :source => :rpm do
|
|
230
230
|
else
|
231
231
|
# Yum didn't find updates, pretend the current version is the latest
|
232
232
|
version = properties[:ensure]
|
233
|
-
raise Puppet::DevError, "Tried to get latest on a missing package" if version == :absent || version == :purged
|
233
|
+
raise Puppet::DevError, _("Tried to get latest on a missing package") if version == :absent || version == :purged
|
234
234
|
return version
|
235
235
|
end
|
236
236
|
end
|
@@ -43,7 +43,7 @@ class Puppet::Provider::ParsedFile < Puppet::Provider
|
|
43
43
|
elsif klass = Puppet::Util::FileType.filetype(type)
|
44
44
|
@filetype = klass
|
45
45
|
else
|
46
|
-
raise ArgumentError, "Invalid filetype
|
46
|
+
raise ArgumentError, _("Invalid filetype %{type}") % { type: type }
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -277,7 +277,7 @@ class Puppet::Provider::ParsedFile < Puppet::Provider
|
|
277
277
|
|
278
278
|
target_records = prefetch_hook(target_records) if respond_to?(:prefetch_hook)
|
279
279
|
|
280
|
-
raise Puppet::DevError, "Prefetching
|
280
|
+
raise Puppet::DevError, _("Prefetching %{target} for provider %{name} returned nil") % { target: target, name: self.name } unless target_records
|
281
281
|
|
282
282
|
target_records
|
283
283
|
end
|
@@ -350,7 +350,7 @@ class Puppet::Provider::ParsedFile < Puppet::Provider
|
|
350
350
|
def self.targets(resources = nil)
|
351
351
|
targets = []
|
352
352
|
# First get the default target
|
353
|
-
raise Puppet::DevError, "Parsed Providers must define a default target" unless self.default_target
|
353
|
+
raise Puppet::DevError, _("Parsed Providers must define a default target") unless self.default_target
|
354
354
|
targets << self.default_target
|
355
355
|
|
356
356
|
# Then get each of the file objects
|
@@ -439,7 +439,7 @@ class Puppet::Provider::ParsedFile < Puppet::Provider
|
|
439
439
|
|
440
440
|
# Retrieve the current state from disk.
|
441
441
|
def prefetch
|
442
|
-
raise Puppet::DevError, "Somehow got told to prefetch with no resource set" unless @resource
|
442
|
+
raise Puppet::DevError, _("Somehow got told to prefetch with no resource set") unless @resource
|
443
443
|
self.class.prefetch(@resource[:name] => @resource)
|
444
444
|
end
|
445
445
|
|
@@ -118,11 +118,13 @@ Puppet::Type.type(:selmodule).provide(:semodule) do
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def selmodversion_loaded
|
121
|
-
|
121
|
+
selmod_output = []
|
122
|
+
selmodule_cmd = "#{command(:semodule)} --list"
|
122
123
|
begin
|
123
|
-
execpipe(
|
124
|
+
execpipe(selmodule_cmd) do |output|
|
124
125
|
output.each_line do |line|
|
125
126
|
line.chomp!
|
127
|
+
selmod_output << line
|
126
128
|
bits = line.split
|
127
129
|
if bits[0] == @resource[:name]
|
128
130
|
self.debug "load version #{bits[1]}"
|
@@ -131,7 +133,7 @@ Puppet::Type.type(:selmodule).provide(:semodule) do
|
|
131
133
|
end
|
132
134
|
end
|
133
135
|
rescue Puppet::ExecutionFailure
|
134
|
-
raise Puppet::ExecutionFailure, "Could not list policy modules:
|
136
|
+
raise Puppet::ExecutionFailure, _("Could not list policy modules: \"%{selmodule_command}\" failed with \"%{selmod_output}\"") % { selmodule_command: selmodule_cmd, selmod_output: selmod_output.join(' ') }
|
135
137
|
end
|
136
138
|
nil
|
137
139
|
end
|
@@ -171,7 +171,7 @@ Puppet::Type.type(:service).provide :init, :parent => :base do
|
|
171
171
|
|
172
172
|
def texecute(type, command, fof = true, squelch = false, combine = true)
|
173
173
|
if type == :start && Facter.value(:osfamily) == "Solaris"
|
174
|
-
command = ["/usr/bin/ctrun -l
|
174
|
+
command = ["/usr/bin/ctrun -l child", command].flatten.join(" ")
|
175
175
|
end
|
176
176
|
super(type, command, fof, squelch, combine)
|
177
177
|
end
|
@@ -141,8 +141,8 @@ Puppet::Type.type(:service).provide :launchd, :parent => :base do
|
|
141
141
|
if job.has_key?("Label")
|
142
142
|
@label_to_path_map[job["Label"]] = filepath
|
143
143
|
else
|
144
|
-
|
145
|
-
|
144
|
+
#TRANSLATORS 'plist' and label' should not be translated
|
145
|
+
Puppet.warning(_("The %{file} plist does not contain a 'label' key; Puppet is skipping it") % { file: filepath })
|
146
146
|
next
|
147
147
|
end
|
148
148
|
end
|
@@ -89,7 +89,8 @@ Puppet::Type.type(:service).provide :runit, :parent => :daemontools do
|
|
89
89
|
# Work around issue #4480
|
90
90
|
# runsvdir takes up to 5 seconds to recognize
|
91
91
|
# the symlink created by this call to enable
|
92
|
-
|
92
|
+
#TRANSLATORS 'runsvdir' is a linux service name and should not be translated
|
93
|
+
Puppet.info _("Waiting 5 seconds for runsvdir to discover service %{service}") % { service: self.service }
|
93
94
|
sleep 5
|
94
95
|
end
|
95
96
|
sv "start", self.service
|
@@ -107,6 +107,8 @@ Puppet::Type.type(:service).provide :smf, :parent => :base do
|
|
107
107
|
end
|
108
108
|
|
109
109
|
def stop
|
110
|
+
# Don't try to stop non-existing services (PUP-8167)
|
111
|
+
return if self.status == :absent
|
110
112
|
# Wait for the service to actually stop before returning.
|
111
113
|
super
|
112
114
|
self.wait('offline', 'disabled', 'uninitialized')
|
@@ -23,6 +23,7 @@ Puppet::Type.type(:service).provide :systemd, :parent => :base do
|
|
23
23
|
defaultfor :osfamily => :redhat, :operatingsystem => :fedora
|
24
24
|
defaultfor :osfamily => :suse
|
25
25
|
defaultfor :osfamily => :coreos
|
26
|
+
defaultfor :operatingsystem => :amazon, :operatingsystemmajrelease => ["2"]
|
26
27
|
defaultfor :operatingsystem => :debian, :operatingsystemmajrelease => ["8", "stretch/sid", "9", "buster/sid"]
|
27
28
|
defaultfor :operatingsystem => :ubuntu, :operatingsystemmajrelease => ["15.04","15.10","16.04","16.10"]
|
28
29
|
defaultfor :operatingsystem => :cumuluslinux, :operatingsystemmajrelease => ["3"]
|
@@ -12,7 +12,7 @@ Puppet::Type.type(:service).provide :upstart, :parent => :debian do
|
|
12
12
|
confine :any => [
|
13
13
|
Facter.value(:operatingsystem) == 'Ubuntu',
|
14
14
|
(Facter.value(:osfamily) == 'RedHat' and Facter.value(:operatingsystemrelease) =~ /^6\./),
|
15
|
-
Facter.value(:operatingsystem) == 'Amazon',
|
15
|
+
(Facter.value(:operatingsystem) == 'Amazon' and Facter.value(:operatingsystemmajrelease) =~ /\d{4}/),
|
16
16
|
Facter.value(:operatingsystem) == 'LinuxMint',
|
17
17
|
]
|
18
18
|
|
@@ -139,8 +139,10 @@ Puppet::Type.type(:user).provide :aix, :parent => Puppet::Provider::AixObject do
|
|
139
139
|
def get_arguments(key, value, mapping, objectinfo)
|
140
140
|
# In the case of attributes, return a list of key=vlaue
|
141
141
|
if key == :attributes
|
142
|
-
|
143
|
-
|
142
|
+
unless value and value.is_a? Hash
|
143
|
+
raise Puppet::Error, _("Attributes must be a list of pairs key=value on %{class_name}[%{resource_name}]") %
|
144
|
+
{ class_name: @resource.class.name, resource_name: @resource.name }
|
145
|
+
end
|
144
146
|
return value.map { |k,v| k.to_s.strip + "=" + v.to_s.strip}
|
145
147
|
end
|
146
148
|
|
@@ -169,9 +171,11 @@ Puppet::Type.type(:user).provide :aix, :parent => Puppet::Provider::AixObject do
|
|
169
171
|
def verify_group(value)
|
170
172
|
if value.is_a? Integer
|
171
173
|
groupname = groupname_by_id(value)
|
172
|
-
|
174
|
+
#TRANSLATORS 'AIX' is the name of the operating system and should not be translated
|
175
|
+
raise ArgumentError, _("AIX group must be a valid existing group") unless groupname
|
173
176
|
else
|
174
|
-
|
177
|
+
#TRANSLATORS 'AIX' is the name of the operating system and should not be translated
|
178
|
+
raise ArgumentError, _("AIX group must be a valid existing group") unless groupid_by_name(value)
|
175
179
|
groupname = value
|
176
180
|
end
|
177
181
|
groupname
|
@@ -207,8 +211,11 @@ Puppet::Type.type(:user).provide :aix, :parent => Puppet::Provider::AixObject do
|
|
207
211
|
#expiry_date = d.strftime("%Y-%m-%d")
|
208
212
|
expiry_date = "20#{$5}-#{$1}-#{$2}"
|
209
213
|
else
|
210
|
-
|
211
|
-
|
214
|
+
unless value == '0'
|
215
|
+
#TRANSLATORS 'AIX' is the name of an operating system and should not be translated
|
216
|
+
Puppet.warn(_("Could not convert AIX expires date '%{value}' on %{class_name}[%{resource_name}]") %
|
217
|
+
{ value: value, class_name: @resource.class.name, resource_name: @resource.name })
|
218
|
+
end
|
212
219
|
expiry_date = :absent
|
213
220
|
end
|
214
221
|
expiry_date
|
@@ -46,7 +46,8 @@ Puppet::Type.type(:user).provide :openbsd, :parent => :useradd do
|
|
46
46
|
begin
|
47
47
|
return unmunge(shadow_property, ent.send(method))
|
48
48
|
rescue => detail
|
49
|
-
|
49
|
+
#TRANSLATORS 'ruby-shadow' is a Ruby gem library
|
50
|
+
Puppet.warning _("ruby-shadow doesn't support %{method}") % { method: method }
|
50
51
|
end
|
51
52
|
end
|
52
53
|
end
|