Class: Chef::Provider::ExecutableSchedule

Inherits:
Chef::Provider show all
Defined in:
lib/chef/providers/executable_schedule_provider.rb

Overview

Executable Schedule chef provider.

Instance Method Summary collapse

Instance Method Details

#action_createObject

Create cron entries if they don’t exist yet

Return

true

Always return true



49
50
51
52
53
# File 'lib/chef/providers/executable_schedule_provider.rb', line 49

def action_create
  @original_cron_provider.action_create
  @new_resource.updated_by_last_action(@original_cron_provider.new_resource.updated_by_last_action?)
  true
end

#action_deleteObject

Delete existing cron entries, do nothing if they don’t exist

Return

true

Always return true



59
60
61
62
# File 'lib/chef/providers/executable_schedule_provider.rb', line 59

def action_delete
  @original_cron_provider.action_delete
  @new_resource.updated_by_last_action(@original_cron_provider.new_resource.updated_by_last_action?)
end

#load_current_resourceObject

Initialize underlying Chef cron provider with existing entries

Return

true

Always return true



38
39
40
41
42
43
# File 'lib/chef/providers/executable_schedule_provider.rb', line 38

def load_current_resource
  @original_cron_provider = Chef::Provider::Cron.new(@new_resource.cron_resource, @run_context)
  @original_cron_provider.load_current_resource
  @current_resource = @original_cron_provider.current_resource
  true
end