From 81c7f88b9655c1c0bfb9de6fa8efaa3e1698b3cb Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Sat, 9 May 2015 16:12:34 +0200 Subject: consolidate --- .../overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (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 index d4501a4..a232b61 100644 --- a/global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp +++ b/global/overlay/etc/puppet/modules/sunet/manifests/cloudimage.pp @@ -27,14 +27,12 @@ define sunet::cloudimage ( exec {"wget -O${image_src} ${image_url}": onlyif => "test ! -f ${image_src}" } - file { "/var/lib/libvirt/cloud-init": - ensure => directory - } - file { "/var/lib/libvirt/cloud-init/${name}.sh": + file { "/var/lib/libvirt/images": ensure => directory } -> + file { "/var/lib/libvirt/images/${name}/${name}-init.sh": content => template("sunet/cloudimage/mk_cloud_image.erb"), mode => "0755" } -> - exec { "/var/lib/libvirt/cloud-init/${name}.sh": - refreshonly => true + exec { "/var/lib/libvirt/images/${name}-init.sh": + onlyif => "test ! -f /var/lib/libvirt/images/${name}/${name}.img" } } -- cgit v1.1