blob: 76e2fdc0ffe8888bbb1a5928d11fd0a322ea00c9 [file] [log] [blame]
JianHao90e65dc2017-10-31 18:01:07 +08001# Copyright 2017-present Open Networking Foundation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15---
16- name: check flat_network interface
17 shell: ifconfig | grep -B1 "inet addr:{{ ts_ip }}" | awk '$1!="inet" && $1!="--" {print $1}'
18 args:
19 executable: /bin/bash
20 register: iface
21
22- name: disable TAS process
23 command: disable-tas
24
25- name: enable TS process
26 command: enable-ts
27
28- name: test response to test.py
29 expect:
30 command: ipcfg
31 responses:
32 Configure now?: "n"
33 Do you wish to Continue: "yes"
34 Designate management port: "{{ iface.stdout_lines }}"
35 IP Address: "{{ ts_ip }}"
36 Network Mask: "{{ ts_ip_mask }}"
37 Auto Negotiate: "yes"
38 IP Gateway: "{{ ts_gw }}"
39 Host Name: "{{ ts_host_name }}"
40 TAS IP Address: "{{ tas_ip }}"
41 NTP Server IP: "{{ ntp_ip }}"
42 System must be rebooted: "yes"
43 echo: yes