disabled_services = node['basic']['disabled_services']
service_actions = node['basic']['disabled_service_actions']

service 'yum-cron' do
  action service_actions
  only_if { node['basic']['yum-cron-disabled'] }
end

if disabled_services
  disabled_services.each do |service|
    begin
      r = resources(service: service)
      r.action(service_actions)
    rescue
      service service do
        action service_actions
      end
    end
  end
end
