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