chefdore 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/chefdore/utils.rb +13 -2
- data/lib/chefdore/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 043f019e2e36eecc7a5a66688ecdb800d80757ab
|
4
|
+
data.tar.gz: 472773df60feba1d4d279b5215d201ec17d51ade
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dac605397b012a1c74e4484f05059373f8c3f2f4135617aa14dea273355138d349f1ca741e4f6de810768b93030d8386876b56c9c271493470cb4d34559b2d9
|
7
|
+
data.tar.gz: bf6f58014a2f03953ace8473132e278a38bfae7195c1dee12add674c6b4a2fefc774ef6b50f3ae7f73280820e80c1a727e29f9a73443668067bdcf5c792287f4
|
data/README.md
CHANGED
@@ -106,7 +106,10 @@ All we have to do is pipe that output into our little command line client:
|
|
106
106
|
|
107
107
|
```bash
|
108
108
|
$ knife role show example_role --format json | chefdore convert
|
109
|
+
## Place the following in your cookbook in attributes/default.rb
|
109
110
|
default["ntp"]["servers"] = ["0.pool.ntp.org", "1.pool.ntp.org", "2.pool.ntp.org", "3.pool.ntp.org"]
|
111
|
+
|
112
|
+
## Place the following in your cookbook in attributes/overrides.rb (alternatively, you may place these in attributes/default.rb instead)
|
110
113
|
override["developer_mode"] = false
|
111
114
|
override["monitoring"]["metric_provider"] = "collectd"
|
112
115
|
override["monitoring"]["procmon_provider"] = "monit"
|
@@ -133,6 +136,8 @@ override["osops_networks"]["nova"] = "192.168.1.0/24"
|
|
133
136
|
override["osops_networks"]["public"] = "192.168.1.0/24"
|
134
137
|
override["osops_networks"]["management"] = "192.168.1.0/24"
|
135
138
|
override["package_component"] = "folsom"
|
139
|
+
|
140
|
+
## Place the following in your cookbook in recipes/default.rb
|
136
141
|
include_recipe "osops-utils::packages"
|
137
142
|
include_recipe "osops-utils::nf_conntrack_max"
|
138
143
|
include_recipe "osops-utils::vhost_net"
|
data/lib/chefdore/utils.rb
CHANGED
@@ -21,9 +21,14 @@ module Chefdore
|
|
21
21
|
path = opts[:path] ? opts[:path] : []
|
22
22
|
cli = opts[:cli] ? opts[:cli] : Chefdore::Cli.new
|
23
23
|
|
24
|
-
#puts "
|
24
|
+
#puts "DEBUG :: #{prefix} -- #{path} -- #{value.inspect} (#{value.class})"
|
25
|
+
|
26
|
+
if value.is_a?(Hash) and value.empty? and path.empty?
|
27
|
+
nil
|
28
|
+
elsif value.is_a?(Hash)
|
29
|
+
# This allows us to include empty hashes if one is found
|
30
|
+
puts "#{prefix}#{path.map{|p| "[#{p.inspect}]"}.join('')} = #{value.inspect}" if value.empty?
|
25
31
|
|
26
|
-
if value.is_a?(Hash)
|
27
32
|
value.each do |subkey, subval|
|
28
33
|
convert_attr(opts.merge(value: subval, path: path+[subkey]))
|
29
34
|
end
|
@@ -47,9 +52,15 @@ module Chefdore
|
|
47
52
|
da = klass.default_attributes
|
48
53
|
oa = klass.override_attributes
|
49
54
|
|
55
|
+
puts "## Place the following in your cookbook in attributes/default.rb"
|
50
56
|
convert_attr(cli: cli, value: da)
|
57
|
+
puts
|
58
|
+
|
59
|
+
puts "## Place the following in your cookbook in attributes/overrides.rb (alternatively, you may place these in attributes/default.rb instead)"
|
51
60
|
convert_attr(cli: cli, value: oa, prefix: "override")
|
61
|
+
puts
|
52
62
|
|
63
|
+
puts "## Place the following in your cookbook in recipes/default.rb"
|
53
64
|
convert_run_list(cli: cli, run_list: rl)
|
54
65
|
end
|
55
66
|
|
data/lib/chefdore/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chefdore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Barnett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|