lib/vagabond/cookbooks/lxc/recipes/default.rb in vagabond-0.2.0 vs lib/vagabond/cookbooks/lxc/recipes/default.rb in vagabond-0.2.2
- old
+ new
@@ -3,10 +3,19 @@
package lxcpkg
end
include_recipe 'lxc::install_dependencies'
+directory '/usr/local/bin' do
+ recursive true
+end
+
+cookbook_file '/usr/local/bin/lxc-awesome-ephemeral' do
+ source 'lxc-awesome-ephemeral'
+ mode 0755
+end
+
#if the server uses the apt::cacher-client recipe, re-use it
unless Chef::Config[:solo]
if File.exists?('/etc/apt/apt.conf.d/01proxy')
query = 'recipes:apt\:\:cacher-ng'
query += " AND chef_environment:#{node.chef_environment}" if node['apt']['cacher-client']['restrict_environment']
@@ -36,10 +45,14 @@
:mirror => node[:lxc][:mirror]
}
)
end
-#this just reloads the dnsmasq rules when
-service "lxc-net" do
- action :enable
- subscribes :restart, resources("template[/etc/default/lxc]")
+# this just reloads the dnsmasq rules when the template is adjusted
+service 'lxc-net' do
+ action [:enable]
+ subscribes :restart, resources("template[/etc/default/lxc]"), :immediately
+end
+
+service 'lxc' do
+ action [:enable, :start]
end