Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apt = execute "apt-get update" do
action :nothing
end
if 'debian' == node['platform_family']
if !File.exists?('/var/lib/apt/periodic/update-success-stamp')
apt.run_action(:run)
elsif File.mtime('/var/lib/apt/periodic/update-success-stamp') < Time.now - 86400
apt.run_action(:run)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment