170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
|
# File 'lib/chef/role.rb', line 170
def self.from_hash(o)
role = new
role.name(o["name"])
role.description(o["description"])
role.default_attributes(o["default_attributes"])
role.override_attributes(o["override_attributes"])
env_run_list_hash = { "_default" => (o.key?("run_list") ? o["run_list"] : o["recipes"]) }
if o["env_run_lists"]
env_run_list_hash.merge!(o["env_run_lists"])
end
role.env_run_lists(env_run_list_hash)
role
end
|