Class Chef::Role
In: lib/chef/role.rb
Parent: Object

Methods

Included Modules

Chef::Mixin::FromFile Chef::Mixin::ParamsValidate Chef::IndexQueue::Indexable

Constants

DESIGN_DOCUMENT = { "version" => 6, "language" => "javascript", "views" => { "all" => { "map" => <<-EOJS function(doc) { if (doc.chef_type == "role") { emit(doc.name, doc); } } EOJS

Attributes

couchdb  [RW] 
couchdb_id  [R] 
couchdb_rev  [RW] 

Public Class methods

List all the Chef::Role objects in the CouchDB. If inflate is set to true, you will get the full list of all Roles, fully inflated.

Load a role from disk - prefers to load the JSON, but will happily load the raw rb files as well.

Create a Chef::Role from JSON

Get the list of all roles from the API.

Load a role by name from the API

Sync all the json roles with couchdb from disk

Public Instance methods

Remove this role from the CouchDB

Save this role to the CouchDB

Create the role via the REST API

def recipes(*args)

  Chef::Log.warn "Chef::Role#recipes method is deprecated.  Please use Chef::Role#run_list"
  run_list(*args)

end

Remove this role via the REST API

recipes(*args)

Alias for run_list

Save this role via the REST API

Serialize this object as a hash

As a string

[Validate]