1
0
Fork 0

add bootstrap

Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com>
This commit is contained in:
Arnaud Morin 2022-01-08 23:43:13 +01:00
parent c23bd6a041
commit 27495640ab
3 changed files with 26 additions and 0 deletions

10
bootstrap.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
openstack server create \
--key-name arnaud-ovh \
--net Ext-Net \
--image 'Debian 10' \
--flavor d2-4 \
--user-data userdata/ansible101.sh \
--min 12 \
--max 12 \
isen

16
clean.sh Normal file
View File

@ -0,0 +1,16 @@
#!/bin/bash
todelete=""
IFS=$'\n'
for line in $(openstack server list -f value -c ID -c Name) ; do
id=$(echo $line | awk '{ print $1}')
name=$(echo $line | awk '{ print $2}')
if [[ "$name" =~ isen ]]; then
echo "Deleting $name"
todelete="$todelete $id"
fi
done
eval "openstack server delete $todelete"