Removed unused puppet lib chroot

This commit is contained in:
Alexander Trost
2015-10-06 08:51:02 +02:00
parent 3d3e61aea1
commit 4457e9aea3

View File

@@ -1,31 +0,0 @@
Puppet::Type.newtype(:chroot) do
ensurable
newparam(:release) do
desc "The name of the release"
isnamevar
end
newparam(:distro) do
desc "The name of the Linux distribution (Debian, Ubuntu)"
end
end
Puppet::Type.type(:chroot).provide(:chroot) do
def exists?
File.exists?("/var/lib/schroot/chroots/" + resource[:release] + "-amd64")
end
def create
if @resource[:distro] == "ubuntu"
mirror = "http://mirror.cc.columbia.edu/pub/linux/ubuntu/archive/"
else
mirror = "http://mirror.cc.columbia.edu/debian"
end
["amd64", "i386"].each { |x|
system("mk-sbuild #{@resource[:release]} --arch=#{x} --debootstrap-mirror=#{mirror} --distro=#{@resource[:distro]}")
}
end
def destroy
system("rm -rf /var/lib/schroot/chroots/#{@resource[:release]}-*")
end
end