diff options
author | Leif Johansson <leifj@sunet.se> | 2015-05-08 15:37:07 +0200 |
---|---|---|
committer | Leif Johansson <leifj@sunet.se> | 2015-05-08 15:37:07 +0200 |
commit | 98cd5491809facf2eb1e58e82c3cb05d95992a1d (patch) | |
tree | 04aa5dffc2e94e5d364b7984cefa3e089ed0f852 /global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp | |
parent | 2f4e4812443b7ea9ecced5707ba4ab41844f2e7e (diff) |
cloud-initsunet-ops-2015-05-08-v02
Diffstat (limited to 'global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp')
-rw-r--r-- | global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp | 32 |
1 files changed, 32 insertions, 0 deletions
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 + } +} |