aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/odl_cluster/tasks/01_06_stop_openstack_services.yml
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/odl_cluster/tasks/01_06_stop_openstack_services.yml')
-rw-r--r--deploy/adapters/ansible/roles/odl_cluster/tasks/01_06_stop_openstack_services.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_06_stop_openstack_services.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_06_stop_openstack_services.yml
new file mode 100644
index 00000000..8dfaf4df
--- /dev/null
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_06_stop_openstack_services.yml
@@ -0,0 +1,42 @@
+##############################################################################
+# 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
+##############################################################################
+---
+
+- name: turn off neutron-server neutron-plugins-openvswitch-agent Daemon on control node
+ shell: >
+ sed -i '/{{ service_ovs_agent_name }}/d' /opt/service ;
+ sed -i '/neutron-server/d' /opt/service;
+ sed -i '/keepalived/d' /opt/service;
+
+- name: turn off neutron-server on control node
+ service: name=neutron-server state=stopped
+
+- name: turn off keepalived on control node
+ service: name=keepalived state=stopped
+ when: ansible_os_family == "Debian"
+
+################ l3 agent remove ###################
+
+- name: turn off neutron-l3-agent on control node
+ service: name=neutron-l3-agent state=stopped
+ when: odl_l3_agent == "Enable"
+
+- name: remove neutron-l3-agent daemon
+ shell: >
+ sed -i 'neutron-l3-agent/d' /opt/service ;
+ mv /etc/init.d/neutron-l3-agent /home/ ;
+ mv /etc/init/neutron-l3-agent.conf /home/ ;
+ when: odl_l3_agent == "Enable" and ansible_os_family == "Debian"
+
+- name: remove neutron-l3-agent daemon
+ shell: >
+ sed -i 'neutron-l3-agent/d' /opt/service ;
+ mv /lib/systemd/system/neutron-l3-agent.service /home/ ;
+ when: odl_l3_agent == "Enable" and ansible_os_family == "RedHat"
+