spiceweasel 2.6.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/README.md +33 -9
- data/bin/spiceweasel +3 -3
- data/lib/spiceweasel.rb +3 -2
- data/lib/spiceweasel/berksfile.rb +6 -10
- data/lib/spiceweasel/cli.rb +174 -129
- data/lib/spiceweasel/clusters.rb +31 -23
- data/lib/spiceweasel/command.rb +23 -5
- data/lib/spiceweasel/command_helper.rb +36 -2
- data/lib/spiceweasel/config.rb +4 -3
- data/lib/spiceweasel/cookbooks.rb +76 -57
- data/lib/spiceweasel/data_bags.rb +100 -64
- data/lib/spiceweasel/environments.rb +78 -56
- data/lib/spiceweasel/execute.rb +6 -7
- data/lib/spiceweasel/extract_local.rb +59 -46
- data/lib/spiceweasel/knife.rb +21 -20
- data/lib/spiceweasel/log.rb +5 -5
- data/lib/spiceweasel/nodes.rb +261 -193
- data/lib/spiceweasel/roles.rb +107 -76
- data/lib/spiceweasel/version.rb +5 -3
- data/test/chef-repo/Berksfile +4 -0
- data/test/chef-repo/Berksfile.lock +10 -0
- data/test/chef-repo/PASSWORD +1 -0
- data/test/chef-repo/cookbooks/abc/CHANGELOG.md +13 -0
- data/test/chef-repo/cookbooks/abc/README.md +68 -0
- data/test/chef-repo/cookbooks/abc/metadata.rb +7 -0
- data/test/chef-repo/cookbooks/abc/recipes/default.rb +8 -0
- data/test/chef-repo/cookbooks/def/CHANGELOG.md +13 -0
- data/test/chef-repo/cookbooks/def/README.md +68 -0
- data/test/chef-repo/cookbooks/def/metadata.rb +7 -0
- data/test/chef-repo/cookbooks/def/recipes/default.rb +8 -0
- data/test/chef-repo/cookbooks/fail1/README.md +68 -0
- data/test/chef-repo/cookbooks/fail1/metadata.rb +9 -0
- data/test/chef-repo/cookbooks/fail2/README.md +68 -0
- data/test/chef-repo/cookbooks/fail2/metadata.rb +9 -0
- data/test/chef-repo/cookbooks/fail3/README.md +68 -0
- data/test/chef-repo/cookbooks/fail3/metadata.rb +9 -0
- data/test/chef-repo/cookbooks/ghi/CHANGELOG.md +13 -0
- data/test/chef-repo/cookbooks/ghi/README.md +68 -0
- data/test/chef-repo/cookbooks/ghi/metadata.rb +7 -0
- data/test/chef-repo/cookbooks/ghi/recipes/default.rb +8 -0
- data/test/chef-repo/cookbooks/jkl/CHANGELOG.md +13 -0
- data/test/chef-repo/cookbooks/jkl/README.md +68 -0
- data/test/chef-repo/cookbooks/jkl/metadata.rb +10 -0
- data/test/chef-repo/cookbooks/jkl/recipes/default.rb +8 -0
- data/test/chef-repo/cookbooks/mno/CHANGELOG.md +13 -0
- data/test/chef-repo/cookbooks/mno/README.md +68 -0
- data/test/chef-repo/cookbooks/mno/metadata.rb +9 -0
- data/test/chef-repo/cookbooks/mno/recipes/default.rb +8 -0
- data/test/chef-repo/data_bags/junk/README +1 -0
- data/test/chef-repo/data_bags/junk/abc.json +4 -0
- data/test/chef-repo/data_bags/junk/ade.json +4 -0
- data/test/chef-repo/data_bags/junk/afg.json +4 -0
- data/test/chef-repo/data_bags/junk/bcd.json +4 -0
- data/test/chef-repo/data_bags/junk/sub1/cde1.json +4 -0
- data/test/chef-repo/data_bags/junk/sub1/cde2.json +4 -0
- data/test/chef-repo/data_bags/junk/sub2/def1.json +4 -0
- data/test/chef-repo/data_bags/junk/sub2/def2.json +4 -0
- data/test/chef-repo/data_bags/users/README +1 -0
- data/test/chef-repo/data_bags/users/badjson.json +8 -0
- data/test/chef-repo/data_bags/users/failname.json +8 -0
- data/test/chef-repo/data_bags/users/mray.json +8 -0
- data/test/chef-repo/data_bags/users/ubuntu.json +8 -0
- data/test/chef-repo/environments/development.rb +2 -0
- data/test/chef-repo/environments/fail2.rb +8 -0
- data/test/chef-repo/environments/fail3.rb +2 -0
- data/test/chef-repo/environments/production-blue.json +177 -0
- data/test/chef-repo/environments/production-green.json +177 -0
- data/test/chef-repo/environments/production-red.json +177 -0
- data/test/chef-repo/environments/qa.rb +2 -0
- data/test/chef-repo/environments/sub/efg1.rb +2 -0
- data/test/chef-repo/environments/sub/efg2.json +177 -0
- data/test/chef-repo/fail-cookbook1.yml +19 -0
- data/test/chef-repo/fail-cookbook2.yml +21 -0
- data/test/chef-repo/fail-cookbook3.yml +37 -0
- data/test/chef-repo/fail-cookbook4.yml +37 -0
- data/test/chef-repo/fail-cookbook5.yml +10 -0
- data/test/chef-repo/fail-cookbook6.yml +9 -0
- data/test/chef-repo/fail-db1.yml +12 -0
- data/test/chef-repo/fail-db2.yml +10 -0
- data/test/chef-repo/fail-db3.yml +10 -0
- data/test/chef-repo/fail-db4.yml +10 -0
- data/test/chef-repo/fail-env1.yml +27 -0
- data/test/chef-repo/fail-env2.yml +27 -0
- data/test/chef-repo/fail-env3.yml +28 -0
- data/test/chef-repo/fail-env4.yml +28 -0
- data/test/chef-repo/fail-roles1.yml +22 -0
- data/test/chef-repo/fail-roles2.yml +21 -0
- data/test/chef-repo/fail-roles3.yml +23 -0
- data/test/chef-repo/fail-roles4.yml +23 -0
- data/test/chef-repo/fail-roles5.yml +23 -0
- data/test/chef-repo/infrastructure.yml +43 -0
- data/test/chef-repo/nodes/boxy.lab.atx.json +1756 -0
- data/test/chef-repo/nodes/guenter.home.atx.json +2503 -0
- data/test/chef-repo/roles/README +1 -0
- data/test/chef-repo/roles/base.rb +18 -0
- data/test/chef-repo/roles/base2.rb +16 -0
- data/test/chef-repo/roles/base3.rb +17 -0
- data/test/chef-repo/roles/base4.rb +15 -0
- data/test/chef-repo/roles/fail1.rb +8 -0
- data/test/chef-repo/roles/fail2.rb +5 -0
- data/test/chef-repo/roles/fail3.rb +5 -0
- data/test/chef-repo/roles/sub/bw2.json +21 -0
- data/test/chef-repo/roles/sub/bwi1.json +20 -0
- data/test/chef-repo/roles/tc.rb +13 -0
- data/test/examples/cluster-file-example.yml +14 -0
- data/test/examples/example-cluster.yml +8 -0
- data/test/examples/example.json +127 -0
- data/test/examples/example.rb +128 -0
- data/test/examples/example.yml +67 -0
- data/test/examples/google-example.yml +33 -0
- data/test/examples/joyent-vsphere-example.yml +15 -0
- data/test/examples/knife.yml +7 -0
- data/test/examples/kvm-example.yml +22 -0
- data/test/examples/node-example.yml +23 -0
- data/test/examples/php-quick-start.yml +83 -0
- data/test/extract-repo/Berksfile +4 -0
- data/test/extract-repo/Berksfile.lock +10 -0
- data/test/extract-repo/cookbooks/abc/CHANGELOG.md +13 -0
- data/test/extract-repo/cookbooks/abc/README.md +68 -0
- data/test/extract-repo/cookbooks/abc/metadata.rb +7 -0
- data/test/extract-repo/cookbooks/abc/recipes/default.rb +8 -0
- data/test/extract-repo/cookbooks/def/CHANGELOG.md +13 -0
- data/test/extract-repo/cookbooks/def/README.md +68 -0
- data/test/extract-repo/cookbooks/def/metadata.rb +7 -0
- data/test/extract-repo/cookbooks/def/recipes/default.rb +8 -0
- data/test/extract-repo/cookbooks/ghi/CHANGELOG.md +13 -0
- data/test/extract-repo/cookbooks/ghi/README.md +68 -0
- data/test/extract-repo/cookbooks/ghi/metadata.rb +7 -0
- data/test/extract-repo/cookbooks/ghi/recipes/default.rb +8 -0
- data/test/extract-repo/cookbooks/jkl/CHANGELOG.md +13 -0
- data/test/extract-repo/cookbooks/jkl/README.md +68 -0
- data/test/extract-repo/cookbooks/jkl/metadata.rb +10 -0
- data/test/extract-repo/cookbooks/jkl/recipes/default.rb +8 -0
- data/test/extract-repo/cookbooks/mno/CHANGELOG.md +13 -0
- data/test/extract-repo/cookbooks/mno/README.md +68 -0
- data/test/extract-repo/cookbooks/mno/metadata.rb +9 -0
- data/test/extract-repo/cookbooks/mno/recipes/default.rb +8 -0
- data/test/extract-repo/data_bags/junk/README +1 -0
- data/test/extract-repo/data_bags/junk/abc.json +4 -0
- data/test/extract-repo/data_bags/junk/ade.json +4 -0
- data/test/extract-repo/data_bags/junk/afg.json +4 -0
- data/test/extract-repo/data_bags/junk/bcd.json +4 -0
- data/test/extract-repo/data_bags/junk/sub1/cde1.json +4 -0
- data/test/extract-repo/data_bags/junk/sub1/cde2.json +4 -0
- data/test/extract-repo/data_bags/junk/sub2/def1.json +4 -0
- data/test/extract-repo/data_bags/junk/sub2/def2.json +4 -0
- data/test/extract-repo/data_bags/users/README +1 -0
- data/test/extract-repo/data_bags/users/mray.json +8 -0
- data/test/extract-repo/data_bags/users/ubuntu.json +8 -0
- data/test/extract-repo/environments/development.rb +2 -0
- data/test/extract-repo/environments/production-blue.json +177 -0
- data/test/extract-repo/environments/production-green.json +177 -0
- data/test/extract-repo/environments/production-red.json +177 -0
- data/test/extract-repo/environments/qa.rb +2 -0
- data/test/extract-repo/environments/sub/efg1.rb +2 -0
- data/test/extract-repo/environments/sub/efg2.json +177 -0
- data/test/extract-repo/nodes/boxy.lab.atx.json +1756 -0
- data/test/extract-repo/nodes/guenter.home.atx.json +2503 -0
- data/test/extract-repo/roles/README +1 -0
- data/test/extract-repo/roles/base.rb +18 -0
- data/test/extract-repo/roles/base2.rb +16 -0
- data/test/extract-repo/roles/base3.rb +17 -0
- data/test/extract-repo/roles/base4.rb +16 -0
- data/test/extract-repo/roles/sub/bw2.json +21 -0
- data/test/extract-repo/roles/sub/bwi1.json +20 -0
- data/test/extract-repo/roles/tc.rb +13 -0
- data/test/extract-repo2/cookbooks/README.md +1 -0
- data/test/extract-repo2/data_bags/README.md +1 -0
- data/test/extract-repo2/environments/README.md +1 -0
- data/test/extract-repo2/nodes/README.md +1 -0
- data/test/extract-repo2/roles/README.md +1 -0
- metadata +357 -67
- data/spec/bin/chef_client_spec.rb +0 -72
- data/spec/bin/google_spec.rb +0 -105
- data/spec/bin/joyent-vsphere_spec.rb +0 -25
- data/spec/bin/knife_spec.rb +0 -18
- data/spec/bin/kvm_spec.rb +0 -29
- data/spec/bin/node_spec.rb +0 -108
- data/spec/bin/spiceweasel_spec.rb +0 -136
data/lib/spiceweasel/roles.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
#
|
2
|
-
# Author:: Matt Ray (<matt@
|
3
|
+
# Author:: Matt Ray (<matt@getchef.com>)
|
3
4
|
#
|
4
|
-
# Copyright:: 2011-
|
5
|
+
# Copyright:: 2011-2014, Chef Software, Inc <legal@getchef.com>
|
5
6
|
#
|
6
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
8
|
# you may not use this file except in compliance with the License.
|
@@ -16,107 +17,137 @@
|
|
16
17
|
# limitations under the License.
|
17
18
|
#
|
18
19
|
|
19
|
-
require '
|
20
|
+
require 'ffi_yajl'
|
20
21
|
require 'chef'
|
22
|
+
require 'spiceweasel/command_helper'
|
21
23
|
|
22
24
|
module Spiceweasel
|
25
|
+
# manages parsing of Roles
|
23
26
|
class Roles
|
24
|
-
|
25
27
|
include CommandHelper
|
26
28
|
|
27
29
|
attr_reader :role_list, :create, :delete
|
28
30
|
|
29
|
-
def initialize(roles = {}, environments = [], cookbooks = {})
|
30
|
-
@create =
|
31
|
-
@delete =
|
32
|
-
@role_list =
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
31
|
+
def initialize(roles = {}, environments = [], cookbooks = {}) # rubocop:disable CyclomaticComplexity
|
32
|
+
@create = []
|
33
|
+
@delete = []
|
34
|
+
@role_list = []
|
35
|
+
|
36
|
+
return if roles.nil? || roles.empty?
|
37
|
+
|
38
|
+
Spiceweasel::Log.debug("roles: #{roles}")
|
39
|
+
rolefiles = identify_role_files(cookbooks, environments, roles)
|
40
|
+
create_command("knife role#{Spiceweasel::Config[:knife_options]} from file #{rolefiles.uniq.sort.join(' ')}")
|
41
|
+
end
|
42
|
+
|
43
|
+
def identify_role_files(cookbooks, environments, roles)
|
44
|
+
flatroles = roles.map(&:keys).flatten
|
45
|
+
rolefiles = []
|
46
|
+
unwind_roles(cookbooks, environments, flatroles, rolefiles)
|
47
|
+
rolefiles
|
48
|
+
end
|
49
|
+
|
50
|
+
def unwind_roles(cookbooks, environments, flatroles, rolefiles)
|
51
|
+
flatroles.each do |role|
|
52
|
+
Spiceweasel::Log.debug("role: #{role}")
|
53
|
+
if File.directory?('roles')
|
54
|
+
# expand wildcards and push into flatroles
|
55
|
+
if role =~ /\*/ # wildcard support
|
56
|
+
wildroles = Dir.glob("roles/#{role}")
|
57
|
+
# remove anything not ending in .json or .rb
|
58
|
+
wildroles.delete_if { |x| !x.end_with?('.rb', '.json') }
|
59
|
+
Spiceweasel::Log.debug("found roles '#{wildroles}' for wildcard: #{role}")
|
60
|
+
flatroles.concat(wildroles.map { |x| x[x.rindex('/') + 1..x.rindex('.') - 1] })
|
61
|
+
next
|
58
62
|
end
|
59
|
-
|
60
|
-
|
63
|
+
validate(role, environments, cookbooks, flatroles) unless Spiceweasel::Config[:novalidation]
|
64
|
+
elsif !Spiceweasel::Config[:novalidation]
|
65
|
+
STDERR.puts "ERROR: 'roles' directory not found, unable to validate or load roles"
|
66
|
+
exit(-1)
|
61
67
|
end
|
62
|
-
|
68
|
+
determine_role_file_type(role, rolefiles)
|
63
69
|
end
|
64
70
|
end
|
65
71
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
role = role.split('/').last
|
72
|
+
def determine_role_file_type(role, rolefiles)
|
73
|
+
if File.exist?("roles/#{role}.json")
|
74
|
+
rolefiles.push("#{role}.json")
|
75
|
+
else # assume no .json means they want .rb and catchall for misssing dir
|
76
|
+
rolefiles.push("#{role}.rb")
|
72
77
|
end
|
78
|
+
delete_command("knife role#{Spiceweasel::Config[:knife_options]} delete #{role} -y")
|
79
|
+
@role_list.push(role)
|
80
|
+
end
|
81
|
+
|
82
|
+
# validate the content of the role file
|
83
|
+
def validate(role, _environments, cookbooks, roles) # rubocop:disable CyclomaticComplexity
|
84
|
+
# validate the role passed in match the name of either the .rb or .json
|
85
|
+
file = %W(roles/#{role}.rb roles/#{role}.json).find { |f| File.exist?(f) }
|
86
|
+
role = role.split('/').last if role =~ /\// # pull out directories
|
73
87
|
if file
|
74
|
-
|
75
|
-
when /\.json$/
|
76
|
-
c_role = Chef::JSONCompat.from_json(IO.read(file))
|
77
|
-
when /\.rb$/
|
78
|
-
if (Chef::VERSION.split('.')[0].to_i < 11)
|
79
|
-
c_role = Chef::Role.new(true)
|
80
|
-
else
|
81
|
-
c_role = Chef::Role.new
|
82
|
-
end
|
83
|
-
c_role.from_file(file)
|
84
|
-
end
|
88
|
+
c_role = evaluate_c_role(file)
|
85
89
|
Spiceweasel::Log.debug("role: '#{role}' name: '#{c_role.name}'")
|
86
|
-
|
90
|
+
unless role.eql?(c_role.name)
|
87
91
|
STDERR.puts "ERROR: Role '#{role}' listed in the manifest does not match the name '#{c_role.name}' within the #{file} file."
|
88
92
|
exit(-1)
|
89
93
|
end
|
90
|
-
c_role
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
94
|
+
role_run_list(c_role, cookbooks, role, roles)
|
95
|
+
else # role is not here
|
96
|
+
STDERR.puts "ERROR: Invalid Role '#{role}' listed in the manifest but not found in the roles directory."
|
97
|
+
exit(-1)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
def evaluate_c_role(file)
|
102
|
+
c_role = nil
|
103
|
+
case file
|
104
|
+
when /\.json$/
|
105
|
+
c_role = Chef::JSONCompat.from_json(IO.read(file))
|
106
|
+
when /\.rb$/
|
107
|
+
if Chef::VERSION.split('.')[0].to_i < 11
|
108
|
+
c_role = Chef::Role.new(true)
|
109
|
+
else
|
110
|
+
c_role = Chef::Role.new
|
111
|
+
end
|
112
|
+
begin
|
113
|
+
c_role.from_file(file)
|
114
|
+
rescue SyntaxError => e
|
115
|
+
STDERR.puts "ERROR: Role '#{file}' has syntax errors."
|
116
|
+
STDERR.puts e.message
|
117
|
+
exit(-1)
|
118
|
+
end
|
119
|
+
else
|
120
|
+
STDERR.puts "ERROR: Role unreacable else block of 'case file' entered"
|
121
|
+
exit(-1)
|
122
|
+
end
|
123
|
+
c_role
|
124
|
+
end
|
125
|
+
|
126
|
+
def role_run_list(c_role, cookbooks, role, roles)
|
127
|
+
c_role.run_list.each do |runlist_item|
|
128
|
+
if runlist_item.recipe?
|
129
|
+
Spiceweasel::Log.debug("recipe: #{runlist_item.name}")
|
130
|
+
cookbook, _recipe = runlist_item.name.split('::')
|
131
|
+
Spiceweasel::Log.debug("role: '#{role}' cookbook: '#{cookbook}' dep: '#{runlist_item}'")
|
132
|
+
unless cookbooks.member?(cookbook)
|
133
|
+
STDERR.puts "ERROR: Cookbook dependency '#{runlist_item}' from role '#{role}' is missing from the list of cookbooks in the manifest."
|
134
|
+
exit(-1)
|
135
|
+
end
|
136
|
+
elsif runlist_item.role?
|
137
|
+
Spiceweasel::Log.debug("role: '#{role}' role: '#{runlist_item}': dep: '#{runlist_item.name}'")
|
138
|
+
unless roles.member?(runlist_item.name)
|
139
|
+
STDERR.puts "ERROR: Role dependency '#{runlist_item.name}' from role '#{role}' is missing from the list of roles in the manifest."
|
107
140
|
exit(-1)
|
108
141
|
end
|
142
|
+
else
|
143
|
+
STDERR.puts "ERROR: Unknown item in runlist: #{runlist_item.name}"
|
144
|
+
exit(-1)
|
109
145
|
end
|
110
|
-
#TODO validate any environment-specific runlists
|
111
|
-
else #role is not here
|
112
|
-
STDERR.puts "ERROR: Invalid Role '#{role}' listed in the manifest but not found in the roles directory."
|
113
|
-
exit(-1)
|
114
146
|
end
|
115
147
|
end
|
116
148
|
|
117
149
|
def member?(role)
|
118
150
|
role_list.include?(role)
|
119
151
|
end
|
120
|
-
|
121
152
|
end
|
122
153
|
end
|
data/lib/spiceweasel/version.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# encoding: UTF-8
|
1
2
|
#
|
2
|
-
# Author:: Matt Ray (<matt@
|
3
|
+
# Author:: Matt Ray (<matt@getchef.com>)
|
3
4
|
#
|
4
|
-
# Copyright:: 2011-
|
5
|
+
# Copyright:: 2011-2014, Chef Software, Inc <legal@getchef.com>
|
5
6
|
#
|
6
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
8
|
# you may not use this file except in compliance with the License.
|
@@ -16,6 +17,7 @@
|
|
16
17
|
# limitations under the License.
|
17
18
|
#
|
18
19
|
|
20
|
+
# Spiceweasel version
|
19
21
|
module Spiceweasel
|
20
|
-
VERSION = '2.
|
22
|
+
VERSION = '2.8.0'
|
21
23
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
SECRET!
|
@@ -0,0 +1,13 @@
|
|
1
|
+
abc CHANGELOG
|
2
|
+
=============
|
3
|
+
|
4
|
+
This file is used to list changes made in each version of the abc cookbook.
|
5
|
+
|
6
|
+
0.1.0
|
7
|
+
-----
|
8
|
+
- [your_name] - Initial release of abc
|
9
|
+
|
10
|
+
- - -
|
11
|
+
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
|
12
|
+
|
13
|
+
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
|
@@ -0,0 +1,68 @@
|
|
1
|
+
abc Cookbook
|
2
|
+
============
|
3
|
+
TODO: Enter the cookbook description here.
|
4
|
+
|
5
|
+
e.g.
|
6
|
+
This cookbook makes your favorite breakfast sandwich.
|
7
|
+
|
8
|
+
Requirements
|
9
|
+
------------
|
10
|
+
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
|
11
|
+
|
12
|
+
e.g.
|
13
|
+
#### packages
|
14
|
+
- `toaster` - abc needs toaster to brown your bagel.
|
15
|
+
|
16
|
+
Attributes
|
17
|
+
----------
|
18
|
+
TODO: List your cookbook attributes here.
|
19
|
+
|
20
|
+
e.g.
|
21
|
+
#### abc::default
|
22
|
+
<table>
|
23
|
+
<tr>
|
24
|
+
<th>Key</th>
|
25
|
+
<th>Type</th>
|
26
|
+
<th>Description</th>
|
27
|
+
<th>Default</th>
|
28
|
+
</tr>
|
29
|
+
<tr>
|
30
|
+
<td><tt>['abc']['bacon']</tt></td>
|
31
|
+
<td>Boolean</td>
|
32
|
+
<td>whether to include bacon</td>
|
33
|
+
<td><tt>true</tt></td>
|
34
|
+
</tr>
|
35
|
+
</table>
|
36
|
+
|
37
|
+
Usage
|
38
|
+
-----
|
39
|
+
#### abc::default
|
40
|
+
TODO: Write usage instructions for each cookbook.
|
41
|
+
|
42
|
+
e.g.
|
43
|
+
Just include `abc` in your node's `run_list`:
|
44
|
+
|
45
|
+
```json
|
46
|
+
{
|
47
|
+
"name":"my_node",
|
48
|
+
"run_list": [
|
49
|
+
"recipe[abc]"
|
50
|
+
]
|
51
|
+
}
|
52
|
+
```
|
53
|
+
|
54
|
+
Contributing
|
55
|
+
------------
|
56
|
+
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
|
57
|
+
|
58
|
+
e.g.
|
59
|
+
1. Fork the repository on Github
|
60
|
+
2. Create a named feature branch (like `add_component_x`)
|
61
|
+
3. Write your change
|
62
|
+
4. Write tests for your change (if applicable)
|
63
|
+
5. Run the tests, ensuring they all pass
|
64
|
+
6. Submit a Pull Request using Github
|
65
|
+
|
66
|
+
License and Authors
|
67
|
+
-------------------
|
68
|
+
Authors: TODO: List authors
|
@@ -0,0 +1,13 @@
|
|
1
|
+
def CHANGELOG
|
2
|
+
=============
|
3
|
+
|
4
|
+
This file is used to list changes made in each version of the def cookbook.
|
5
|
+
|
6
|
+
0.1.0
|
7
|
+
-----
|
8
|
+
- [your_name] - Initial release of def
|
9
|
+
|
10
|
+
- - -
|
11
|
+
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
|
12
|
+
|
13
|
+
The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
|
@@ -0,0 +1,68 @@
|
|
1
|
+
def Cookbook
|
2
|
+
============
|
3
|
+
TODO: Enter the cookbook description here.
|
4
|
+
|
5
|
+
e.g.
|
6
|
+
This cookbook makes your favorite breakfast sandwich.
|
7
|
+
|
8
|
+
Requirements
|
9
|
+
------------
|
10
|
+
TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
|
11
|
+
|
12
|
+
e.g.
|
13
|
+
#### packages
|
14
|
+
- `toaster` - def needs toaster to brown your bagel.
|
15
|
+
|
16
|
+
Attributes
|
17
|
+
----------
|
18
|
+
TODO: List your cookbook attributes here.
|
19
|
+
|
20
|
+
e.g.
|
21
|
+
#### def::default
|
22
|
+
<table>
|
23
|
+
<tr>
|
24
|
+
<th>Key</th>
|
25
|
+
<th>Type</th>
|
26
|
+
<th>Description</th>
|
27
|
+
<th>Default</th>
|
28
|
+
</tr>
|
29
|
+
<tr>
|
30
|
+
<td><tt>['def']['bacon']</tt></td>
|
31
|
+
<td>Boolean</td>
|
32
|
+
<td>whether to include bacon</td>
|
33
|
+
<td><tt>true</tt></td>
|
34
|
+
</tr>
|
35
|
+
</table>
|
36
|
+
|
37
|
+
Usage
|
38
|
+
-----
|
39
|
+
#### def::default
|
40
|
+
TODO: Write usage instructions for each cookbook.
|
41
|
+
|
42
|
+
e.g.
|
43
|
+
Just include `def` in your node's `run_list`:
|
44
|
+
|
45
|
+
```json
|
46
|
+
{
|
47
|
+
"name":"my_node",
|
48
|
+
"run_list": [
|
49
|
+
"recipe[def]"
|
50
|
+
]
|
51
|
+
}
|
52
|
+
```
|
53
|
+
|
54
|
+
Contributing
|
55
|
+
------------
|
56
|
+
TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
|
57
|
+
|
58
|
+
e.g.
|
59
|
+
1. Fork the repository on Github
|
60
|
+
2. Create a named feature branch (like `add_component_x`)
|
61
|
+
3. Write your change
|
62
|
+
4. Write tests for your change (if applicable)
|
63
|
+
5. Run the tests, ensuring they all pass
|
64
|
+
6. Submit a Pull Request using Github
|
65
|
+
|
66
|
+
License and Authors
|
67
|
+
-------------------
|
68
|
+
Authors: TODO: List authors
|