aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
diff options
context:
space:
mode:
authorchenshuai@huawei.com <chenshuai@huawei.com>2016-01-18 10:05:58 +0800
committerchenshuai@huawei.com <chenshuai@huawei.com>2016-01-18 10:14:45 +0800
commit77944ac2791a631cfa785d16cc32dae8082b2719 (patch)
tree76e6a13fdc27a61fb801f211169dfe33b9713e19 /deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
parentdd509497f4c6865b26cd2e7aa2ea0ecc501edb96 (diff)
bugfix: opencontrail automation deployment scripts
JIRA: COMPASS-277 Change-Id: Ia1f52c6e8e3de520cf06de99550c17879aaed2d7 Signed-off-by: chenshuai@huawei.com <chenshuai@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/open-contrail/tasks/main.yml')
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/main.yml44
1 files changed, 22 insertions, 22 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
index 2544b0ff..d7b9ceb3 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
@@ -2,14 +2,16 @@
- include_vars: "{{ ansible_os_family }}.yml"
+- name: backup rabbitmq-server
+ shell: cp /etc/init.d/rabbitmq-server /home/rabbitmq-server
+ when: inventory_hostname in groups['controller']
+
- name: Disable Service Daemon
- template:
- src: "/opt/service"
- dest: "/opt/service.backup"
+ shell: if [ -f “\/opt\/service” ] ; then mv /opt/service /opt/service.bak ; fi
- name: Install common on all hosts for Open Contrail
include: install/install-common.yml
- when: groups['opencontrail_control']|length !=0
+ when: groups['controller']|length !=0
# Compass install OpenStack with not only OpenContrail but also ODL or ONOS, and sometimes user just installs OpenStack, so item 'opencontrail_control' is kind of a mark that whether Compass install OpenContrail or not.
#- name: Install kernal on all hosts for Open Contrail
@@ -18,33 +20,33 @@
- name: Install database for Open Contrail
include: install/install-database.yml
- when: inventory_hostname in groups['opencontrail_database']
+ when: inventory_hostname in groups['controller']
- name: Install config for Open Contrail
include: install/install-config.yml
- when: inventory_hostname in groups['opencontrail_config']
+ when: inventory_hostname in groups['controller']
- name: Install config for Open Contrail
include: install/install-control.yml
- when: inventory_hostname in groups['opencontrail_control']
+ when: inventory_hostname in groups['controller']
- name: Install collector for Open Contrail
include: install/install-collector.yml
- when: inventory_hostname in groups['opencontrail_collector']
+ when: inventory_hostname in groups['controller']
- name: Install webui for Open Contrail
include: install/install-webui.yml
- when: inventory_hostname in groups['opencontrail_webui']
+ when: inventory_hostname in groups['controller']
- name: Install compute for Open Contrail
include: install/install-compute.yml
- when: inventory_hostname in groups['opencontrail_compute']
+ when: inventory_hostname in groups['compute']
# or inventory_hostname in groups['opencontrail_tsn']
- name: Install interface on all hosts for Open Contrail
include: install/install-interface.yml
- when: groups['opencontrail_control']|length !=0
+ when: groups['controller']|length !=0
#- include: install/install-common.yml
#- include: install/install-kernel.yml
@@ -65,47 +67,45 @@
- name: Provision increase limits for Open Contrail
include: provision/provision-increase-limits.yml
- when: inventory_hostname in groups['opencontrail_control']
+ when: inventory_hostname in groups['controller']
#or inventory_hostname in groups['opencontrail_config'] or inventory_hostname in groups['opencontrail_collector'] or inventory_hostname in groups['opencontrail_database']
- name: Provision database for Open Contrail
include: provision/provision-database.yml
- when: inventory_hostname in groups['opencontrail_database']
+ when: inventory_hostname in groups['controller']
- name: Provision config for Open Contrail
include: provision/provision-config.yml
- when: inventory_hostname in groups['opencontrail_config']
+ when: inventory_hostname in groups['controller']
- name: Provision control for Open Contrail
include: provision/provision-control.yml
- when: inventory_hostname in groups['opencontrail_control']
+ when: inventory_hostname in groups['controller']
- name: Provision collector for Open Contrail
include: provision/provision-collector.yml
- when: inventory_hostname in groups['opencontrail_collector']
+ when: inventory_hostname in groups['controller']
- name: Provision add nodes for Open Contrail
include: provision/provision-add-nodes.yml
- when: groups['opencontrail_control']|length !=0
+ when: inventory_hostname in groups['controller']
- name: Provision webui for Open Contrail
include: provision/provision-webui.yml
- when: inventory_hostname in groups['opencontrail_webui']
+ when: inventory_hostname in groups['controller']
- name: Provision compute for Open Contrail
include: provision/provision-compute.yml
- when: inventory_hostname in groups['opencontrail_compute']
+ when: inventory_hostname in groups['compute']
- name: Enable Service Daemon
- template:
- src: "/opt/service.backup"
- dest: "/opt/service"
+ shell: if [ -f “\/opt\/service.bak” ] ; then mv /opt/service.bak /opt/service ; fi
#- name: Provision tsn for Open Contrail
# include: provision/provision-tsn.yml