Last active
December 27, 2015 00:09
-
-
Save nukemberg/7235592 to your computer and use it in GitHub Desktop.
install lsb-release on debian and reload ohai
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unless node["lsb"]["codename"] | |
execute "apt-get-update-lsb" do | |
command "apt-get update" | |
action :nothing | |
# tip: to suppress this running every time, just use the apt cookbook | |
not_if do | |
::File.exists?('/var/lib/apt/periodic/update-success-stamp') && | |
::File.mtime('/var/lib/apt/periodic/update-success-stamp') > Time.now - 86400*2 | |
end | |
end.run_action(:run) | |
package("lsb-release").run_action(:install) | |
ohai("reload lsb").run_action(:reload) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment