aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-27 17:44:34 +0800
committerliyuenan <liyuenan@huawei.com>2017-01-05 09:42:35 +0800
commit92f6ca7bb6d7b2f295406aab34094b1dba76ff94 (patch)
treec4e62927a3bf9862f7ba9ce286cbece2c4335ef4 /deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml
parent6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (diff)
Yamllint test
JIRA: COMPASS-516 Change-Id: I482ce9bc86f4f963258c5b8823e0b00e83556eef Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml')
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml104
1 files changed, 0 insertions, 104 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml
deleted file mode 100755
index 8bd6dc06..00000000
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-tsn.yml
+++ /dev/null
@@ -1,104 +0,0 @@
-##############################################################################
-# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
----
-#- hosts: tsn
-# sudo: yes
-# tasks:
-
-- name: "enable supervisor vrouter"
- file:
- path: "/etc/init/supervisor-vrouter.override"
- state: "absent"
-
-- include: -node-common.yml
-
-- name: "fix up vrouter nodemgr param"
- template:
- src: "provision/vrouter-nodemgr-param.j2"
- dest: "/etc/contrail/vrouter_nodemgr_param"
-
-- name: "set contrail device name for ansible"
- set_fact:
- contrail_ansible_device: "ansible_{{ contrail_vhost_device }}"
-
-- name: "fix up default pmac"
- template:
- src: "provision/default-pmac.j2"
- dest: "/etc/contrail/default_pmac"
-
-- name: "copy agent param config from template"
- shell: "cp /etc/contrail/agent_param.tmpl /etc/contrail/agent_param"
-
-- name: "modify agent param config"
- lineinfile:
- dest: "/etc/contrail/agent_param"
- regexp: "dev=__DEVICE__"
- line: "dev={{ contrail_vhost_device }}"
-
-- name: "set vrouter agent mode"
- set_fact:
- contrail_vrouter_mode: "tsn"
-
-- name: "fix up contrail vrouter agent config"
- template:
- src: "../../templates/provision/contrail-vrouter-agent-conf.j2"
- dest: "/etc/contrail/contrail-vrouter-agent.conf"
-
-- name: "delete lines for contrail interface"
- shell: "{{ item }}"
- with_items:
- - "sed -e '/auto {{ contrail_vhost_device }}/,$d' /etc/network/interfaces > /tmp/contrail-interfaces-top"
- - "sed -n -e '/auto {{ contrail_vhost_device }}/,$p' /etc/network/interfaces > /tmp/contrail-interfaces-bottom"
- - "sed -i -e '/auto {{ contrail_vhost_device }}/d' /tmp/contrail-interfaces-bottom"
- - "sed -i -n -e '/auto .*/,$p' /tmp/contrail-interfaces-bottom"
- - "cat /tmp/contrail-interfaces-top /tmp/contrail-interfaces-bottom > /etc/network/interfaces"
-
-- name: "delete lines for vrouter interface"
- shell: "{{ item }}"
- with_items:
- - "sed -e '/auto vhost0/,$d' /etc/network/interfaces > /tmp/contrail-interfaces-top"
- - "sed -n -e '/auto vhost0/,$p' /etc/network/interfaces > /tmp/contrail-interfaces-bottom"
- - "sed -i -e '/auto vhost0/d' /tmp/contrail-interfaces-bottom"
- - "sed -i -n -e '/auto .*/,$p' /tmp/contrail-interfaces-bottom"
- - "cat /tmp/contrail-interfaces-top /tmp/contrail-interfaces-bottom > /etc/network/interfaces"
-
-- name: "configure interface"
- lineinfile:
- dest: "/etc/network/interfaces"
- line: "{{ item }}"
- state: "present"
- with_items:
- - "auto {{ contrail_vhost_device }}"
- - "iface {{ contrail_vhost_device }} inet manual"
- - "\tpre-up ifconfig {{ contrail_vhost_device }} up"
- - "\tpost-down ifconfig {{ contrail_vhost_device }} down"
- - "auto vhost0"
- - "iface vhost0 inet static"
- - "\tpre-up /opt/contrail/bin/if-vhost0"
- - "\tnetwork_name application"
- - "\taddress {{ contrail_vhost_address }}"
- - "\tnetmask {{ contrail_vhost_netmask }}"
-
-- name: "delete temporary files"
- file:
- dest: "{{ item }}"
- state: "absent"
- with_items:
- - "/tmp/contrail-interfaces-top"
- - "/tmp/contrail-interfaces-bottom"
-
-- name: "fix up contrail vrouter nodemgr config"
- ini_file:
- dest: "/etc/contrail/contrail-vrouter-nodemgr.conf"
- section: "DISCOVERY"
- option: "server"
- value: "{{ contrail_haproxy_address }}"
-
-- name: "add tsn to contrail"
- shell: "python /opt/contrail/utils/provision_vrouter.py --api_server_ip {{ contrail_haproxy_address }} --admin_user {{ contrail_admin_user }} --admin_password {{ contrail_admin_password }} --admin_tenant_name admin --openstack_ip {{ contrail_keystone_address }} --oper add --host_name {{ ansible_hostname }} --host_ip {{ contrail_address }} --router_type tor-service-node"