blob: 8cfe11c5e4d52689b40a2abcac128d49a23a0acb [file] [log] [blame]
Scott Baker50421662016-06-27 22:09:48 -07001#! /bin/bash
2
3source cmi-settings.sh
4
5#apt-get -y install sshpass
6
7echo "[ssh_connection]" > cmi.conf
8echo "ssh_args = -o \"ProxyCommand ssh -q -i $NODE_KEY -o StrictHostKeyChecking=no root@$COMPUTE_NODE nc $MGMT_IP 22\"" >> cmi.conf
9echo "scp_if_ssh = True" >> cmi.conf
10echo "pipelining = True" >> cmi.conf
11echo >> cmi.conf
12echo "[defaults]" >> cmi.conf
13echo "host_key_checking = False" >> cmi.conf
14
15echo "cmi ansible_ssh_private_key_file=$VM_KEY" > cmi.hosts
16
17export ANSIBLE_CONFIG=cmi.conf
18export ANSIBLE_HOSTS=cmi.hosts
19
20ansible-playbook -v cmi.yaml