Skip to content

Instantly share code, notes, and snippets.

@gionn
Forked from anonymous/docker.rb
Last active August 29, 2015 14:25
Show Gist options
  • Save gionn/bd09668eeadd4ada75ad to your computer and use it in GitHub Desktop.
Save gionn/bd09668eeadd4ada75ad to your computer and use it in GitHub Desktop.
Install aufs module on Ubuntu when needed via chef
#
# Recipe:: docker
#
aufs_exists = `lsmod | grep aufs | wc -l`.strip
if aufs_exists.to_i == 0
kernel_version = node["kernel"]["release"]
package "linux-image-extra-#{kernel_version}" do
notifies :run, "execute[modprobe_aufs]"
end
execute "modprobe_aufs" do
command "modprobe aufs"
action :nothing
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment