chef-config 15.9.17 → 15.13.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/chef-config.gemspec +1 -2
- data/lib/chef-config.rb +1 -1
- data/lib/chef-config/config.rb +5 -32
- data/lib/chef-config/dist.rb +3 -0
- data/lib/chef-config/exceptions.rb +1 -1
- data/lib/chef-config/fips.rb +1 -1
- data/lib/chef-config/logger.rb +1 -1
- data/lib/chef-config/mixin/credentials.rb +1 -1
- data/lib/chef-config/mixin/dot_d.rb +1 -1
- data/lib/chef-config/mixin/fuzzy_hostname_matcher.rb +1 -1
- data/lib/chef-config/path_helper.rb +8 -8
- data/lib/chef-config/version.rb +3 -3
- data/lib/chef-config/windows.rb +1 -1
- data/lib/chef-config/workstation_config_loader.rb +1 -1
- data/spec/unit/config_spec.rb +24 -24
- data/spec/unit/fips_spec.rb +1 -1
- data/spec/unit/path_helper_spec.rb +1 -1
- data/spec/unit/workstation_config_loader_spec.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ef9630ecc35473f63910616bb3c446eafa9f7a4cd688c57d9e15ba0e053d9d9
|
4
|
+
data.tar.gz: 668864b23061b1e7dbf3a7d26bfe8ee69c3f942178b10386fa224a80fa4f8ff2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be47f1df35fe042e89266327a4109c885cb4a174e0de0dbd7957a3c0d5318c8184f49b2a73e60eb635952e84acfa56969dde91fc49ab3048dee7e8243305d432
|
7
|
+
data.tar.gz: 8361b216be8e57c98f9c88dbd797de64848876ac8616e92651d0cdfa987978b5a0cce239850d7070b2e92fa755c77827193e78f7f10f9e402e16ecd08ee7c7b7
|
data/chef-config.gemspec
CHANGED
data/lib/chef-config.rb
CHANGED
data/lib/chef-config/config.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# Author:: AJ Christensen (<aj@chef.io>)
|
5
5
|
# Author:: Mark Mzyk (<mmzyk@chef.io>)
|
6
6
|
# Author:: Kyle Goodwin (<kgoodwin@primerevenue.com>)
|
7
|
-
# Copyright:: Copyright
|
7
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
8
8
|
# License:: Apache License, Version 2.0
|
9
9
|
#
|
10
10
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -483,7 +483,7 @@ module ChefConfig
|
|
483
483
|
# 11 (true) or Chef Server 12 (false). Chef Zero can still serve
|
484
484
|
# policyfile objects in Chef 11 mode, as long as `repo_mode` is set to
|
485
485
|
# "hosted_everything". The primary differences are:
|
486
|
-
# * Chef 11 mode doesn't support multi-
|
486
|
+
# * Chef 11 mode doesn't support multi-tenant, so there is no
|
487
487
|
# distinction between global and org-specific objects (since there are
|
488
488
|
# no orgs).
|
489
489
|
# * Chef 11 mode doesn't expose RBAC objects
|
@@ -531,7 +531,7 @@ module ChefConfig
|
|
531
531
|
# switching based on it is almost certainly doing the wrong thing and papering over
|
532
532
|
# bugs that should be fixed in one or the other class, and will be brittle and destined
|
533
533
|
# to break in the future (and not necessarily on a major version bump). Checking this value
|
534
|
-
# is also not
|
534
|
+
# is also not sufficient to determine if we are not running against a server since this can
|
535
535
|
# be unset but :local_mode may be set. It would be accurate to check both :solo and :local_mode
|
536
536
|
# to determine if we're not running against a server, but the more semantically accurate test
|
537
537
|
# is going to be combining :solo_legacy_mode and :local_mode.
|
@@ -851,33 +851,6 @@ module ChefConfig
|
|
851
851
|
|
852
852
|
# knife configuration data
|
853
853
|
config_context :knife do
|
854
|
-
# XXX: none of these default values are applied to knife (and would create a backcompat
|
855
|
-
# break in knife if this bug was fixed since many of the defaults below are wrong). this appears
|
856
|
-
# to be the start of an attempt to be able to use config_strict_mode true? if so, this approach
|
857
|
-
# is fraught with peril because this namespace is used by every knife plugin in the wild and
|
858
|
-
# we would need to validate every cli option in every knife attribute out there and list them all here.
|
859
|
-
#
|
860
|
-
# based on the way that people may define `knife[:foobar] = "something"` for the knife-foobar
|
861
|
-
# gem plugin i'm pretty certain we can never turn on anything like config_string_mode since
|
862
|
-
# any config value may be a typo or it may be in some gem in some knife plugin we don't know about.
|
863
|
-
#
|
864
|
-
# we do still need to maintain at least one of these so that the knife config hash gets
|
865
|
-
# created.
|
866
|
-
#
|
867
|
-
# this whole situation is deeply unsatisfying.
|
868
|
-
default :ssh_port, nil
|
869
|
-
default :ssh_user, nil
|
870
|
-
default :ssh_attribute, nil
|
871
|
-
default :ssh_gateway, nil
|
872
|
-
default :ssh_gateway_identity, nil
|
873
|
-
default :bootstrap_version, nil
|
874
|
-
default :bootstrap_proxy, nil
|
875
|
-
default :bootstrap_template, nil
|
876
|
-
default :secret, nil
|
877
|
-
default :secret_file, nil
|
878
|
-
default :host_key_verify, nil
|
879
|
-
default :forward_agent, nil
|
880
|
-
default :sort_status_reverse, nil
|
881
854
|
default :hints, {}
|
882
855
|
end
|
883
856
|
|
@@ -983,7 +956,7 @@ module ChefConfig
|
|
983
956
|
# distribution.
|
984
957
|
#
|
985
958
|
# The disadvantages of lazily loading files are that users some time find it
|
986
|
-
# confusing that their cookbooks are not fully
|
959
|
+
# confusing that their cookbooks are not fully synchronized to the cache initially,
|
987
960
|
# and more importantly the time-sensitive URLs which are in the manifest may time
|
988
961
|
# out on long Chef runs before the resource that uses the file is converged
|
989
962
|
# (leading to many confusing 403 errors on template/cookbook_file resources).
|
@@ -1140,7 +1113,7 @@ module ChefConfig
|
|
1140
1113
|
end
|
1141
1114
|
|
1142
1115
|
# Given a scheme, host, and port, return the correct proxy URI based on the
|
1143
|
-
# set environment variables, unless
|
1116
|
+
# set environment variables, unless excluded by no_proxy, in which case nil
|
1144
1117
|
# is returned
|
1145
1118
|
def self.proxy_uri(scheme, host, port)
|
1146
1119
|
proxy_env_var = ENV["#{scheme}_proxy"].to_s.strip
|
data/lib/chef-config/dist.rb
CHANGED
@@ -19,5 +19,8 @@ module ChefConfig
|
|
19
19
|
# The legacy conf folder: C:/opscode/chef. Specifically the "opscode" part
|
20
20
|
# DIR_SUFFIX is appended to it in code where relevant
|
21
21
|
LEGACY_CONF_DIR = "opscode".freeze
|
22
|
+
|
23
|
+
# Enable forcing Chef EULA
|
24
|
+
ENFORCE_LICENSE = true
|
22
25
|
end
|
23
26
|
end
|
data/lib/chef-config/fips.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Matt Wrock (<matt@mattwrock.com>)
|
3
|
-
# Copyright:: Copyright (c)
|
3
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef-config/logger.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Bryan McLellan <btm@loftninjas.org>
|
3
|
-
# Copyright:: Copyright
|
3
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -130,16 +130,16 @@ module ChefConfig
|
|
130
130
|
end
|
131
131
|
|
132
132
|
# This is the INVERSE of Pathname#cleanpath, it converts forward
|
133
|
-
# slashes to
|
133
|
+
# slashes to backslashes for Windows. Since the Ruby API and the
|
134
134
|
# Windows APIs all consume forward slashes, this helper function
|
135
135
|
# should only be used for *DISPLAY* logic to send strings back
|
136
|
-
# to the user with
|
136
|
+
# to the user with backslashes. Internally, filename paths should
|
137
137
|
# generally be stored with forward slashes for consistency. It is
|
138
138
|
# not necessary or desired to blindly convert pathnames to have
|
139
|
-
#
|
139
|
+
# backslashes on Windows.
|
140
140
|
#
|
141
141
|
# Generally, if the user isn't going to be seeing it, you should be
|
142
|
-
# using Pathname#cleanpath
|
142
|
+
# using Pathname#cleanpath instead of this function.
|
143
143
|
def self.cleanpath(path)
|
144
144
|
path = Pathname.new(path).cleanpath.to_s
|
145
145
|
# ensure all forward slashes are backslashes
|
@@ -265,10 +265,10 @@ module ChefConfig
|
|
265
265
|
end
|
266
266
|
end
|
267
267
|
|
268
|
-
# Determine if the given path is protected by
|
268
|
+
# Determine if the given path is protected by macOS System Integrity Protection.
|
269
269
|
def self.is_sip_path?(path, node)
|
270
270
|
if node["platform"] == "mac_os_x" && Gem::Version.new(node["platform_version"]) >= Gem::Version.new("10.11")
|
271
|
-
|
271
|
+
# @todo: parse rootless.conf for this?
|
272
272
|
sip_paths = [
|
273
273
|
"/System", "/bin", "/sbin", "/usr"
|
274
274
|
]
|
@@ -282,7 +282,7 @@ module ChefConfig
|
|
282
282
|
end
|
283
283
|
end
|
284
284
|
|
285
|
-
# Determine if the given path is on the exception list for
|
285
|
+
# Determine if the given path is on the exception list for macOS System Integrity Protection.
|
286
286
|
def self.writable_sip_path?(path)
|
287
287
|
# todo: parse rootless.conf for this?
|
288
288
|
sip_exceptions = [
|
data/lib/chef-config/version.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright:: Copyright
|
1
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
2
2
|
# License:: Apache License, Version 2.0
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -14,6 +14,6 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
|
16
16
|
module ChefConfig
|
17
|
-
CHEFCONFIG_ROOT = File.expand_path("
|
18
|
-
VERSION = "15.
|
17
|
+
CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
|
18
|
+
VERSION = "15.13.8".freeze
|
19
19
|
end
|
data/lib/chef-config/windows.rb
CHANGED
data/spec/unit/config_spec.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Kyle Goodwin (<kgoodwin@primerevenue.com>)
|
4
|
-
# Copyright:: Copyright
|
4
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -186,29 +186,29 @@ RSpec.describe ChefConfig::Config do
|
|
186
186
|
end
|
187
187
|
|
188
188
|
describe "when configuring formatters" do
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
189
|
+
# if TTY and not(force-logger)
|
190
|
+
# formatter = configured formatter or default formatter
|
191
|
+
# formatter goes to STDOUT/ERR
|
192
|
+
# if log file is writeable
|
193
|
+
# log level is configured level or info
|
194
|
+
# log location is file
|
195
|
+
# else
|
196
|
+
# log level is warn
|
197
|
+
# log location is STDERR
|
198
|
+
# end
|
199
|
+
# elsif not(TTY) and force formatter
|
200
|
+
# formatter = configured formatter or default formatter
|
201
|
+
# if log_location specified
|
202
|
+
# formatter goes to log_location
|
203
|
+
# else
|
204
|
+
# formatter goes to STDOUT/ERR
|
205
|
+
# end
|
206
|
+
# else
|
207
|
+
# formatter = "null"
|
208
|
+
# log_location = configured-value or defualt
|
209
|
+
# log_level = info or defualt
|
210
|
+
# end
|
211
|
+
#
|
212
212
|
it "has an empty list of formatters by default" do
|
213
213
|
expect(ChefConfig::Config.formatters).to eq([])
|
214
214
|
end
|
data/spec/unit/fips_spec.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Matt Wrock (<matt@mattwrock.com>)
|
3
|
-
# Copyright:: Copyright (c)
|
3
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Bryan McLellan <btm@loftninjas.org>
|
3
|
-
# Copyright:: Copyright
|
3
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.
|
4
|
+
version: 15.13.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef-utils
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 15.
|
19
|
+
version: 15.13.8
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 15.
|
26
|
+
version: 15.13.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-shellout
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|