blob: fff600b8fefab3d977655d60bcd0fc3304913d42 [file] [log] [blame]
Matteo Scandoloede125b2017-08-08 13:05:25 -07001
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 Bakerc41914d2017-06-26 14:00:52 -070017#! /bin/bash
18
19source cmi-settings.sh
20
21echo "[ssh_connection]" > cmi.conf
22echo "ssh_args = -o \"ProxyCommand ssh -q -i $NODE_KEY -o StrictHostKeyChecking=no root@$COMPUTE_NODE nc $MGMT_IP 22\"" >> cmi.conf
23echo "scp_if_ssh = True" >> cmi.conf
24echo "pipelining = True" >> cmi.conf
25echo >> cmi.conf
26echo "[defaults]" >> cmi.conf
27echo "host_key_checking = False" >> cmi.conf
28
29echo "cmi ansible_ssh_private_key_file=$VM_KEY" > cmi.hosts
30
31export ANSIBLE_CONFIG=cmi.conf
32export ANSIBLE_HOSTS=cmi.hosts
33
34ansible-playbook -v --step cmi-logicalinterfaces.yaml