chefdore 0.3.1 → 0.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79845476129e6e9505dd331b1b948d01e0eb47d7
4
- data.tar.gz: e2850c4a3a12fc2e16789736451096431e1f2bcc
3
+ metadata.gz: 043f019e2e36eecc7a5a66688ecdb800d80757ab
4
+ data.tar.gz: 472773df60feba1d4d279b5215d201ec17d51ade
5
5
  SHA512:
6
- metadata.gz: 6c63c5377348ac1640279ae5f9044882c68db8a21aefc4863d2b35b27e9710720615b86f19de7023ce5b6c3695efd8464aaa0b0d0dedafc2bbd0640cc542342c
7
- data.tar.gz: 16d3576ca5272a6a10095393ff2941a23b4f4a0a47c4bd74d25dcea462d04a37a4abafc29f7ecfd8569f7ffc811cd27a9a805636b8a3067a29ba563c683da1fd
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"
@@ -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 "INFO :: #{value.inspect} (#{value.class}) -- #{prefix} -- #{path}"
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
 
@@ -1,3 +1,3 @@
1
1
  module Chefdore
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.1
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-02-03 00:00:00.000000000 Z
11
+ date: 2015-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor