aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2018-03-19 01:47:15 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-03-19 01:47:15 +0000
commit8b3883f549f78f8892608003b0b9f9131ecc551a (patch)
tree6d59017443a66350ee658dfb097fcf54435a0c29
parent5cb3ed55f09fb23a65a4a4bc03c8e4830ad1573d (diff)
parent0fe066df1ec07d485f5d510e5cec5b7a082dcb58 (diff)
Merge "Copy ml2_conf.ini to ODL hosts"
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml7
-rwxr-xr-xplugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml18
2 files changed, 25 insertions, 0 deletions
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml
index c4451ca2..1eb68871 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/control-servers-3.yml
@@ -26,3 +26,10 @@
become: "yes"
become_user: "neutron"
when: odl_sfc == "Enable"
+
+- name: fetch ml2_conf.ini to compass-tasks
+ fetch:
+ src: /etc/neutron/plugins/ml2/ml2_conf.ini
+ dest: /tmp/
+ flat: "yes"
+ when: odl_sfc == "Enable"
diff --git a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml
index 9f1cb79e..55b0e160 100755
--- a/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml
+++ b/plugins/odl_sfc/roles/setup-odl-sfc/tasks/odl-post.yml
@@ -32,3 +32,21 @@
- name: restart opendaylight
shell: sleep 60; service opendaylight restart; sleep 60;
when: inventory_hostname in groups['network_hosts']
+
+- name: creat ml2 directory on ODL hosts
+ file:
+ path: /etc/neutron/plugins/ml2/
+ state: directory
+ mode: 0755
+ when:
+ - inventory_hostname in groups['network_hosts']
+ - odl_sfc == "Enable"
+
+- name: copy ml2_conf.ini to ODL hosts
+ copy:
+ src: /tmp/ml2_conf.ini
+ dest: /etc/neutron/plugins/ml2/ml2_conf.ini
+ mode: 0755
+ when:
+ - inventory_hostname in groups['network_hosts']
+ - odl_sfc == "Enable"