| #!/bin/ash |
| |
| 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 |
| |