blob: 27c6819a20d99f49da1fbd9f53bd85205d8e00a8 [file] [log] [blame]
David K. Bainbridgebe58a0d2016-06-22 15:43:02 -07001#!/bin/bash
2
3ID=$1
4HOSTNAME=$2
5IP=$3
6MAC=$4
7ROLE=$5
8
9LOG=/etc/maas/ansible/logs/$ID.log
10
11echo "" >> $LOG
12echo "***** BEGIN *****" >> $LOG
13echo "PROVISION $ID $HOSTNAME $IP $MAC $ROLE" >> $LOG
14
15SKIP_TAGS=
16EXTRA_VARS=--extra-vars=ansible_ssh_pass=onl
17
18echo "ANSIBLE_ROLES_PATH=/etc/maas/ansible/roles ansible-playbook -i $IP, /etc/maas/ansible/switch-node.yml $SKIP_TAGS $EXTRA_VARS" >> $LOG
19ANSIBLE_ROLES_PATH=/etc/maas/ansible/roles ansible-playbook -i $IP, /etc/maas/ansible/switch-node.yml $SKIP_TAGS $EXTRA_VARS >> $LOG
20