chef-config 15.7.32 → 15.11.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef-config.rb +1 -1
- data/lib/chef-config/config.rb +14 -35
- data/lib/chef-config/dist.rb +4 -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 +2 -2
- data/lib/chef-config/version.rb +2 -2
- 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: acd3630b54b81c45d33db41205da6da7fda9e595611272ca14d96505cd508e8d
|
4
|
+
data.tar.gz: 3488c4d1a3e574e1fd4c3e103565648ce1e02d04b5266d84f84008c0c0e961fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b523850f1ee586d23fcb1db45e4aecd9068722ad68cd55c4c4e58f6030197dbf1055cf9292df16c5c21d4a439270dcf691298eba7a7602c394272fafe7beebab
|
7
|
+
data.tar.gz: 9239a27f8fc8204130ffcae9af02796451dd847f7161c3689babbe2ebaaa15a9f84997cccba7b9e339725e36da5a81556ee34b97182dd15b18cce06afbe094cb
|
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");
|
@@ -75,20 +75,20 @@ module ChefConfig
|
|
75
75
|
end
|
76
76
|
|
77
77
|
# On *nix, /etc/chef
|
78
|
-
def self.etc_chef_dir
|
79
|
-
path =
|
78
|
+
def self.etc_chef_dir(is_windows = ChefUtils.windows?)
|
79
|
+
path = is_windows ? c_chef_dir : PathHelper.join("/etc", ChefConfig::Dist::DIR_SUFFIX)
|
80
80
|
PathHelper.cleanpath(path)
|
81
81
|
end
|
82
82
|
|
83
83
|
# On *nix, /var/chef
|
84
|
-
def self.var_chef_dir
|
85
|
-
path =
|
84
|
+
def self.var_chef_dir(is_windows = ChefUtils.windows?)
|
85
|
+
path = is_windows ? c_chef_dir : PathHelper.join("/var", ChefConfig::Dist::DIR_SUFFIX)
|
86
86
|
PathHelper.cleanpath(path)
|
87
87
|
end
|
88
88
|
|
89
89
|
# On *nix, the root of /var/, used to test if we can create and write in /var/chef
|
90
|
-
def self.var_root_dir
|
91
|
-
path =
|
90
|
+
def self.var_root_dir(is_windows = ChefUtils.windows?)
|
91
|
+
path = is_windows ? c_chef_dir : "/var"
|
92
92
|
PathHelper.cleanpath(path)
|
93
93
|
end
|
94
94
|
|
@@ -99,6 +99,12 @@ module ChefConfig
|
|
99
99
|
PathHelper.cleanpath(path)
|
100
100
|
end
|
101
101
|
|
102
|
+
def self.c_opscode_dir
|
103
|
+
drive = windows_installation_drive || "C:"
|
104
|
+
path = PathHelper.join(drive, ChefConfig::Dist::LEGACY_CONF_DIR, ChefConfig::Dist::DIR_SUFFIX)
|
105
|
+
PathHelper.cleanpath(path)
|
106
|
+
end
|
107
|
+
|
102
108
|
# the drive where Chef is installed on a windows host. This is determined
|
103
109
|
# either by the drive containing the current file or by the SYSTEMDRIVE ENV
|
104
110
|
# variable
|
@@ -471,7 +477,7 @@ module ChefConfig
|
|
471
477
|
# When set to a String, Chef Zero disables multitenant support. This is
|
472
478
|
# what you want when using Chef Zero to serve a single Chef Repo. Setting
|
473
479
|
# this to `false` enables multi-tenant.
|
474
|
-
default :single_org,
|
480
|
+
default :single_org, "chef"
|
475
481
|
|
476
482
|
# Whether Chef Zero should operate in a mode analogous to OSS Chef Server
|
477
483
|
# 11 (true) or Chef Server 12 (false). Chef Zero can still serve
|
@@ -845,33 +851,6 @@ module ChefConfig
|
|
845
851
|
|
846
852
|
# knife configuration data
|
847
853
|
config_context :knife do
|
848
|
-
# XXX: none of these default values are applied to knife (and would create a backcompat
|
849
|
-
# break in knife if this bug was fixed since many of the defaults below are wrong). this appears
|
850
|
-
# to be the start of an attempt to be able to use config_strict_mode true? if so, this approach
|
851
|
-
# is fraught with peril because this namespace is used by every knife plugin in the wild and
|
852
|
-
# we would need to validate every cli option in every knife attribute out there and list them all here.
|
853
|
-
#
|
854
|
-
# based on the way that people may define `knife[:foobar] = "something"` for the knife-foobar
|
855
|
-
# gem plugin i'm pretty certain we can never turn on anything like config_string_mode since
|
856
|
-
# any config value may be a typo or it may be in some gem in some knife plugin we don't know about.
|
857
|
-
#
|
858
|
-
# we do still need to maintain at least one of these so that the knife config hash gets
|
859
|
-
# created.
|
860
|
-
#
|
861
|
-
# this whole situation is deeply unsatisfying.
|
862
|
-
default :ssh_port, nil
|
863
|
-
default :ssh_user, nil
|
864
|
-
default :ssh_attribute, nil
|
865
|
-
default :ssh_gateway, nil
|
866
|
-
default :ssh_gateway_identity, nil
|
867
|
-
default :bootstrap_version, nil
|
868
|
-
default :bootstrap_proxy, nil
|
869
|
-
default :bootstrap_template, nil
|
870
|
-
default :secret, nil
|
871
|
-
default :secret_file, nil
|
872
|
-
default :host_key_verify, nil
|
873
|
-
default :forward_agent, nil
|
874
|
-
default :sort_status_reverse, nil
|
875
854
|
default :hints, {}
|
876
855
|
end
|
877
856
|
|
data/lib/chef-config/dist.rb
CHANGED
@@ -15,5 +15,9 @@ module ChefConfig
|
|
15
15
|
|
16
16
|
# The user's configuration directory
|
17
17
|
USER_CONF_DIR = ".chef".freeze
|
18
|
+
|
19
|
+
# The legacy conf folder: C:/opscode/chef. Specifically the "opscode" part
|
20
|
+
# DIR_SUFFIX is appended to it in code where relevant
|
21
|
+
LEGACY_CONF_DIR = "opscode".freeze
|
18
22
|
end
|
19
23
|
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");
|
@@ -268,7 +268,7 @@ module ChefConfig
|
|
268
268
|
# Determine if the given path is protected by OS X 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
|
]
|
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");
|
@@ -15,5 +15,5 @@
|
|
15
15
|
|
16
16
|
module ChefConfig
|
17
17
|
CHEFCONFIG_ROOT = File.expand_path("../..", __FILE__)
|
18
|
-
VERSION = "15.
|
18
|
+
VERSION = "15.11.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.11.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-05-30 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.11.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.11.8
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mixlib-shellout
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|