type: ipmi
user: {{ node.power.user }}
{% elif node.power.type=='wakeonlan' %}
- type: etherwake
+ type: ether_wake
mac_address: {{ node.power.mac_address }}
{% endif %}
tags: {{ ' '.join(node.roles) }}
#Launch an instance
NET_UUID="$(nova net-list | grep private | awk '{ print $2 }')"
-IMAGE_UUID="$(nova image-list | grep Xenial | awk '{ print $2 }')"
+IMAGE_UUID="$(nova image-list | grep "Xenial x86_64" | awk '{ print $2 }')"
+IMAGE_LXD_UUID="$(nova image-list | grep "Xenial LXC x86_64" | awk '{ print $2 }')"
nova list | grep jumpserver2 ||nova boot --flavor m1.small --key-name default --image $IMAGE_UUID --nic net-id=$NET_UUID --security-group default jumpserver2
# checking jumpserver2 state until active ..
INST_STATE=` nova show jumpserver2 | grep status | awk '{print $4}'`
for s in precise trusty xenial win2012r2
do
#Create juju metadata
- IMAGE_UUID="$(nova image-list | grep -i $s | awk '{ print $2 }')"
+ IMAGE_UUID="$(nova image-list | grep -i "$s x86_64" | awk '{ print $2 }')"
+ IMAGE_LXC_UUID="$(nova image-list | grep -i "$s LXC x86_64" | awk '{ print $2 }')"
[ -n "$IMAGE_UUID" ] && $SSH "juju metadata generate-image -a amd64 -u $OS_AUTH_URL -i $IMAGE_UUID -r $OS_REGION_NAME -d juju-meta/ -s $s"
done