puppet 6.12.0-x64-mingw32 → 6.13.0-x64-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.
- checksums.yaml +4 -4
- data/Gemfile.lock +12 -12
- data/README.md +1 -1
- data/ext/project_data.yaml +1 -1
- data/lib/puppet.rb +22 -7
- data/lib/puppet/application/resource.rb +1 -1
- data/lib/puppet/configurer.rb +8 -13
- data/lib/puppet/defaults.rb +83 -49
- data/lib/puppet/environments.rb +26 -18
- data/lib/puppet/face/facts.rb +8 -5
- data/lib/puppet/file_system/memory_file.rb +6 -0
- data/lib/puppet/file_system/memory_impl.rb +13 -0
- data/lib/puppet/file_system/windows.rb +7 -10
- data/lib/puppet/http.rb +2 -0
- data/lib/puppet/http/client.rb +30 -0
- data/lib/puppet/http/errors.rb +2 -0
- data/lib/puppet/http/service.rb +61 -2
- data/lib/puppet/http/service/compiler.rb +86 -0
- data/lib/puppet/http/service/file_server.rb +85 -0
- data/lib/puppet/http/service/report.rb +4 -8
- data/lib/puppet/http/session.rb +8 -1
- data/lib/puppet/indirector/catalog/compiler.rb +10 -0
- data/lib/puppet/indirector/file_bucket_file/file.rb +1 -1
- data/lib/puppet/indirector/json.rb +1 -1
- data/lib/puppet/indirector/msgpack.rb +1 -1
- data/lib/puppet/network/http/connection.rb +4 -0
- data/lib/puppet/network/http/nocache_pool.rb +1 -0
- data/lib/puppet/network/http/pool.rb +5 -1
- data/lib/puppet/parser/ast/pops_bridge.rb +6 -11
- data/lib/puppet/pops/evaluator/access_operator.rb +2 -2
- data/lib/puppet/pops/evaluator/evaluator_impl.rb +1 -1
- data/lib/puppet/pops/loader/puppet_plan_instantiator.rb +12 -3
- data/lib/puppet/pops/parser/evaluating_parser.rb +5 -7
- data/lib/puppet/pops/types/p_object_type_extension.rb +10 -0
- data/lib/puppet/pops/types/type_calculator.rb +24 -0
- data/lib/puppet/pops/validation/checker4_0.rb +1 -1
- data/lib/puppet/pops/validation/tasks_checker.rb +5 -1
- data/lib/puppet/provider/aix_object.rb +4 -2
- data/lib/puppet/provider/group/aix.rb +1 -0
- data/lib/puppet/provider/group/groupadd.rb +52 -24
- data/lib/puppet/provider/package/apt.rb +14 -3
- data/lib/puppet/provider/package/dnfmodule.rb +9 -2
- data/lib/puppet/provider/package/dpkg.rb +14 -7
- data/lib/puppet/provider/package/fink.rb +20 -3
- data/lib/puppet/provider/package/openbsd.rb +13 -1
- data/lib/puppet/provider/package/pkg.rb +18 -5
- data/lib/puppet/provider/package/yum.rb +9 -5
- data/lib/puppet/provider/user/aix.rb +1 -0
- data/lib/puppet/provider/user/directoryservice.rb +30 -5
- data/lib/puppet/provider/user/useradd.rb +6 -7
- data/lib/puppet/reports/store.rb +1 -1
- data/lib/puppet/settings.rb +2 -0
- data/lib/puppet/ssl/certificate.rb +2 -1
- data/lib/puppet/test/test_helper.rb +4 -0
- data/lib/puppet/transaction/resource_harness.rb +1 -1
- data/lib/puppet/type/group.rb +2 -2
- data/lib/puppet/type/package.rb +63 -9
- data/lib/puppet/type/user.rb +2 -2
- data/lib/puppet/util/log/destinations.rb +1 -1
- data/lib/puppet/util/pidlock.rb +26 -6
- data/lib/puppet/util/plist.rb +6 -0
- data/lib/puppet/util/storage.rb +0 -1
- data/lib/puppet/util/yaml.rb +1 -1
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +127 -115
- data/man/man5/puppet.conf.5 +21 -7
- data/man/man8/puppet-agent.8 +1 -1
- data/man/man8/puppet-apply.8 +1 -1
- 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 +1 -1
- data/man/man8/puppet-doc.8 +1 -1
- data/man/man8/puppet-epp.8 +1 -1
- data/man/man8/puppet-facts.8 +1 -1
- 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-key.8 +1 -1
- data/man/man8/puppet-lookup.8 +1 -1
- data/man/man8/puppet-man.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 +1 -1
- data/man/man8/puppet-ssl.8 +1 -1
- data/man/man8/puppet-status.8 +1 -1
- data/man/man8/puppet.8 +2 -2
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_md5/should_fetch_if_not_on_the_local_disk.yml +0 -35
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_md5/should_not_update_if_content_on_disk_is_up-to-date.yml +0 -37
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_md5/should_update_if_content_differs_on_disk.yml +0 -37
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_fetch_if_mtime_is_older_on_disk.yml +0 -35
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_fetch_if_no_header_specified.yml +0 -33
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_fetch_if_not_on_the_local_disk.yml +0 -35
- data/spec/fixtures/vcr/cassettes/Puppet_Type_File/when_sourcing/from_http/using_mtime/should_not_update_if_mtime_is_newer_on_disk.yml +0 -35
- data/spec/integration/configurer_spec.rb +26 -7
- data/spec/integration/indirector/facts/facter_spec.rb +4 -0
- data/spec/unit/application/apply_spec.rb +2 -12
- data/spec/unit/application/resource_spec.rb +2 -2
- data/spec/unit/configurer/fact_handler_spec.rb +0 -4
- data/spec/unit/configurer_spec.rb +0 -3
- data/spec/unit/defaults_spec.rb +1 -1
- data/spec/unit/environments_spec.rb +57 -28
- data/spec/unit/face/facts_spec.rb +24 -20
- data/spec/unit/file_system_spec.rb +16 -2
- data/spec/unit/http/client_spec.rb +6 -0
- data/spec/unit/http/service/compiler_spec.rb +322 -0
- data/spec/unit/http/service/file_server_spec.rb +219 -0
- data/spec/unit/http/service/report_spec.rb +8 -1
- data/spec/unit/http/service_spec.rb +4 -0
- data/spec/unit/http/session_spec.rb +31 -0
- data/spec/unit/indirector/catalog/compiler_spec.rb +46 -29
- data/spec/unit/network/http/connection_spec.rb +23 -1
- data/spec/unit/network/http/nocache_pool_spec.rb +3 -3
- data/spec/unit/network/http/pool_spec.rb +32 -0
- data/spec/unit/node/facts_spec.rb +2 -1
- data/spec/unit/node_spec.rb +7 -4
- data/spec/unit/pops/serialization/to_from_hr_spec.rb +6 -1
- data/spec/unit/pops/validator/validator_spec.rb +7 -2
- data/spec/unit/provider/aix_object_spec.rb +16 -2
- data/spec/unit/provider/group/groupadd_spec.rb +167 -56
- data/spec/unit/provider/package/apt_spec.rb +13 -2
- data/spec/unit/provider/package/aptitude_spec.rb +1 -0
- data/spec/unit/provider/package/dnfmodule_spec.rb +22 -0
- data/spec/unit/provider/package/dpkg_spec.rb +28 -6
- data/spec/unit/provider/package/openbsd_spec.rb +17 -0
- data/spec/unit/provider/package/pkg_spec.rb +15 -1
- data/spec/unit/provider/package/yum_spec.rb +50 -0
- data/spec/unit/provider/user/directoryservice_spec.rb +41 -0
- data/spec/unit/provider/user/useradd_spec.rb +13 -8
- data/spec/unit/puppet_pal_2pec.rb +3 -0
- data/spec/unit/puppet_pal_catalog_spec.rb +3 -0
- data/spec/unit/puppet_spec.rb +14 -0
- data/spec/unit/ssl/certificate_spec.rb +7 -0
- data/spec/unit/transaction/persistence_spec.rb +1 -10
- data/spec/unit/type/package_spec.rb +8 -0
- data/spec/unit/type/user_spec.rb +0 -1
- data/spec/unit/util/pidlock_spec.rb +38 -16
- data/spec/unit/util/plist_spec.rb +20 -0
- data/spec/unit/util/storage_spec.rb +1 -8
- metadata +10 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1e3a02efdd22656cfbfbdae414dee639f1cec2fb95967d2bb782b80c7e65c68
|
4
|
+
data.tar.gz: 4ac12d09f45387a22ec14258f764ad1616c414ff25f2dc0a3a85e46836fcbc2d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba0bdbb0b5cc1a80fdb3c22d17562c625bf156e30b2b9c56291f91ff5abe20aee38d2c8cf837859186ac0719d81701f4bbd30c8c524ddb1c282a924a12deeaf9
|
7
|
+
data.tar.gz: 2a0c70f7202adc5a8bfa889002dc5ed2a660531cd1741d0dd28bcd3e5e4c3b1a56c096b3c1c956ae8af914899c39b2ade7d72d93e8ffc3464d1b05b79bf42186
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
puppet (6.
|
4
|
+
puppet (6.13.0)
|
5
5
|
CFPropertyList (~> 2.2)
|
6
6
|
concurrent-ruby (~> 1.0)
|
7
7
|
deep_merge (~> 1.0)
|
8
|
-
facter (>= 2.4.0, <
|
8
|
+
facter (>= 2.4.0, < 5)
|
9
9
|
fast_gettext (~> 1.1)
|
10
10
|
hiera (>= 3.2.1, < 4)
|
11
11
|
httpclient (~> 2.8)
|
@@ -22,14 +22,14 @@ GEM
|
|
22
22
|
artifactory (2.8.2)
|
23
23
|
ast (2.4.0)
|
24
24
|
coderay (1.1.2)
|
25
|
-
concurrent-ruby (1.1.
|
25
|
+
concurrent-ruby (1.1.6)
|
26
26
|
crack (0.4.3)
|
27
27
|
safe_yaml (~> 1.0.0)
|
28
28
|
csv (3.1.2)
|
29
29
|
deep_merge (1.2.1)
|
30
30
|
diff-lcs (1.3)
|
31
31
|
docopt (0.6.1)
|
32
|
-
facter (2.5.
|
32
|
+
facter (2.5.7)
|
33
33
|
fast_gettext (1.1.2)
|
34
34
|
gettext (3.2.9)
|
35
35
|
locale (>= 2.0.5)
|
@@ -40,7 +40,7 @@ GEM
|
|
40
40
|
locale
|
41
41
|
hashdiff (1.0.0)
|
42
42
|
hiera (3.6.0)
|
43
|
-
hiera-eyaml (3.
|
43
|
+
hiera-eyaml (3.2.0)
|
44
44
|
highline (~> 1.6.19)
|
45
45
|
optimist
|
46
46
|
highline (1.6.21)
|
@@ -49,15 +49,15 @@ GEM
|
|
49
49
|
httpclient (2.8.3)
|
50
50
|
json-schema (2.8.1)
|
51
51
|
addressable (>= 2.4)
|
52
|
-
locale (2.1.
|
52
|
+
locale (2.1.3)
|
53
53
|
memory_profiler (0.9.14)
|
54
54
|
method_source (0.9.2)
|
55
55
|
minitar (0.9)
|
56
|
-
msgpack (1.3.
|
56
|
+
msgpack (1.3.3)
|
57
57
|
multi_json (1.14.1)
|
58
58
|
mustache (1.1.1)
|
59
59
|
optimist (3.0.0)
|
60
|
-
packaging (0.99.
|
60
|
+
packaging (0.99.56)
|
61
61
|
artifactory (~> 2)
|
62
62
|
rake (>= 12.3)
|
63
63
|
release-metrics
|
@@ -111,14 +111,14 @@ GEM
|
|
111
111
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
112
112
|
rubocop-i18n (1.2.0)
|
113
113
|
rubocop (~> 0.49.0)
|
114
|
-
ruby-prof (1.
|
114
|
+
ruby-prof (1.2.0)
|
115
115
|
ruby-progressbar (1.10.1)
|
116
116
|
safe_yaml (1.0.5)
|
117
117
|
semantic_puppet (1.0.2)
|
118
118
|
text (1.3.1)
|
119
|
-
unicode-display_width (1.6.
|
120
|
-
vcr (5.
|
121
|
-
webmock (3.
|
119
|
+
unicode-display_width (1.6.1)
|
120
|
+
vcr (5.1.0)
|
121
|
+
webmock (3.8.2)
|
122
122
|
addressable (>= 2.3.6)
|
123
123
|
crack (>= 0.3.2)
|
124
124
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Puppet
|
2
2
|
======
|
3
3
|
|
4
|
-
[![Travis Status](https://travis-ci.
|
4
|
+
[![Travis Status](https://travis-ci.com/puppetlabs/puppet.svg?branch=master)](https://travis-ci.com/puppetlabs/puppet)
|
5
5
|
[![Appveyor Status](https://ci.appveyor.com/api/projects/status/cvhpypd4504sevqq/branch/master?svg=true)](https://ci.appveyor.com/project/puppetlabs/puppet/branch/master)
|
6
6
|
[![Gem Version](https://badge.fury.io/rb/puppet.svg)](https://badge.fury.io/rb/puppet)
|
7
7
|
[![Inline docs](https://inch-ci.org/github/puppetlabs/puppet.svg)](https://inch-ci.org/github/puppetlabs/puppet)
|
data/ext/project_data.yaml
CHANGED
@@ -17,7 +17,7 @@ gem_forge_project: 'puppet'
|
|
17
17
|
gem_required_ruby_version: '>= 2.3.0'
|
18
18
|
gem_required_rubygems_version: '> 1.3.1'
|
19
19
|
gem_runtime_dependencies:
|
20
|
-
facter: ['> 2.0.1', '<
|
20
|
+
facter: ['> 2.0.1', '< 5']
|
21
21
|
hiera: ['>= 3.2.1', '< 4']
|
22
22
|
semantic_puppet: '~> 1.0'
|
23
23
|
fast_gettext: '~> 1.1'
|
data/lib/puppet.rb
CHANGED
@@ -22,6 +22,7 @@ require 'puppet/external/pson/common'
|
|
22
22
|
require 'puppet/external/pson/version'
|
23
23
|
require 'puppet/external/pson/pure'
|
24
24
|
require 'puppet/gettext/config'
|
25
|
+
require 'puppet/defaults'
|
25
26
|
|
26
27
|
|
27
28
|
#------------------------------------------------------------
|
@@ -60,6 +61,14 @@ module Puppet
|
|
60
61
|
@@settings
|
61
62
|
end
|
62
63
|
|
64
|
+
# The puppetserver project has its own settings class that is thread-aware; this
|
65
|
+
# method is here to allow the puppetserver to define its own custom settings class
|
66
|
+
# for multithreaded puppet. It is not intended for use outside of the puppetserver
|
67
|
+
# implmentation.
|
68
|
+
def self.replace_settings_object(new_settings)
|
69
|
+
@@settings = new_settings
|
70
|
+
end
|
71
|
+
|
63
72
|
# Get the value for a setting
|
64
73
|
#
|
65
74
|
# @param [Symbol] param the setting to retrieve
|
@@ -87,6 +96,7 @@ module Puppet
|
|
87
96
|
|
88
97
|
# Store a new default value.
|
89
98
|
def self.define_settings(section, hash)
|
99
|
+
Puppet.deprecation_warning('The method Puppet.define_settings is deprecated and will be removed in a future release')
|
90
100
|
@@settings.define_settings(section, hash)
|
91
101
|
end
|
92
102
|
|
@@ -121,8 +131,9 @@ module Puppet
|
|
121
131
|
Puppet::Util::RunMode[@@settings.preferred_run_mode]
|
122
132
|
end
|
123
133
|
|
124
|
-
#
|
125
|
-
|
134
|
+
# Modify the settings with defaults defined in `initialize_default_settings` method in puppet/defaults.rb. This can
|
135
|
+
# be used in the initialization of new Puppet::Settings objects in the puppetserver project.
|
136
|
+
Puppet.initialize_default_settings!(settings)
|
126
137
|
|
127
138
|
# Now that settings are loaded we have the code loaded to be able to issue
|
128
139
|
# deprecation warnings. Warn if we're on a deprecated ruby version.
|
@@ -137,19 +148,23 @@ module Puppet
|
|
137
148
|
#
|
138
149
|
# @api public
|
139
150
|
# @param args [Array<String>] the command line arguments to use for initialization
|
151
|
+
# @param require_config [Boolean] controls loading of Puppet configuration files
|
152
|
+
# @param global_settings [Boolean] controls push to global context after settings object initialization
|
140
153
|
# @return [void]
|
141
|
-
def self.initialize_settings(args = [], require_config = true)
|
142
|
-
do_initialize_settings_for_run_mode(:user, args, require_config)
|
154
|
+
def self.initialize_settings(args = [], require_config = true, push_settings_globally = true)
|
155
|
+
do_initialize_settings_for_run_mode(:user, args, require_config, push_settings_globally)
|
143
156
|
end
|
144
157
|
|
145
158
|
# private helper method to provide the implementation details of initializing for a run mode,
|
146
159
|
# but allowing us to control where the deprecation warning is issued
|
147
|
-
def self.do_initialize_settings_for_run_mode(run_mode, args, require_config = true)
|
160
|
+
def self.do_initialize_settings_for_run_mode(run_mode, args, require_config = true, push_settings_globally = true)
|
148
161
|
Puppet.settings.initialize_global_settings(args, require_config)
|
149
162
|
run_mode = Puppet::Util::RunMode[run_mode]
|
150
163
|
Puppet.settings.initialize_app_defaults(Puppet::Settings.app_defaults_for_run_mode(run_mode))
|
151
|
-
|
152
|
-
|
164
|
+
if push_settings_globally
|
165
|
+
push_context_global(Puppet.base_context(Puppet.settings), "Initial context after settings initialization")
|
166
|
+
Puppet::Parser::Functions.reset
|
167
|
+
end
|
153
168
|
end
|
154
169
|
private_class_method :do_initialize_settings_for_run_mode
|
155
170
|
|
data/lib/puppet/configurer.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
# The client for interacting with the puppetmaster config server.
|
2
|
-
require 'sync'
|
3
2
|
require 'timeout'
|
4
3
|
require 'puppet/network/http_pool'
|
5
4
|
require 'puppet/util'
|
@@ -468,21 +467,17 @@ class Puppet::Configurer
|
|
468
467
|
::Facter.clear
|
469
468
|
facts = find_facts
|
470
469
|
|
471
|
-
|
472
|
-
|
473
|
-
|
470
|
+
client = Puppet.runtime['http']
|
471
|
+
session = client.create_session
|
472
|
+
puppet = session.route_to(:puppet)
|
474
473
|
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
server: server})
|
474
|
+
Puppet.info(_("Uploading facts for %{node} to %{server}") % {
|
475
|
+
node: facts.name,
|
476
|
+
server: puppet.url.hostname})
|
479
477
|
|
480
|
-
|
478
|
+
puppet.put_facts(facts.name, facts: facts, environment: Puppet.lookup(:current_environment).name.to_s)
|
481
479
|
|
482
|
-
|
483
|
-
ensure
|
484
|
-
Puppet::Node::Facts.indirection.terminus_class = saved_fact_terminus
|
485
|
-
end
|
480
|
+
return true
|
486
481
|
rescue => detail
|
487
482
|
Puppet.log_exception(detail, _("Failed to submit facts: %{detail}") %
|
488
483
|
{ detail: detail })
|
data/lib/puppet/defaults.rb
CHANGED
@@ -65,26 +65,30 @@ module Puppet
|
|
65
65
|
|
66
66
|
AS_DURATION = %q{This setting can be a time interval in seconds (30 or 30s), minutes (30m), hours (6h), days (2d), or years (5y).}
|
67
67
|
|
68
|
-
|
69
|
-
|
68
|
+
# @api public
|
69
|
+
# @param args [Puppet::Settings] the settings object to define default settings for
|
70
|
+
# @return void
|
71
|
+
def self.initialize_default_settings!(settings)
|
72
|
+
settings.define_settings(:main,
|
73
|
+
:facterng => {
|
70
74
|
:default => false,
|
71
75
|
:type => :boolean,
|
72
76
|
:desc => 'Whether to enable a pre-Facter 4.0 release of Facter (distributed as
|
73
77
|
the "facter-ng" gem). This is not necessary if Facter 3.x or later is installed.
|
74
|
-
This setting is still experimental
|
78
|
+
This setting is still experimental.',
|
75
79
|
:hook => proc do |value|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
80
|
+
if value
|
81
|
+
begin
|
82
|
+
original_facter = Object.const_get(:Facter)
|
83
|
+
Object.send(:remove_const, :Facter)
|
84
|
+
require 'facter-ng'
|
85
|
+
rescue LoadError
|
86
|
+
Object.const_set(:Facter, original_facter)
|
87
|
+
raise ArgumentError, 'facter-ng could not be loaded'
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
},
|
88
92
|
:confdir => {
|
89
93
|
:default => nil,
|
90
94
|
:type => :directory,
|
@@ -121,7 +125,7 @@ module Puppet
|
|
121
125
|
}
|
122
126
|
)
|
123
127
|
|
124
|
-
define_settings(:main,
|
128
|
+
settings.define_settings(:main,
|
125
129
|
:logdir => {
|
126
130
|
:default => nil,
|
127
131
|
:type => :directory,
|
@@ -168,8 +172,8 @@ module Puppet
|
|
168
172
|
valid = %w[deprecations undefined_variables undefined_resources]
|
169
173
|
invalid = values - (values & valid)
|
170
174
|
if not invalid.empty?
|
171
|
-
raise ArgumentError, _("Cannot disable unrecognized warning types %{invalid}.") % { invalid: invalid.
|
172
|
-
' ' + _("Valid values are %{values}.") % { values: valid.
|
175
|
+
raise ArgumentError, _("Cannot disable unrecognized warning types '%{invalid}'.") % { invalid: invalid.join(',') } +
|
176
|
+
' ' + _("Valid values are '%{values}'.") % { values: valid.join(', ') }
|
173
177
|
end
|
174
178
|
end
|
175
179
|
},
|
@@ -225,7 +229,7 @@ module Puppet
|
|
225
229
|
}
|
226
230
|
)
|
227
231
|
|
228
|
-
define_settings(:main,
|
232
|
+
settings.define_settings(:main,
|
229
233
|
:priority => {
|
230
234
|
:default => nil,
|
231
235
|
:type => :priority,
|
@@ -263,6 +267,13 @@ module Puppet
|
|
263
267
|
major releases of Puppet. Should be used with caution, as in development
|
264
268
|
features are experimental and can have unexpected effects."
|
265
269
|
},
|
270
|
+
:versioned_environment_dirs => {
|
271
|
+
:default => false,
|
272
|
+
:type => :boolean,
|
273
|
+
:desc => "Whether or not to look for versioned environment directories,
|
274
|
+
symlinked from `$environmentpath/<environment>`. This is an experimental
|
275
|
+
feature and should be used with caution."
|
276
|
+
},
|
266
277
|
:static_catalogs => {
|
267
278
|
:default => true,
|
268
279
|
:type => :boolean,
|
@@ -541,12 +552,12 @@ module Puppet
|
|
541
552
|
:hiera_config => {
|
542
553
|
:default => lambda do
|
543
554
|
config = nil
|
544
|
-
codedir =
|
555
|
+
codedir = settings[:codedir]
|
545
556
|
if codedir.is_a?(String)
|
546
557
|
config = File.expand_path(File.join(codedir, 'hiera.yaml'))
|
547
558
|
config = nil unless Puppet::FileSystem.exist?(config)
|
548
559
|
end
|
549
|
-
config = File.expand_path(File.join(
|
560
|
+
config = File.expand_path(File.join(settings[:confdir], 'hiera.yaml')) if config.nil?
|
550
561
|
config
|
551
562
|
end,
|
552
563
|
:desc => "The hiera configuration file. Puppet only reads this file on startup, so you must restart the puppet master every time you edit it.",
|
@@ -610,7 +621,7 @@ module Puppet
|
|
610
621
|
:http_proxy_password =>{
|
611
622
|
:default => "none",
|
612
623
|
:hook => proc do |value|
|
613
|
-
if
|
624
|
+
if settings[:http_proxy_password] =~ /[@!# \/]/
|
614
625
|
raise "Passwords set in the http_proxy_password setting must be valid as part of a URL, and any reserved characters must be URL-encoded. We received: #{value}"
|
615
626
|
end
|
616
627
|
end,
|
@@ -754,7 +765,7 @@ API to expire the cache as needed
|
|
754
765
|
}
|
755
766
|
)
|
756
767
|
|
757
|
-
|
768
|
+
settings.define_settings(:module_tool,
|
758
769
|
:module_repository => {
|
759
770
|
:default => 'https://forgeapi.puppet.com',
|
760
771
|
:desc => "The module repository",
|
@@ -773,7 +784,7 @@ API to expire the cache as needed
|
|
773
784
|
}
|
774
785
|
)
|
775
786
|
|
776
|
-
|
787
|
+
settings.define_settings(
|
777
788
|
:main,
|
778
789
|
|
779
790
|
# We have to downcase the fqdn, because the current ssl stuff (as opposed to in master) doesn't have good facilities for
|
@@ -854,13 +865,17 @@ This is useful for embedding a pre-shared key for autosigning policy executables
|
|
854
865
|
("challenge password") OID.
|
855
866
|
|
856
867
|
Extension requests will be permanently embedded in the final certificate.
|
857
|
-
Extension OIDs must be in the "ppRegCertExt" (`1.3.6.1.4.1.34380.1.1`)
|
858
|
-
"ppPrivCertExt" (`1.3.6.1.4.1.34380.1.2`)
|
868
|
+
Extension OIDs must be in the "ppRegCertExt" (`1.3.6.1.4.1.34380.1.1`),
|
869
|
+
"ppPrivCertExt" (`1.3.6.1.4.1.34380.1.2`), or
|
870
|
+
"ppAuthCertExt" (`1.3.6.1.4.1.34380.1.3`) OID arcs. The ppRegCertExt arc is
|
859
871
|
reserved for four of the most common pieces of data to embed: `pp_uuid` (`.1`),
|
860
872
|
`pp_instance_id` (`.2`), `pp_image_name` (`.3`), and `pp_preshared_key` (`.4`)
|
861
873
|
--- in the YAML file, these can be referred to by their short descriptive names
|
862
874
|
instead of their full OID. The ppPrivCertExt arc is unregulated, and can be used
|
863
|
-
for site-specific extensions.
|
875
|
+
for site-specific extensions. The ppAuthCert arc is reserved for two pieces of
|
876
|
+
data to embed: `pp_authorization` (`.1`) and `pp_auth_role` (`.13`). As with
|
877
|
+
ppRegCertExt, in the YAML file, these can be referred to by their short
|
878
|
+
descriptive name instead of their full OID.
|
864
879
|
EOT
|
865
880
|
},
|
866
881
|
:certdir => {
|
@@ -1080,7 +1095,7 @@ EOT
|
|
1080
1095
|
}
|
1081
1096
|
)
|
1082
1097
|
|
1083
|
-
define_settings(
|
1098
|
+
settings.define_settings(
|
1084
1099
|
:ca,
|
1085
1100
|
:ca_name => {
|
1086
1101
|
:default => "Puppet CA: $certname",
|
@@ -1198,7 +1213,7 @@ EOT
|
|
1198
1213
|
|
1199
1214
|
# Define the config default.
|
1200
1215
|
|
1201
|
-
define_settings(:application,
|
1216
|
+
settings.define_settings(:application,
|
1202
1217
|
:config_file_name => {
|
1203
1218
|
:type => :string,
|
1204
1219
|
:default => Puppet::Settings.default_config_file_name,
|
@@ -1223,7 +1238,7 @@ EOT
|
|
1223
1238
|
},
|
1224
1239
|
)
|
1225
1240
|
|
1226
|
-
define_settings(:environment,
|
1241
|
+
settings.define_settings(:environment,
|
1227
1242
|
:manifest => {
|
1228
1243
|
:default => nil,
|
1229
1244
|
:type => :file_or_directory,
|
@@ -1266,7 +1281,7 @@ EOT
|
|
1266
1281
|
}
|
1267
1282
|
)
|
1268
1283
|
|
1269
|
-
define_settings(:master,
|
1284
|
+
settings.define_settings(:master,
|
1270
1285
|
:user => {
|
1271
1286
|
:default => "puppet",
|
1272
1287
|
:desc => "The user Puppet Server will run as. Used to ensure
|
@@ -1323,13 +1338,23 @@ EOT
|
|
1323
1338
|
overridden by more specific settings (see `ca_port`, `report_port`).",
|
1324
1339
|
},
|
1325
1340
|
:node_name => {
|
1326
|
-
:default =>
|
1341
|
+
:default => 'cert',
|
1342
|
+
:type => :enum,
|
1343
|
+
:values => ['cert', 'facter'],
|
1344
|
+
:deprecated => :completely,
|
1345
|
+
:hook => proc { |val|
|
1346
|
+
if val != 'cert'
|
1347
|
+
Puppet.deprecation_warning("The node_name setting is deprecated and will be removed in a future release.")
|
1348
|
+
end
|
1349
|
+
},
|
1327
1350
|
:desc => "How the puppet master determines the client's identity
|
1328
1351
|
and sets the 'hostname', 'fqdn' and 'domain' facts for use in the manifest,
|
1329
1352
|
in particular for determining which 'node' statement applies to the client.
|
1330
1353
|
Possible values are 'cert' (use the subject's CN in the client's
|
1331
1354
|
certificate) and 'facter' (use the hostname that the client
|
1332
|
-
reported in its facts)
|
1355
|
+
reported in its facts).
|
1356
|
+
|
1357
|
+
This setting is deprecated, please use explicit fact matching for classification.",
|
1333
1358
|
},
|
1334
1359
|
:bucketdir => {
|
1335
1360
|
:default => "$vardir/bucket",
|
@@ -1452,14 +1477,23 @@ EOT
|
|
1452
1477
|
:desc => "Where the fileserver configuration is stored.",
|
1453
1478
|
},
|
1454
1479
|
:strict_hostname_checking => {
|
1455
|
-
:default =>
|
1480
|
+
:default => true,
|
1481
|
+
:type => :boolean,
|
1456
1482
|
:desc => "Whether to only search for the complete
|
1457
|
-
|
1458
|
-
|
1483
|
+
hostname as it is in the certificate when searching for node information
|
1484
|
+
in the catalogs or to match dot delimited segments of the cert's certname
|
1485
|
+
and the hostname, fqdn, and/or domain facts.
|
1486
|
+
|
1487
|
+
This setting is deprecated and will be removed in a future release.",
|
1488
|
+
:hook => proc { |val|
|
1489
|
+
if val != true
|
1490
|
+
Puppet.deprecation_warning("Setting strict_hostname_checking to false is deprecated and will be removed in a future release. Please use regular expressions in your node declarations or explicit fact matching for classification (though be warned that fact based classification may be considered insecure).")
|
1491
|
+
end
|
1492
|
+
}
|
1459
1493
|
}
|
1460
1494
|
)
|
1461
1495
|
|
1462
|
-
define_settings(:device,
|
1496
|
+
settings.define_settings(:device,
|
1463
1497
|
:devicedir => {
|
1464
1498
|
:default => "$vardir/devices",
|
1465
1499
|
:type => :directory,
|
@@ -1474,7 +1508,7 @@ EOT
|
|
1474
1508
|
}
|
1475
1509
|
)
|
1476
1510
|
|
1477
|
-
define_settings(:agent,
|
1511
|
+
settings.define_settings(:agent,
|
1478
1512
|
:node_name_value => {
|
1479
1513
|
:default => "$certname",
|
1480
1514
|
:desc => "The explicit value used for the node name for all requests the agent
|
@@ -1827,7 +1861,7 @@ EOT
|
|
1827
1861
|
|
1828
1862
|
# Plugin information.
|
1829
1863
|
|
1830
|
-
define_settings(
|
1864
|
+
settings.define_settings(
|
1831
1865
|
:main,
|
1832
1866
|
:plugindest => {
|
1833
1867
|
:type => :directory,
|
@@ -1870,7 +1904,7 @@ EOT
|
|
1870
1904
|
|
1871
1905
|
# Central fact information.
|
1872
1906
|
|
1873
|
-
define_settings(
|
1907
|
+
settings.define_settings(
|
1874
1908
|
:main,
|
1875
1909
|
:factpath => {
|
1876
1910
|
:type => :path,
|
@@ -1887,7 +1921,7 @@ EOT
|
|
1887
1921
|
}
|
1888
1922
|
)
|
1889
1923
|
|
1890
|
-
define_settings(
|
1924
|
+
settings.define_settings(
|
1891
1925
|
:transaction,
|
1892
1926
|
:tags => {
|
1893
1927
|
:default => "",
|
@@ -1915,7 +1949,7 @@ EOT
|
|
1915
1949
|
}
|
1916
1950
|
)
|
1917
1951
|
|
1918
|
-
define_settings(
|
1952
|
+
settings.define_settings(
|
1919
1953
|
:main,
|
1920
1954
|
:external_nodes => {
|
1921
1955
|
:default => "none",
|
@@ -1940,7 +1974,7 @@ EOT
|
|
1940
1974
|
}
|
1941
1975
|
)
|
1942
1976
|
|
1943
|
-
define_settings(
|
1977
|
+
settings.define_settings(
|
1944
1978
|
:ldap,
|
1945
1979
|
:ldapssl => {
|
1946
1980
|
:default => false,
|
@@ -2009,7 +2043,7 @@ EOT
|
|
2009
2043
|
}
|
2010
2044
|
)
|
2011
2045
|
|
2012
|
-
define_settings(:master,
|
2046
|
+
settings.define_settings(:master,
|
2013
2047
|
:storeconfigs => {
|
2014
2048
|
:default => false,
|
2015
2049
|
:type => :boolean,
|
@@ -2027,7 +2061,7 @@ EOT
|
|
2027
2061
|
require 'puppet/node/facts'
|
2028
2062
|
if value
|
2029
2063
|
Puppet::Resource::Catalog.indirection.set_global_setting(:cache_class, :store_configs)
|
2030
|
-
|
2064
|
+
settings.override_default(:catalog_cache_terminus, :store_configs)
|
2031
2065
|
Puppet::Node::Facts.indirection.set_global_setting(:cache_class, :store_configs)
|
2032
2066
|
Puppet::Resource.indirection.set_global_setting(:terminus_class, :store_configs)
|
2033
2067
|
end
|
@@ -2042,7 +2076,7 @@ EOT
|
|
2042
2076
|
}
|
2043
2077
|
)
|
2044
2078
|
|
2045
|
-
define_settings(:parser,
|
2079
|
+
settings.define_settings(:parser,
|
2046
2080
|
:max_errors => {
|
2047
2081
|
:default => 10,
|
2048
2082
|
:desc => <<-'EOT'
|
@@ -2094,7 +2128,7 @@ EOT
|
|
2094
2128
|
EOT
|
2095
2129
|
}
|
2096
2130
|
)
|
2097
|
-
define_settings(:puppetdoc,
|
2131
|
+
settings.define_settings(:puppetdoc,
|
2098
2132
|
:document_all => {
|
2099
2133
|
:default => false,
|
2100
2134
|
:type => :boolean,
|
@@ -2103,7 +2137,7 @@ EOT
|
|
2103
2137
|
}
|
2104
2138
|
)
|
2105
2139
|
|
2106
|
-
define_settings(
|
2140
|
+
settings.define_settings(
|
2107
2141
|
:main,
|
2108
2142
|
:rich_data => {
|
2109
2143
|
:default => true,
|
@@ -2120,5 +2154,5 @@ EOT
|
|
2120
2154
|
EOT
|
2121
2155
|
}
|
2122
2156
|
)
|
2123
|
-
|
2157
|
+
end
|
2124
2158
|
end
|