summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/open-contrail/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/open-contrail/tasks')
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/main.yml36
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml4
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml12
-rwxr-xr-xdeploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml4
4 files changed, 29 insertions, 27 deletions
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
index d7b9ceb3..f562fd99 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/main.yml
@@ -4,14 +4,15 @@
- name: backup rabbitmq-server
shell: cp /etc/init.d/rabbitmq-server /home/rabbitmq-server
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Disable Service Daemon
shell: if [ -f “\/opt\/service” ] ; then mv /opt/service /opt/service.bak ; fi
+ when: groups['opencontrail']|length !=0
- name: Install common on all hosts for Open Contrail
include: install/install-common.yml
- when: groups['controller']|length !=0
+ when: groups['opencontrail']|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
@@ -20,33 +21,33 @@
- name: Install database for Open Contrail
include: install/install-database.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Install config for Open Contrail
include: install/install-config.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Install config for Open Contrail
include: install/install-control.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Install collector for Open Contrail
include: install/install-collector.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Install webui for Open Contrail
include: install/install-webui.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Install compute for Open Contrail
include: install/install-compute.yml
- when: inventory_hostname in groups['compute']
+ when: groups['opencontrail']|length !=0 and inventory_hostname not in groups['opencontrail']
# or inventory_hostname in groups['opencontrail_tsn']
- name: Install interface on all hosts for Open Contrail
include: install/install-interface.yml
- when: groups['controller']|length !=0
+ when: groups['opencontrail']|length !=0
#- include: install/install-common.yml
#- include: install/install-kernel.yml
@@ -67,45 +68,46 @@
- name: Provision increase limits for Open Contrail
include: provision/provision-increase-limits.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
#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['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Provision config for Open Contrail
include: provision/provision-config.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Provision control for Open Contrail
include: provision/provision-control.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Provision collector for Open Contrail
include: provision/provision-collector.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Provision add nodes for Open Contrail
include: provision/provision-add-nodes.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Provision webui for Open Contrail
include: provision/provision-webui.yml
- when: inventory_hostname in groups['controller']
+ when: inventory_hostname in groups['opencontrail']
- name: Provision compute for Open Contrail
include: provision/provision-compute.yml
- when: inventory_hostname in groups['compute']
+ when: groups['opencontrail']|length !=0 and inventory_hostname not in groups['opencontrail']
- name: Enable Service Daemon
shell: if [ -f “\/opt\/service.bak” ] ; then mv /opt/service.bak /opt/service ; fi
+ when: groups['opencontrail']|length !=0
#- name: Provision tsn for Open Contrail
# include: provision/provision-tsn.yml
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml
index 67b72c7e..99c5bbc9 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-control.yml
@@ -17,14 +17,14 @@
dest: "/etc/ifmap-server/basicauthusers.properties"
# line: "{{ hostvars[item]['contrail_address' ] }}:{{ hostvars[item]['contrail_address' ] }}"
line: "{{ haproxy_hosts[item] }}:{{ haproxy_hosts[item] }}"
- with_items: groups['controller']
+ with_items: groups['opencontrail']
- name: "modify ifmap server basicauthusers properties for dns"
lineinfile:
dest: "/etc/ifmap-server/basicauthusers.properties"
# line: "{{ hostvars[item]['contrail_address' ] }}.dns:{{ hostvars[item]['contrail_address' ] }}.dns"
line: "{{ haproxy_hosts[item] }}.dns:{{ haproxy_hosts[item] }}.dns"
- with_items: groups['controller']
+ with_items: groups['opencontrail']
- name: "node-common"
include: -node-common.yml
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml
index 7ccb5af1..acb06596 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-database.yml
@@ -54,7 +54,7 @@
set_fact:
# dbseeds: "{{ hostvars[item.1][ contrail_address ] }}"
dbseeds: "{{ haproxy_hosts[item.1] }}"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
when: item.0 == 0
@@ -66,7 +66,7 @@
set_fact:
# dbseeds: "{{ dbseeds }},{{ hostvars[item.1]['contrail_address'] }}"
dbseeds: "{{ dbseeds }},{{ haproxy_hosts[item.1] }}"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
when: item.0 == 1
@@ -122,7 +122,7 @@
regexp: "server.{{ item.0 + 1 }}="
# line: "server.{{ item.0 + 1 }}={{ hostvars[item.1]['contrail_address'] }}:2888:3888"
line: "server.{{ item.0 + 1 }}={{ haproxy_hosts[item.1] }}:2888:3888"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
- name: "set zookeeper unique id"
@@ -130,7 +130,7 @@
template:
src: "../../templates/provision/zookeeper-unique-id.j2"
dest: "/var/lib/zookeeper/myid"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
when: item.1 == inventory_hostname
@@ -146,7 +146,7 @@
set_fact:
# zkaddrs: "{{ hostvars[item.1]['contrail_address'] }}:2181"
zkaddrs: "{{ haproxy_hosts[item.1] }}:2181"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
when: item.0 == 0
@@ -155,7 +155,7 @@
set_fact:
# zkaddrs: "{{ zkaddrs }},{{ hostvars[item.1]['contrail_address'] }}:2181"
zkaddrs: "{{ zkaddrs }},{{ haproxy_hosts[item.1] }}:2181"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
when: item.0 > 0
diff --git a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
index 7fa3ce9a..8ee4168a 100755
--- a/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
+++ b/deploy/adapters/ansible/roles/open-contrail/tasks/provision/provision-webui.yml
@@ -18,14 +18,14 @@
set_fact:
# cassandra_addrs: "'{{ hostvars[item.1]['contrail_address'] }}'"
cassandra_addrs: "'{{ haproxy_hosts[item.1] }}'"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
when: item.0 == 0
- name: "set second or more cassandra host addresses"
set_fact:
# cassandra_addrs: "{{ cassandra_addrs }}, '{{ hostvars[item.1]['contrail_address'] }}'"
cassandra_addrs: "{{ cassandra_addrs }}, '{{ haproxy_hosts[item.1] }}'"
- with_indexed_items: groups['controller']
+ with_indexed_items: groups['opencontrail']
when: item.0 > 0
- name: "modify webui global js"