diff options
author | Yifei Xue <xueyifei@huawei.com> | 2017-07-20 11:46:14 +0800 |
---|---|---|
committer | Justin chi <chigang@huawei.com> | 2017-07-21 01:35:06 +0000 |
commit | f12c7c6d19eb21cd99690271f4ef71794a24b683 (patch) | |
tree | cc75280865ce94d8cce3652d547e2b00abede889 | |
parent | 117130a7f905696ccf66f5eef38d1c0eb951629f (diff) |
Adjust the plugins directory structure
JIRA:-
Since there may be multiple roles in one plugin, so add
a level of roles to the directory.
Move the copy operation of ODL from configure_osa to
a new setup-opendaylgiht role.
Add excute_order in the plugin description of ODL.
Change-Id: I905fb84b11df201dc1436ec888f511e251bba89c
Signed-off-by: Yifei Xue <xueyifei@huawei.com>
Signed-off-by: chigang <chigang@huawei.com>
-rw-r--r-- | deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml | 1 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/config-osa/tasks/main.yml | 10 | ||||
-rw-r--r-- | plugins/ntp/roles/ntp/handlers/main.yml (renamed from plugins/ntp/handlers/main.yml) | 0 | ||||
-rw-r--r-- | plugins/ntp/roles/ntp/tasks/main.yml (renamed from plugins/ntp/tasks/main.yml) | 0 | ||||
-rw-r--r-- | plugins/ntp/roles/ntp/templates/ntp.conf.j2 (renamed from plugins/ntp/templates/ntp.conf.j2) | 0 | ||||
-rw-r--r-- | plugins/ntp/roles/ntp/vars/main.yml (renamed from plugins/ntp/vars/main.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/plugins.desc | 8 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/files/opendaylight.service (renamed from plugins/odl_cluster/files/opendaylight.service) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/handlers/main.yml (renamed from plugins/odl_cluster/handlers/main.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-1.yml (renamed from plugins/odl_cluster/tasks/control-agents-1.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-2.yml (renamed from plugins/odl_cluster/tasks/control-agents-2.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-3.yml (renamed from plugins/odl_cluster/tasks/control-agents-3.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-db-1.yml (renamed from plugins/odl_cluster/tasks/control-db-1.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-hosts-1.yml (renamed from plugins/odl_cluster/tasks/control-hosts-1.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-hosts-2.yml (renamed from plugins/odl_cluster/tasks/control-hosts-2.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-repos-1.yml (renamed from plugins/odl_cluster/tasks/control-repos-1.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-1.yml (renamed from plugins/odl_cluster/tasks/control-servers-1.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-2.yml (renamed from plugins/odl_cluster/tasks/control-servers-2.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-3.yml (renamed from plugins/odl_cluster/tasks/control-servers-3.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/main.yml (renamed from plugins/odl_cluster/tasks/main.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/odl_cluster/tasks/odl-post.yml (renamed from plugins/odl_cluster/tasks/odl-post.yml) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/templates/acl_conf.sh (renamed from plugins/odl_cluster/templates/acl_conf.sh) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/templates/custom.properties (renamed from plugins/odl_cluster/templates/custom.properties) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/templates/ml2_conf.sh (renamed from plugins/odl_cluster/templates/ml2_conf.sh) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/templates/org.apache.karaf.features.cfg (renamed from plugins/odl_cluster/templates/org.apache.karaf.features.cfg) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/vars/Debian.yml (renamed from plugins/odl_cluster/vars/Debian.yml) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/vars/RedHat.yml (renamed from plugins/odl_cluster/vars/RedHat.yml) | 0 | ||||
-rwxr-xr-x | plugins/odl_cluster/roles/odl_cluster/vars/main.yml (renamed from plugins/odl_cluster/vars/main.yml) | 0 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/setup-opendaylight/tasks/main.yml | 25 | ||||
-rw-r--r-- | plugins/odl_cluster/roles/setup-opendaylight/templates/setup-odl.yml.j2 (renamed from deploy/adapters/ansible/roles/config-osa/templates/setup-odl.yml.j2) | 0 | ||||
-rw-r--r-- | plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml (renamed from plugins/rt_kvm/tasks/kvm.yml) | 0 | ||||
-rw-r--r-- | plugins/rt_kvm/roles/rt_kvm/tasks/main.yml (renamed from plugins/rt_kvm/tasks/main.yml) | 0 | ||||
-rw-r--r-- | plugins/rt_kvm/roles/rt_kvm/vars/main.yml (renamed from plugins/rt_kvm/vars/main.yml) | 0 |
33 files changed, 32 insertions, 12 deletions
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml index 41139c5e..1e721aa6 100644 --- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml +++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml @@ -32,4 +32,5 @@ - role: setup-infrastructure - role: setup-openstack - role: setup-openvswitch + - role: setup-opendaylight - role: post-openstack diff --git a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml index c7663916..b1b32f77 100644 --- a/deploy/adapters/ansible/roles/config-osa/tasks/main.yml +++ b/deploy/adapters/ansible/roles/config-osa/tasks/main.yml @@ -58,16 +58,6 @@ src: setup-ovs.yml dest: /opt/openstack-ansible/playbooks -- name: copy setup-odl.yml - template: - src: setup-odl.yml.j2 - dest: /opt/openstack-ansible/playbooks/setup-odl.yml - -- name: copy odl_cluster role - copy: - src: /var/ansible/run/openstack_ocata-opnfv2/roles/odl_cluster - dest: /etc/ansible/roles/ - - name: copy flavor roles copy: src: os-flavor diff --git a/plugins/ntp/handlers/main.yml b/plugins/ntp/roles/ntp/handlers/main.yml index 866f31c3..866f31c3 100644 --- a/plugins/ntp/handlers/main.yml +++ b/plugins/ntp/roles/ntp/handlers/main.yml diff --git a/plugins/ntp/tasks/main.yml b/plugins/ntp/roles/ntp/tasks/main.yml index 031fb36d..031fb36d 100644 --- a/plugins/ntp/tasks/main.yml +++ b/plugins/ntp/roles/ntp/tasks/main.yml diff --git a/plugins/ntp/templates/ntp.conf.j2 b/plugins/ntp/roles/ntp/templates/ntp.conf.j2 index 697e4078..697e4078 100644 --- a/plugins/ntp/templates/ntp.conf.j2 +++ b/plugins/ntp/roles/ntp/templates/ntp.conf.j2 diff --git a/plugins/ntp/vars/main.yml b/plugins/ntp/roles/ntp/vars/main.yml index 708fa423..708fa423 100644 --- a/plugins/ntp/vars/main.yml +++ b/plugins/ntp/roles/ntp/vars/main.yml diff --git a/plugins/odl_cluster/plugins.desc b/plugins/odl_cluster/plugins.desc index 04e78f99..86413aef 100644 --- a/plugins/odl_cluster/plugins.desc +++ b/plugins/odl_cluster/plugins.desc @@ -49,8 +49,12 @@ plugin: orchestration: cm: ansible roles: - - role: opendaylight - phrase: post_openstack + - role: setup_opendaylight + excute_after: setup_openvswitch + inventory: + - localhost + - role: odl_cluster + excute_in: setup_opendaylight inventory: - neutron_all - galera_container diff --git a/plugins/odl_cluster/files/opendaylight.service b/plugins/odl_cluster/roles/odl_cluster/files/opendaylight.service index f4801a36..f4801a36 100644 --- a/plugins/odl_cluster/files/opendaylight.service +++ b/plugins/odl_cluster/roles/odl_cluster/files/opendaylight.service diff --git a/plugins/odl_cluster/handlers/main.yml b/plugins/odl_cluster/roles/odl_cluster/handlers/main.yml index 2650d072..2650d072 100755 --- a/plugins/odl_cluster/handlers/main.yml +++ b/plugins/odl_cluster/roles/odl_cluster/handlers/main.yml diff --git a/plugins/odl_cluster/tasks/control-agents-1.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-1.yml index dc071cc7..dc071cc7 100644 --- a/plugins/odl_cluster/tasks/control-agents-1.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-1.yml diff --git a/plugins/odl_cluster/tasks/control-agents-2.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-2.yml index f53a3ac8..f53a3ac8 100644 --- a/plugins/odl_cluster/tasks/control-agents-2.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-2.yml diff --git a/plugins/odl_cluster/tasks/control-agents-3.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-3.yml index 68446a83..68446a83 100644 --- a/plugins/odl_cluster/tasks/control-agents-3.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-agents-3.yml diff --git a/plugins/odl_cluster/tasks/control-db-1.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-db-1.yml index 3cef9792..3cef9792 100644 --- a/plugins/odl_cluster/tasks/control-db-1.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-db-1.yml diff --git a/plugins/odl_cluster/tasks/control-hosts-1.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-hosts-1.yml index 133d98a7..133d98a7 100644 --- a/plugins/odl_cluster/tasks/control-hosts-1.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-hosts-1.yml diff --git a/plugins/odl_cluster/tasks/control-hosts-2.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-hosts-2.yml index b8d9403a..b8d9403a 100644 --- a/plugins/odl_cluster/tasks/control-hosts-2.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-hosts-2.yml diff --git a/plugins/odl_cluster/tasks/control-repos-1.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-repos-1.yml index 8427e4f0..8427e4f0 100644 --- a/plugins/odl_cluster/tasks/control-repos-1.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-repos-1.yml diff --git a/plugins/odl_cluster/tasks/control-servers-1.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-1.yml index 459c734a..459c734a 100644 --- a/plugins/odl_cluster/tasks/control-servers-1.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-1.yml diff --git a/plugins/odl_cluster/tasks/control-servers-2.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-2.yml index 59b3aa2f..59b3aa2f 100644 --- a/plugins/odl_cluster/tasks/control-servers-2.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-2.yml diff --git a/plugins/odl_cluster/tasks/control-servers-3.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-3.yml index 3d5c307b..3d5c307b 100644 --- a/plugins/odl_cluster/tasks/control-servers-3.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/control-servers-3.yml diff --git a/plugins/odl_cluster/tasks/main.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/main.yml index 44359056..44359056 100644 --- a/plugins/odl_cluster/tasks/main.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/main.yml diff --git a/plugins/odl_cluster/tasks/odl-post.yml b/plugins/odl_cluster/roles/odl_cluster/tasks/odl-post.yml index 8794ff0c..8794ff0c 100644 --- a/plugins/odl_cluster/tasks/odl-post.yml +++ b/plugins/odl_cluster/roles/odl_cluster/tasks/odl-post.yml diff --git a/plugins/odl_cluster/templates/acl_conf.sh b/plugins/odl_cluster/roles/odl_cluster/templates/acl_conf.sh index 4962a17c..4962a17c 100755 --- a/plugins/odl_cluster/templates/acl_conf.sh +++ b/plugins/odl_cluster/roles/odl_cluster/templates/acl_conf.sh diff --git a/plugins/odl_cluster/templates/custom.properties b/plugins/odl_cluster/roles/odl_cluster/templates/custom.properties index f103c1b8..f103c1b8 100755 --- a/plugins/odl_cluster/templates/custom.properties +++ b/plugins/odl_cluster/roles/odl_cluster/templates/custom.properties diff --git a/plugins/odl_cluster/templates/ml2_conf.sh b/plugins/odl_cluster/roles/odl_cluster/templates/ml2_conf.sh index 0d42e48b..0d42e48b 100755 --- a/plugins/odl_cluster/templates/ml2_conf.sh +++ b/plugins/odl_cluster/roles/odl_cluster/templates/ml2_conf.sh diff --git a/plugins/odl_cluster/templates/org.apache.karaf.features.cfg b/plugins/odl_cluster/roles/odl_cluster/templates/org.apache.karaf.features.cfg index bc625cda..bc625cda 100755 --- a/plugins/odl_cluster/templates/org.apache.karaf.features.cfg +++ b/plugins/odl_cluster/roles/odl_cluster/templates/org.apache.karaf.features.cfg diff --git a/plugins/odl_cluster/vars/Debian.yml b/plugins/odl_cluster/roles/odl_cluster/vars/Debian.yml index c78c5221..c78c5221 100755 --- a/plugins/odl_cluster/vars/Debian.yml +++ b/plugins/odl_cluster/roles/odl_cluster/vars/Debian.yml diff --git a/plugins/odl_cluster/vars/RedHat.yml b/plugins/odl_cluster/roles/odl_cluster/vars/RedHat.yml index a2e6d01d..a2e6d01d 100755 --- a/plugins/odl_cluster/vars/RedHat.yml +++ b/plugins/odl_cluster/roles/odl_cluster/vars/RedHat.yml diff --git a/plugins/odl_cluster/vars/main.yml b/plugins/odl_cluster/roles/odl_cluster/vars/main.yml index 42e1acb1..42e1acb1 100755 --- a/plugins/odl_cluster/vars/main.yml +++ b/plugins/odl_cluster/roles/odl_cluster/vars/main.yml diff --git a/plugins/odl_cluster/roles/setup-opendaylight/tasks/main.yml b/plugins/odl_cluster/roles/setup-opendaylight/tasks/main.yml new file mode 100644 index 00000000..3abca829 --- /dev/null +++ b/plugins/odl_cluster/roles/setup-opendaylight/tasks/main.yml @@ -0,0 +1,25 @@ +############################################################################## +# 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: copy setup-odl.yml + template: + src: setup-odl.yml.j2 + dest: /opt/openstack-ansible/playbooks/setup-odl.yml + +- name: copy odl_cluster role + copy: + src: /var/ansible/run/openstack_ocata-opnfv2/roles/odl_cluster + dest: /etc/ansible/roles/ + +- name: setup odl + shell: "export ANSIBLE_LOG_PATH=/var/ansible/run/openstack_ocata-opnfv2/ansible.log; \ + cd /opt/openstack-ansible/playbooks; \ + openstack-ansible setup-odl.yml > /dev/null" + when: opendaylight is defined and opendaylight == "Enable" diff --git a/deploy/adapters/ansible/roles/config-osa/templates/setup-odl.yml.j2 b/plugins/odl_cluster/roles/setup-opendaylight/templates/setup-odl.yml.j2 index 18446ce5..18446ce5 100644 --- a/deploy/adapters/ansible/roles/config-osa/templates/setup-odl.yml.j2 +++ b/plugins/odl_cluster/roles/setup-opendaylight/templates/setup-odl.yml.j2 diff --git a/plugins/rt_kvm/tasks/kvm.yml b/plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml index 5d3ca7bc..5d3ca7bc 100644 --- a/plugins/rt_kvm/tasks/kvm.yml +++ b/plugins/rt_kvm/roles/rt_kvm/tasks/kvm.yml diff --git a/plugins/rt_kvm/tasks/main.yml b/plugins/rt_kvm/roles/rt_kvm/tasks/main.yml index e79fe9ff..e79fe9ff 100644 --- a/plugins/rt_kvm/tasks/main.yml +++ b/plugins/rt_kvm/roles/rt_kvm/tasks/main.yml diff --git a/plugins/rt_kvm/vars/main.yml b/plugins/rt_kvm/roles/rt_kvm/vars/main.yml index 9f32d13c..9f32d13c 100644 --- a/plugins/rt_kvm/vars/main.yml +++ b/plugins/rt_kvm/roles/rt_kvm/vars/main.yml |