From 86b4fd9459f9da9ff8523d1b32f35d0043676c94 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Tue, 29 Dec 2020 14:08:41 +0000 Subject: [PATCH] Updates on the boostrap-maas now for clouds. Use DHCP by default, as problems with AUTO Failed to allocate the required AUTO IP addresses after 2 retries. --- bootstrap-maas.sh | 40 +++++++++++++++++++++++++++++++--------- configs/rpi4-maas.config | 1 + manage-maas-nodes.sh | 2 +- 3 files changed, 33 insertions(+), 10 deletions(-) diff --git a/bootstrap-maas.sh b/bootstrap-maas.sh index 62861a9..6095ecd 100755 --- a/bootstrap-maas.sh +++ b/bootstrap-maas.sh @@ -226,7 +226,9 @@ add_cloud() { fi rand_uuid=$(uuid -F siv) cloud_name="$1" - maas_api_key=$(<~/.maas-api.key) + if [ -f ~/.maas-api.key ]; then + maas_api_key=$(<~/.maas-api.key) + fi cat > clouds-"$rand_uuid".yaml <=DEBUG +EOF + +if [[ -n "$package_repository" ]] ; then +cat >> clouds-"$rand_uuid".yaml <> clouds-"$rand_uuid".yaml <=DEBUG EOF +fi cat > credentials-"$rand_uuid".yaml < config-"$rand_uuid".yaml <> config-"$rand_uuid".yaml <