From 98cd5491809facf2eb1e58e82c3cb05d95992a1d Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Fri, 8 May 2015 15:37:07 +0200 Subject: cloud-init --- .../puppet/modules/sunet/manifests/cloudimage.pp | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp (limited to 'global/overlay/etc/puppet/modules/sunet/manifests') diff --git a/global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp b/global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp new file mode 100644 index 0000000..788fa41 --- /dev/null +++ b/global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp @@ -0,0 +1,32 @@ +define sunet::cloudimage ( + $src_image = undef, + $dhcp = true, + $size = "1G", + $bridge = "br0", + $mem = "1024", + $cpus = "1", + $resolver = undef, + $ip = undef, + $netmask = undef, + $gateway = undef, + $ip6 = undef, + $netmask6 = "64", + $gateway6 = undef, + $tag = undef, + $repo = undef +) +{ + package {'mtools': require => latest } + package {'libvirt-bin': require => latest } + package {'uuid-runtime': require => latest } + + file { "/var/lib/libvirt/cloud-init": + ensure => directory + } + file { "/var/lib/libvirt/cloud-init/${name}.sh": + content => template("cloudimage/mk_cloud_image.erb") + } -> + exec { "/var/lib/libvirt/cloud-init/${name}.sh": + refreshonly => true + } +} -- cgit v1.1