From 867e992d89914b3eb5897b53c3bb860cf319b600 Mon Sep 17 00:00:00 2001 From: Peter Makowski Date: Tue, 23 Jan 2024 12:24:54 +0100 Subject: [PATCH] fix: create maas admin prior to wait --- action.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 84adb0a..7948227 100644 --- a/action.yml +++ b/action.yml @@ -55,6 +55,12 @@ runs: run: | set -x sudo maas init region+rack --maas-url=${{inputs.maas-url}} --database-uri maas-test-db:/// + - name: Create MAAS administrator + shell: bash + run: | + sudo maas createadmin --username=administrator --password=test --email=fake@example.org + export API_KEY=`sudo maas apikey --username=administrator` + maas login administrator http://localhost:5240/MAAS $API_KEY - name: Wait for MAAS boot resources shell: bash - run: while [ $(maas admin boot-resources is-importing | cat) == "true" ]; do sleep 10; done; echo "syncing finished" + run: while [ $(maas administrator boot-resources is-importing | cat) == "true" ]; do sleep 10; done; echo "syncing finished"