class Kitchen::Provisioner::RunListExpansionFromKitchen

fetches roles from kitchen roles directory

Public Class Methods

new(environment, run_list_items, source = nil, role_dir = nil) click to toggle source
Calls superclass method
# File lib/kitchen/provisioner/run_list_expansion_from_kitchen.rb, line 24
def initialize(environment, run_list_items, source = nil, role_dir = nil)
  @role_dir = role_dir
  super(environment, run_list_items, source)
end

Public Instance Methods

fetch_role(name, included_by) click to toggle source
# File lib/kitchen/provisioner/run_list_expansion_from_kitchen.rb, line 29
def fetch_role(name, included_by)
  role_file = File.join(@role_dir, name)
  ::Chef::Role.from_disk(role_file)
rescue ::Chef::Exceptions::RoleNotFound
  role_not_found(name, included_by)
end