chef-config 16.4.35 → 16.4.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/chef-config/version.rb +1 -1
- metadata +3 -4
- data/lib/chef-config/mixin/chef_cloud.rb +0 -55
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3791b65eb984ebf3096dcc6e75f447de7c2c96cd26c240a892e1c82aec7ecc2
|
|
4
|
+
data.tar.gz: 751950446654a8faad3ed243d477716b26f490142445ec109aceaf6d7509fb99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88409a45e617d1500f549ca880a51da34dd5b862d36246c648c90267e2e44c0c5abf21040ab049e6a2257492670729c9196d6ff39a98f15515bd33682debcc6d
|
|
7
|
+
data.tar.gz: 828eb650bfd04d3c20ff1b1c1fb2a2785a237fff11e9e0db1c635e21de8edffe719087a65d99d52f4d6c345558a9e0ab1790f93848bb36557b5190560a7fb32b
|
data/lib/chef-config/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chef-config
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 16.4.
|
|
4
|
+
version: 16.4.38
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Adam Jacob
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 16.4.
|
|
19
|
+
version: 16.4.38
|
|
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: 16.4.
|
|
26
|
+
version: 16.4.38
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: mixlib-shellout
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -178,7 +178,6 @@ files:
|
|
|
178
178
|
- lib/chef-config/exceptions.rb
|
|
179
179
|
- lib/chef-config/fips.rb
|
|
180
180
|
- lib/chef-config/logger.rb
|
|
181
|
-
- lib/chef-config/mixin/chef_cloud.rb
|
|
182
181
|
- lib/chef-config/mixin/credentials.rb
|
|
183
182
|
- lib/chef-config/mixin/dot_d.rb
|
|
184
183
|
- lib/chef-config/mixin/fuzzy_hostname_matcher.rb
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# Author:: Jon Morrow (jmorrow@chef.io)
|
|
3
|
-
# Copyright:: Copyright (c) Chef Software Inc.
|
|
4
|
-
# License:: Apache License, Version 2.0
|
|
5
|
-
#
|
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
-
# you may not use this file except in compliance with the License.
|
|
8
|
-
# You may obtain a copy of the License at
|
|
9
|
-
#
|
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
-
#
|
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
-
# See the License for the specific language governing permissions and
|
|
16
|
-
# limitations under the License.
|
|
17
|
-
|
|
18
|
-
require_relative "../path_helper"
|
|
19
|
-
|
|
20
|
-
module ChefConfig
|
|
21
|
-
module Mixin
|
|
22
|
-
module ChefCloud
|
|
23
|
-
CHEF_CLOUD_CLIENT_CONFIG = "/Library/Managed Preferences/io.chef.chef_client.plist"
|
|
24
|
-
|
|
25
|
-
def cloud_config?
|
|
26
|
-
File.file?(CHEF_CLOUD_CLIENT_CONFIG)
|
|
27
|
-
end
|
|
28
|
-
module_function :cloud_config?
|
|
29
|
-
|
|
30
|
-
def parse_cloud_config(path)
|
|
31
|
-
return nil unless cloud_config?
|
|
32
|
-
|
|
33
|
-
begin
|
|
34
|
-
plist_cmd = Mixlib::ShellOut.new("plutil -convert json '" + CHEF_CLOUD_CLIENT_CONFIG + "' -o -")
|
|
35
|
-
plist_cmd.run_command
|
|
36
|
-
plist_cmd.error!
|
|
37
|
-
JSON.parse(plist_cmd.stdout)
|
|
38
|
-
rescue => e
|
|
39
|
-
# TOML's error messages are mostly rubbish, so we'll just give a generic one
|
|
40
|
-
message = "Unable to parse chef client cloud config.\n"
|
|
41
|
-
message << e.message
|
|
42
|
-
raise ChefConfig::ConfigurationError, message
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Load chef client cloud config configuration.
|
|
47
|
-
#
|
|
48
|
-
# @api internal
|
|
49
|
-
# @return [void]
|
|
50
|
-
def load_cloud_config
|
|
51
|
-
Config.merge!(Hash[parse_cloud_config.map { |k, v| [k.to_sym, v] }])
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
55
|
-
end
|