aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/dashboard
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/dashboard
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/dashboard')
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml19
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/Debian.yml6
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml8
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/main.yml6
4 files changed, 23 insertions, 16 deletions
diff --git a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
index e43b6fd8..2cad1174 100644
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
@@ -2,26 +2,17 @@
- include_vars: "{{ ansible_os_family }}.yml"
- name: install dashboard 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: remove ubuntu theme
action: "{{ ansible_pkg_mgr }} name=openstack-dashboard-ubuntu-theme state=absent"
-## horizon configuration is already enabled in apache2/conf-enabled
-## by openstack-dashboard package deploy script.
-#- name: update dashboard conf
-# template: src=openstack-dashboard.conf
-# dest=/etc/apache2/sites-available/openstack-dashboard.conf
-# backup=yes
-
- name: update horizon settings
template: src=local_settings.py
dest=/etc/openstack-dashboard/local_settings.py
backup=yes
-- name: restart apache2
- service: name=apache2 state=restarted enabled=yes
-
-- name: restart memcached
- service: name=memcached state=restarted enabled=yes
+- name: restart dashboard services
+ service: name={{ item }} state=restarted enabled=yes
+ with_items: services | union(services_noarch)
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml b/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
index e6986f47..fee64c38 100644
--- a/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
@@ -1,6 +1,8 @@
---
packages:
- apache2
- - memcached
- libapache2-mod-wsgi
- - openstack-dashboard
+
+services:
+ - apache2
+ - memcached
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml b/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
new file mode 100644
index 00000000..f0acce9b
--- /dev/null
+++ b/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
@@ -0,0 +1,8 @@
+---
+packages:
+ - httpd
+ - mod_wsgi
+ - python-memcached
+
+services:
+ - httpd
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/main.yml b/deploy/adapters/ansible/roles/dashboard/vars/main.yml
new file mode 100644
index 00000000..b6a965c2
--- /dev/null
+++ b/deploy/adapters/ansible/roles/dashboard/vars/main.yml
@@ -0,0 +1,6 @@
+---
+packages_noarch:
+ - memcached
+ - openstack-dashboard
+
+services_noarch: []