aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/neutron-controller
diff options
context:
space:
mode:
authorbaigk <baiguoku@huawei.com>2015-08-06 02:37:33 -0400
committerbaigk <baiguoku@huawei.com>2015-08-09 22:47:56 -0400
commit87612abc0e24cafd89a49e350165b08fe1608233 (patch)
tree07b156c0268fd189f92e8a0730118edc51b8073f /deploy/adapters/ansible/roles/neutron-controller
parent5aedf594112c0749b6e9039d15b9fe70d210a942 (diff)
support deployment openstack juno with ansible for compass in centos7.1
JIRA: COMPASS-6 Change-Id: I8ef865e8acfe29c3ff5c7e9030e4cebabed3457b Signed-off-by: baigk <baiguoku@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/neutron-controller')
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml26
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml3
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml16
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/templates/nova.conf2
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/vars/Debian.yml4
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/vars/RedHat.yml7
-rw-r--r--deploy/adapters/ansible/roles/neutron-controller/vars/main.yml6
7 files changed, 26 insertions, 38 deletions
diff --git a/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml b/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml
index b4c1585d..a9d9bd18 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/handlers/main.yml
@@ -1,24 +1,4 @@
---
-- name: restart nova-api
- service: name=nova-api state=restarted enabled=yes
-
-- name: restart nova-cert
- service: name=nova-cert state=restarted enabled=yes
-
-- name: restart nova-consoleauth
- service: name=nova-consoleauth state=restarted enabled=yes
-
-- name: restart nova-scheduler
- service: name=nova-scheduler state=restarted enabled=yes
-
-- name: restart nova-conductor
- service: name=nova-conductor state=restarted enabled=yes
-
-- name: restart nova-novncproxy
- service: name=nova-novncproxy state=restarted enabled=yes
-
-- name: remove nova-sqlite-db
- shell: rm /var/lib/nova/nova.sqlite || touch nova.sqlite.db.removed
-
-- name: restart neutron-server
- service: name=neutron-server state=restarted enabled=yes
+- name: restart neutron control services
+ service: name={{ item }} state=restarted enabled=yes
+ with_items: services | union(services_noarch)
diff --git a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml
index 77cc29ae..c575b328 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_config.yml
@@ -6,5 +6,6 @@
retries: 5
delay: 3
notify:
- - restart neutron-server
+ - restart neutron control services
+- meta: flush_handlers
diff --git a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
index 08a8ce63..028419b5 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/tasks/neutron_install.yml
@@ -2,12 +2,12 @@
- include_vars: "{{ ansible_os_family }}.yml"
- name: install controller-related neutron packages
- action: "{{ ansible_pkg_mgr }} name={{ item }} state=present force=yes"
- with_items: packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: packages | union(packages_noarch)
-- name: generate neutron controll service list
+- name: generate neutron control service list
shell: echo {{ item }} >> /opt/service
- with_items: services
+ with_items: services | union(services_noarch)
- name: get tenant id to fill neutron.conf
shell: keystone --os-token={{ ADMIN_TOKEN }} --os-endpoint=http://{{ HA_VIP }}:35357/v2.0 tenant-get service | grep id | awk '{print $4}'
@@ -15,13 +15,9 @@
- name: update neutron conf
template: src=neutron.conf dest=/etc/neutron/neutron.conf backup=yes
- notify:
- - restart neutron-server
- name: update ml2 plugin conf
template: src=ml2_conf.ini dest=/etc/neutron/plugins/ml2/ml2_conf.ini backup=yes
- notify:
- - restart neutron-server
-
-- meta: flush_handlers
+- name: ln plugin.ini
+ file: src=/etc/neutron/plugins/ml2/ml2_conf.ini dest=/etc/neutron/plugin.ini state=link
diff --git a/deploy/adapters/ansible/roles/neutron-controller/templates/nova.conf b/deploy/adapters/ansible/roles/neutron-controller/templates/nova.conf
index 95870732..2b2bd9bb 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/templates/nova.conf
+++ b/deploy/adapters/ansible/roles/neutron-controller/templates/nova.conf
@@ -3,7 +3,7 @@ dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
-lock_path=/var/lock/nova
+lock_path=/var/lib/nova/tmp
force_dhcp_release=True
iscsi_helper=tgtadm
libvirt_use_virtio_for_bridges=True
diff --git a/deploy/adapters/ansible/roles/neutron-controller/vars/Debian.yml b/deploy/adapters/ansible/roles/neutron-controller/vars/Debian.yml
index c010e9a1..55800f78 100644
--- a/deploy/adapters/ansible/roles/neutron-controller/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/neutron-controller/vars/Debian.yml
@@ -2,7 +2,5 @@
packages:
- neutron-server
- neutron-plugin-ml2
-services:
- - neutron-server
- - neutron-plugin-ml2
+services: []
diff --git a/deploy/adapters/ansible/roles/neutron-controller/vars/RedHat.yml b/deploy/adapters/ansible/roles/neutron-controller/vars/RedHat.yml
new file mode 100644
index 00000000..14eb730c
--- /dev/null
+++ b/deploy/adapters/ansible/roles/neutron-controller/vars/RedHat.yml
@@ -0,0 +1,7 @@
+---
+packages:
+ - openstack-neutron
+ - openstack-neutron-ml2
+
+services:
+ - neutron-server
diff --git a/deploy/adapters/ansible/roles/neutron-controller/vars/main.yml b/deploy/adapters/ansible/roles/neutron-controller/vars/main.yml
new file mode 100644
index 00000000..453c1d5c
--- /dev/null
+++ b/deploy/adapters/ansible/roles/neutron-controller/vars/main.yml
@@ -0,0 +1,6 @@
+---
+packages_noarch: []
+
+services_noarch:
+ - neutron-server
+