blob: 27c6819a20d99f49da1fbd9f53bd85205d8e00a8 [file] [log] [blame]
#!/bin/bash
ID=$1
HOSTNAME=$2
IP=$3
MAC=$4
ROLE=$5
LOG=/etc/maas/ansible/logs/$ID.log
echo "" >> $LOG
echo "***** BEGIN *****" >> $LOG
echo "PROVISION $ID $HOSTNAME $IP $MAC $ROLE" >> $LOG
SKIP_TAGS=
EXTRA_VARS=--extra-vars=ansible_ssh_pass=onl
echo "ANSIBLE_ROLES_PATH=/etc/maas/ansible/roles ansible-playbook -i $IP, /etc/maas/ansible/switch-node.yml $SKIP_TAGS $EXTRA_VARS" >> $LOG
ANSIBLE_ROLES_PATH=/etc/maas/ansible/roles ansible-playbook -i $IP, /etc/maas/ansible/switch-node.yml $SKIP_TAGS $EXTRA_VARS >> $LOG