Update cookbooks and add wordpress cookbook

This commit is contained in:
Greg Karékinian
2016-02-19 18:09:49 +01:00
parent 9ba973e3ac
commit 820b0ab3f8
606 changed files with 22421 additions and 14084 deletions

View File

@@ -27,6 +27,18 @@ module Apt
!which('apt-get').nil?
end
# Determines whether we need to run `apt-get update`
#
# @return [Boolean]
def apt_up_to_date?
if ::File.exist?('/var/lib/apt/periodic/update-success-stamp') &&
::File.mtime('/var/lib/apt/periodic/update-success-stamp') > Time.now - node['apt']['periodic_update_min_delay']
true
else
false
end
end
# Finds a command in $PATH
#
# @return [String, nil]