summaryrefslogtreecommitdiffstats
path: root/juju/get-cloud-images
diff options
context:
space:
mode:
authorDavid Blaisonneau <david.blaisonneau@orange.com>2016-08-23 15:46:29 +0200
committerDavid Blaisonneau <david.blaisonneau@orange.com>2016-08-24 09:57:16 +0200
commit46a806ee885899cafb36de103baea30ea9b75651 (patch)
tree8911c66a636d3bcf4c02cd49a29b9a854be736ee /juju/get-cloud-images
parent6f82b528dafd31e57b9a5f5a10154e35dfa96b8d (diff)
Get only images for LXC or not
Change-Id: I85ce3490c18635e25a81232b75b0ce49ba1f005a Signed-off-by: David Blaisonneau <david.blaisonneau@orange.com>
Diffstat (limited to 'juju/get-cloud-images')
-rwxr-xr-xjuju/get-cloud-images22
1 files changed, 13 insertions, 9 deletions
diff --git a/juju/get-cloud-images b/juju/get-cloud-images
index 162e4760..62d09af3 100755
--- a/juju/get-cloud-images
+++ b/juju/get-cloud-images
@@ -3,16 +3,20 @@
folder=/srv/data/
sudo mkdir $folder || true
-URLS=" \
-http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img \
-http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img \
-http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img \
-http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \
-http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 \
-http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img \
-http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-lxc.tar.gz \
-http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-root.tar.gz "
+if grep -q 'virt-type: lxd' bundles.yaml; then
+ URLS=" \
+ http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-lxc.tar.gz \
+ http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-root.tar.gz "
+else
+ URLS=" \
+ http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-amd64-disk1.img \
+ http://cloud-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img \
+ http://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img \
+ http://mirror.catn.com/pub/catn/images/qcow2/centos6.4-x86_64-gold-master.img \
+ http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2 \
+ http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img "
+fi
for URL in $URLS
do