chef-lxc icon indicating copy to clipboard operation
chef-lxc copied to clipboard

Create & manage containers inside chef recipes

Open Jafaral opened this issue 9 years ago • 1 comments

Hi @ranjib

Thank you for this great work. I'm trying to create and manage containers using chef-lxc. I have one question : how do I change the template options from the recipe? If I use the example you provided like this:

require 'chef/lxc'
lxc "web" do
       template "download"
       action [:create, :start]
end

I get trusty/amd64 containers. What if I want to change that? is there away to do it using the same recipe?

Regards, Jafar

Jafaral avatar Oct 07 '16 18:10 Jafaral

I did dig into the sources and found it could be done like this:

template 'download' do
    args ['-d', 'ubuntu', '-r', 'trusty', '-a', 'amd64']
end

Thanks!

Jafaral avatar Oct 09 '16 03:10 Jafaral