Sha256: 6e0b9eb57172c3dd6f6187e6255cf5c871b85eb2da32fdb1698b9d83028015b8

Contents?: true

Size: 1.24 KB

Versions: 16

Compression:

Stored size: 1.24 KB

Contents

#
# Author:: Adam Jacob (<adam@opscode.com>)
# Copyright:: Copyright (c) 2009 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

class ::Chef::Knife::RoleFromFile
  # --------------------------------------------------------------------------------------------------------------------
  # Create a new instance of the current class configured for the given
  # arguments and options
  def initialize(argv=[])
    super(argv)
    @rsrctype = 'role'
    @location = 'roles'
  end

  def run
    @name_args.each do |arg|
      updated = loader.load_from("roles", arg)

      updated.save

      output(format_for_display(updated)) if config[:print_after]

      ui.step("Updated Role #{updated.name}!")
    end
  end
end





Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
knife-chop-0.5.15 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.4.1 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.4.0 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.7 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.6 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.5 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.4 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.3 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.2 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.0 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.3.1 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.2.11 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.2.9 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.2.7 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.2.8 lib/chef/knife/chop/role_from_file.rb
knife-chop-0.2.6 lib/chef/knife/chop/role_from_file.rb