summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2017-02-17 04:31:47 +0000
committerNarinder Gupta <narinder.gupta@canonical.com>2017-02-17 05:02:49 +0000
commit8603e2e50510f3d76d8b990203f58c1916c33822 (patch)
tree86cf1abb13cf732bd4090836f06fba26cc961b2a /ci/deploy.sh
parent38256368b7d330e2ce1309cc0a64bf57bbeeae41 (diff)
fix searching with jq select
Change-Id: I98842799db56040c935336758db3de1e02825a41 Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 90463967..94ec5e8d 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -84,7 +84,7 @@ createresource() {
for node in node3-control node4-control
do
node_id=$(maas $PROFILE machines read | \
- jq -r "select(.[].hostname == \"$node\")[0].system_id")
+ jq -r ".[] | select(.hostname == \"$node\").system_id")
if [[ -z "$node_id" ]]; then
sudo virt-install --connect qemu:///system --name $node \
--ram 8192 --cpu host --vcpus 4 \
@@ -103,7 +103,7 @@ createresource() {
power_parameters_power_address="qemu+ssh://$USER@192.168.122.1/system" \
architecture='amd64/generic' power_parameters_power_id='node3-control'
node_id=$(maas $PROFILE machines read | \
- jq -r "select(.[].hostname == \"$node\")[0].system_id")
+ jq -r ".[] | select(.hostname == \"$node\").system_id")
fi
if [[ -z "$node_id" ]]; then
echo "Error: failed to create node $node ."