puppet 7.1.0-universal-darwin → 7.3.0-universal-darwin
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -13
- data/lib/puppet/application/agent.rb +1 -0
- data/lib/puppet/application/apply.rb +3 -2
- data/lib/puppet/application/device.rb +1 -0
- data/lib/puppet/application/script.rb +1 -0
- data/lib/puppet/application.rb +10 -6
- data/lib/puppet/configurer.rb +16 -3
- data/lib/puppet/defaults.rb +5 -14
- data/lib/puppet/face/facts.rb +15 -1
- data/lib/puppet/file_serving/configuration/parser.rb +5 -2
- data/lib/puppet/module_tool/applications/installer.rb +48 -2
- data/lib/puppet/module_tool/errors/shared.rb +17 -2
- data/lib/puppet/network/formats.rb +67 -0
- data/lib/puppet/parser/ast/leaf.rb +3 -2
- data/lib/puppet/pops/evaluator/deferred_resolver.rb +5 -3
- data/lib/puppet/pops/model/ast_transformer.rb +1 -1
- data/lib/puppet/provider/package/apt.rb +4 -0
- data/lib/puppet/reference/configuration.rb +6 -5
- data/lib/puppet/settings/alias_setting.rb +37 -0
- data/lib/puppet/settings.rb +33 -28
- data/lib/puppet/util/autoload.rb +1 -8
- data/lib/puppet/util/posix.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +157 -141
- data/man/man5/puppet.conf.5 +6 -6
- data/man/man8/puppet-agent.8 +2 -2
- data/man/man8/puppet-apply.8 +2 -2
- data/man/man8/puppet-catalog.8 +1 -1
- data/man/man8/puppet-config.8 +1 -1
- data/man/man8/puppet-describe.8 +1 -1
- data/man/man8/puppet-device.8 +2 -2
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +5 -2
- data/man/man8/puppet-filebucket.8 +1 -1
- data/man/man8/puppet-generate.8 +1 -1
- data/man/man8/puppet-help.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-module.8 +1 -1
- data/man/man8/puppet-node.8 +1 -1
- data/man/man8/puppet-parser.8 +1 -1
- data/man/man8/puppet-plugin.8 +1 -1
- data/man/man8/puppet-report.8 +1 -1
- data/man/man8/puppet-resource.8 +1 -1
- data/man/man8/puppet-script.8 +2 -2
- data/man/man8/puppet-ssl.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/integration/application/agent/cached_deferred_catalog.json +91 -0
- data/spec/integration/application/agent_spec.rb +127 -3
- data/spec/integration/application/apply_spec.rb +19 -0
- data/spec/integration/defaults_spec.rb +0 -7
- data/spec/integration/indirector/file_content/file_server_spec.rb +0 -2
- data/spec/integration/indirector/file_metadata/file_server_spec.rb +0 -2
- data/spec/integration/resource/type_collection_spec.rb +2 -6
- data/spec/integration/transaction_spec.rb +4 -9
- data/spec/integration/util/windows/adsi_spec.rb +3 -1
- data/spec/integration/util/windows/registry_spec.rb +0 -10
- data/spec/spec_helper.rb +1 -4
- data/spec/unit/agent_spec.rb +8 -6
- data/spec/unit/application/agent_spec.rb +0 -1
- data/spec/unit/application/filebucket_spec.rb +0 -2
- data/spec/unit/application_spec.rb +17 -9
- data/spec/unit/confine/feature_spec.rb +1 -1
- data/spec/unit/confine_spec.rb +8 -2
- data/spec/unit/face/node_spec.rb +0 -11
- data/spec/unit/file_serving/configuration/parser_spec.rb +8 -1
- data/spec/unit/file_serving/metadata_spec.rb +3 -3
- data/spec/unit/file_serving/terminus_helper_spec.rb +11 -4
- data/spec/unit/forge/module_release_spec.rb +2 -7
- data/spec/unit/indirector/face_spec.rb +0 -1
- data/spec/unit/indirector/facts/facter_spec.rb +11 -5
- data/spec/unit/indirector/file_bucket_file/selector_spec.rb +26 -8
- data/spec/unit/indirector/indirection_spec.rb +8 -12
- data/spec/unit/indirector_spec.rb +2 -2
- data/spec/unit/module_tool/applications/installer_spec.rb +66 -0
- data/spec/unit/network/formats_spec.rb +41 -0
- data/spec/unit/network/http/api/indirected_routes_spec.rb +0 -4
- data/spec/unit/parser/compiler_spec.rb +3 -19
- data/spec/unit/parser/resource_spec.rb +14 -8
- data/spec/unit/pops/evaluator/deferred_resolver_spec.rb +20 -0
- data/spec/unit/property_spec.rb +1 -0
- data/spec/unit/provider/nameservice_spec.rb +66 -65
- data/spec/unit/provider/package/apt_spec.rb +4 -8
- data/spec/unit/provider/package/base_spec.rb +6 -5
- data/spec/unit/provider/package/pacman_spec.rb +18 -12
- data/spec/unit/provider/package/pip_spec.rb +6 -11
- data/spec/unit/provider/package/pkgdmg_spec.rb +0 -4
- data/spec/unit/provider/user/hpux_spec.rb +1 -1
- data/spec/unit/provider_spec.rb +6 -8
- data/spec/unit/resource/type_spec.rb +1 -1
- data/spec/unit/resource_spec.rb +11 -10
- data/spec/unit/settings_spec.rb +13 -6
- data/spec/unit/ssl/base_spec.rb +0 -1
- data/spec/unit/ssl/ssl_provider_spec.rb +5 -2
- data/spec/unit/transaction/additional_resource_generator_spec.rb +3 -7
- data/spec/unit/transaction/event_manager_spec.rb +14 -11
- data/spec/unit/transaction_spec.rb +13 -4
- data/spec/unit/type/file/content_spec.rb +0 -1
- data/spec/unit/type/file/selinux_spec.rb +0 -2
- data/spec/unit/type/file_spec.rb +0 -6
- data/spec/unit/type/group_spec.rb +13 -6
- data/spec/unit/type/resources_spec.rb +7 -7
- data/spec/unit/type/service_spec.rb +1 -1
- data/spec/unit/type/tidy_spec.rb +0 -1
- data/spec/unit/type_spec.rb +2 -2
- data/spec/unit/util/at_fork_spec.rb +2 -2
- data/spec/unit/util/autoload_spec.rb +5 -1
- data/spec/unit/util/backups_spec.rb +1 -2
- data/spec/unit/util/execution_spec.rb +15 -11
- data/spec/unit/util/inifile_spec.rb +6 -14
- data/spec/unit/util/log_spec.rb +8 -7
- data/spec/unit/util/logging_spec.rb +3 -3
- data/spec/unit/util/posix_spec.rb +16 -10
- data/spec/unit/util/selinux_spec.rb +76 -52
- data/spec/unit/util/suidmanager_spec.rb +44 -41
- data/spec/unit/util_spec.rb +13 -6
- metadata +7 -2
data/lib/puppet/settings.rb
CHANGED
@@ -34,6 +34,7 @@ class Puppet::Settings
|
|
34
34
|
require 'puppet/settings/server_list_setting'
|
35
35
|
require 'puppet/settings/http_extra_headers_setting'
|
36
36
|
require 'puppet/settings/certificate_revocation_setting'
|
37
|
+
require 'puppet/settings/alias_setting'
|
37
38
|
|
38
39
|
# local reference for convenience
|
39
40
|
PuppetOptionParser = Puppet::Util::CommandLine::PuppetOptionParser
|
@@ -388,19 +389,6 @@ class Puppet::Settings
|
|
388
389
|
call_hooks_deferred_to_application_initialization
|
389
390
|
issue_deprecations
|
390
391
|
|
391
|
-
run_mode = Puppet::Util::RunMode[self.preferred_run_mode]
|
392
|
-
if run_mode.agent? || run_mode.server?
|
393
|
-
if self.set_in_section?(:masterport, run_mode.name) && !self.set_in_section?(:serverport, run_mode.name)
|
394
|
-
self[:serverport] = self[:masterport]
|
395
|
-
elsif self.set_by_config?(:masterport) && !self.set_by_config?(:serverport)
|
396
|
-
self[:serverport] = self[:masterport]
|
397
|
-
elsif self.set_in_section?(:serverport, run_mode.name) && !self.set_in_section?(:masterport, run_mode.name)
|
398
|
-
self[:masterport] = self[:serverport]
|
399
|
-
elsif self.set_by_config?(:serverport) && !self.set_by_config?(:masterport)
|
400
|
-
self[:masterport] = self[:serverport]
|
401
|
-
end
|
402
|
-
end
|
403
|
-
|
404
392
|
REQUIRED_APP_SETTINGS.each do |key|
|
405
393
|
create_ancestors(Puppet[key])
|
406
394
|
end
|
@@ -747,7 +735,8 @@ class Puppet::Settings
|
|
747
735
|
:autosign => AutosignSetting,
|
748
736
|
:server_list => ServerListSetting,
|
749
737
|
:http_extra_headers => HttpExtraHeadersSetting,
|
750
|
-
:certificate_revocation => CertificateRevocationSetting
|
738
|
+
:certificate_revocation => CertificateRevocationSetting,
|
739
|
+
:alias => AliasSetting
|
751
740
|
}
|
752
741
|
|
753
742
|
# Create a new setting. The value is passed in because it's used to determine
|
@@ -1285,27 +1274,37 @@ Generated on #{Time.now}.
|
|
1285
1274
|
end
|
1286
1275
|
|
1287
1276
|
def add_environment_resources(catalog, sections)
|
1288
|
-
path = self[:environmentpath]
|
1289
|
-
envdir = path.split(File::PATH_SEPARATOR).first if path
|
1290
1277
|
configured_environment = self[:environment]
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1278
|
+
|
1279
|
+
if configured_environment == "production" && !production_environment_exists?
|
1280
|
+
environment_path = self[:environmentpath]
|
1281
|
+
first_environment_path = environment_path.split(File::PATH_SEPARATOR).first
|
1282
|
+
|
1283
|
+
if Puppet::FileSystem.exist?(first_environment_path)
|
1284
|
+
production_environment_path = File.join(first_environment_path, configured_environment)
|
1296
1285
|
parameters = { :ensure => 'directory' }
|
1297
|
-
|
1298
|
-
|
1299
|
-
if
|
1300
|
-
|
1301
|
-
parameters[:group] = Puppet[:group] if service_group_available?
|
1302
|
-
end
|
1286
|
+
parameters[:mode] = '0750'
|
1287
|
+
if Puppet.features.root?
|
1288
|
+
parameters[:owner] = Puppet[:user] if service_user_available?
|
1289
|
+
parameters[:group] = Puppet[:group] if service_group_available?
|
1303
1290
|
end
|
1304
|
-
catalog.add_resource(Puppet::Resource.new(:file,
|
1291
|
+
catalog.add_resource(Puppet::Resource.new(:file, production_environment_path, :parameters => parameters))
|
1305
1292
|
end
|
1306
1293
|
end
|
1307
1294
|
end
|
1308
1295
|
|
1296
|
+
def production_environment_exists?
|
1297
|
+
environment_path = self[:environmentpath]
|
1298
|
+
paths = environment_path.split(File::PATH_SEPARATOR)
|
1299
|
+
|
1300
|
+
paths.any? do |path|
|
1301
|
+
# If expected_path is a symlink, assume the source path is being managed
|
1302
|
+
# elsewhere, so accept it also as a valid production environment path
|
1303
|
+
expected_path = File.join(path, 'production')
|
1304
|
+
Puppet::FileSystem.directory?(expected_path) || Puppet::FileSystem.symlink?(expected_path)
|
1305
|
+
end
|
1306
|
+
end
|
1307
|
+
|
1309
1308
|
def add_user_resources(catalog, sections)
|
1310
1309
|
return unless Puppet.features.root?
|
1311
1310
|
return if Puppet::Util::Platform.windows?
|
@@ -1406,6 +1405,12 @@ Generated on #{Time.now}.
|
|
1406
1405
|
end
|
1407
1406
|
end
|
1408
1407
|
|
1408
|
+
setting = @defaults[name]
|
1409
|
+
if setting.respond_to?(:alias_name)
|
1410
|
+
val = lookup(setting.alias_name)
|
1411
|
+
return val if val
|
1412
|
+
end
|
1413
|
+
|
1409
1414
|
@defaults[name].default
|
1410
1415
|
end
|
1411
1416
|
|
data/lib/puppet/util/autoload.rb
CHANGED
@@ -166,14 +166,7 @@ class Puppet::Util::Autoload
|
|
166
166
|
# Normalize a path. This converts ALT_SEPARATOR to SEPARATOR on Windows
|
167
167
|
# and eliminates unnecessary parts of a path.
|
168
168
|
def cleanpath(path)
|
169
|
-
|
170
|
-
# paths correctly on windows (c:\ and c:/ are treated as distinct) but
|
171
|
-
# we don't want to convert relative paths to absolute
|
172
|
-
if Puppet::Util.absolute_path?(path)
|
173
|
-
File.expand_path(path)
|
174
|
-
else
|
175
|
-
Pathname.new(path).cleanpath.to_s
|
176
|
-
end
|
169
|
+
Pathname.new(path).cleanpath.to_s
|
177
170
|
end
|
178
171
|
end
|
179
172
|
|
data/lib/puppet/util/posix.rb
CHANGED
data/lib/puppet/version.rb
CHANGED