Matteo Scandolo | ede125b | 2017-08-08 13:05:25 -0700 | [diff] [blame] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Scott Baker | c41914d | 2017-06-26 14:00:52 -0700 | [diff] [blame] | 17 | #! /bin/bash |
| 18 | |
| 19 | source cmi-settings.sh |
| 20 | |
| 21 | echo "[ssh_connection]" > cmi.conf |
| 22 | echo "ssh_args = -o \"ProxyCommand ssh -q -i $NODE_KEY -o StrictHostKeyChecking=no root@$COMPUTE_NODE nc $MGMT_IP 22\"" >> cmi.conf |
| 23 | echo "scp_if_ssh = True" >> cmi.conf |
| 24 | echo "pipelining = True" >> cmi.conf |
| 25 | echo >> cmi.conf |
| 26 | echo "[defaults]" >> cmi.conf |
| 27 | echo "host_key_checking = False" >> cmi.conf |
| 28 | |
| 29 | echo "cmi ansible_ssh_private_key_file=$VM_KEY" > cmi.hosts |
| 30 | |
| 31 | export ANSIBLE_CONFIG=cmi.conf |
| 32 | export ANSIBLE_HOSTS=cmi.hosts |
| 33 | |
| 34 | ansible-playbook -v --step cmi-logicalinterfaces.yaml |