Scott Baker | 5042166 | 2016-06-27 22:09:48 -0700 | [diff] [blame] | 1 | #! /bin/bash |
| 2 | |
| 3 | source cmi-settings.sh |
| 4 | |
| 5 | echo "[ssh_connection]" > cmi.conf |
| 6 | echo "ssh_args = -o \"ProxyCommand ssh -q -i $NODE_KEY -o StrictHostKeyChecking=no root@$COMPUTE_NODE nc $MGMT_IP 22\"" >> cmi.conf |
| 7 | echo "scp_if_ssh = True" >> cmi.conf |
| 8 | echo "pipelining = True" >> cmi.conf |
| 9 | echo >> cmi.conf |
| 10 | echo "[defaults]" >> cmi.conf |
| 11 | echo "host_key_checking = False" >> cmi.conf |
| 12 | |
| 13 | echo "cmi ansible_ssh_private_key_file=$VM_KEY" > cmi.hosts |
| 14 | |
| 15 | export ANSIBLE_CONFIG=cmi.conf |
| 16 | export ANSIBLE_HOSTS=cmi.hosts |
| 17 | |
| 18 | ansible-playbook -v --step cmi-logicalinterfaces.yaml |