From db67305282bec64dfe081099b14697adc83ebb02 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Sat, 9 May 2015 16:33:00 +0200 Subject: force ssh key on root --- .../modules/sunet/templates/cloudimage/mk_cloud_image.erb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'global/overlay/etc/puppet/modules/sunet/templates/cloudimage') diff --git a/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb b/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb index 2f76078..13c4f17 100644 --- a/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb +++ b/global/overlay/etc/puppet/modules/sunet/templates/cloudimage/mk_cloud_image.erb @@ -18,6 +18,7 @@ resolver="<%= @resolver %>" ip6="<%= @ip6 %>" gateway6="<%= @gateway6 %>" netmask6="<%= @netmask6 %>" +password="<%= @password %>" cd "/var/lib/libvirt/cloud-init" @@ -31,12 +32,15 @@ rm -f ${seed} truncate --size 2M ${seed} mkfs.vfat -n cidata ${seed} 2>/dev/null +if [ "x${password}" != "x" ]; then + pass="password: ${password}" +fi + user_data=$(mktemp) cat > ${user_data} <