Class: Chef::Formatters::EucaDeploy

Inherits:
Formatters::Base
  • Object
show all
Defined in:
lib/euca-deploy-formatter.rb

Instance Method Summary collapse

Instance Method Details

#converge_completeObject



27
28
29
# File 'lib/euca-deploy-formatter.rb', line 27

def converge_complete
  puts 'Configuration complete.'
end

#converge_start(run_context) ⇒ Object



23
24
25
# File 'lib/euca-deploy-formatter.rb', line 23

def converge_start(run_context)
  puts "Executing #{run_context.resource_collection.all_resources.size} resources"
end

#cookbook_resolution_start(expanded_run_list) ⇒ Object

Called before the cookbook collection is fetched from the server.



15
16
17
# File 'lib/euca-deploy-formatter.rb', line 15

def cookbook_resolution_start(expanded_run_list)
  puts "Very run list: #{expanded_run_list.inspect}"
end

#cookbook_sync_start(cookbook_count) ⇒ Object



19
20
21
# File 'lib/euca-deploy-formatter.rb', line 19

def cookbook_sync_start(cookbook_count)
  puts "Synchronizing cookbooks"
end

#resource_action_start(resource, action, notification_type = nil, notifier = nil) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
# File 'lib/euca-deploy-formatter.rb', line 31

def resource_action_start(resource, action, notification_type=nil, notifier=nil)
  if resource.cookbook_name && resource.recipe_name
    resource_recipe = "#{resource.cookbook_name}::#{resource.recipe_name}"
  end

  if resource_recipe != @current_recipe
    puts "Recipe: #{resource_recipe}"
    @current_recipe = resource_recipe
  end
  puts "  * #{resource} action #{action}"
end

#run_start(version) ⇒ Object

Called at the very start of a Chef Run



10
11
12
# File 'lib/euca-deploy-formatter.rb', line 10

def run_start(version)
  puts "Starting Chef Client, version #{version}"
end