# class Chef::Knife::RoleCreate

### Public Instance Methods

run() click to toggle source

    # File lib/chef/knife/role_create.rb, line 37
    def run
      @role_name = @name_args[0]

      if @role_name.nil?
        show_usage
        ui.fatal("You must specify a role name")
        exit 1
      end

      role = Chef::Role.new
      role.name(@role_name)
      role.description(config[:description]) if config[:description]
      create_object(role)
    end