summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/dashboard')
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml13
-rw-r--r--deploy/adapters/ansible/roles/dashboard/templates/ports.j215
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/Debian.yml9
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml11
4 files changed, 25 insertions, 23 deletions
diff --git a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
index 9206fda4..dd5c6fd0 100644
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
@@ -1,13 +1,20 @@
---
- include_vars: "{{ ansible_os_family }}.yml"
+- name: install http packages
+ action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
+ with_items: http_packages
+
+- name: set http config
+ lineinfile: dest={{ http_config_file }} regexp='^Listen 80' line='Listen {{ internal_ip }}:80'
+
+- name: restart http services
+ service: name={{ http_service }} state=restarted enabled=yes
+
- name: install dashboard packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
with_items: packages | union(packages_noarch)
-- name: set apache2 config
- template: src=ports.j2 dest=/etc/apache2/ports.conf backup=yes
-
- name: remove ubuntu theme
action: "{{ ansible_pkg_mgr }} name=openstack-dashboard-ubuntu-theme state=absent"
diff --git a/deploy/adapters/ansible/roles/dashboard/templates/ports.j2 b/deploy/adapters/ansible/roles/dashboard/templates/ports.j2
deleted file mode 100644
index 0bfa0428..00000000
--- a/deploy/adapters/ansible/roles/dashboard/templates/ports.j2
+++ /dev/null
@@ -1,15 +0,0 @@
-# if you just change the port or add more ports here, you will likely also
-# have to change the VirtualHost statement in
-# /etc/apache2/sites-enabled/000-default.conf
-
-Listen {{ internal_ip }}:80
-
-<IfModule ssl_module>
- Listen 443
-</IfModule>
-
-<IfModule mod_gnutls.c>
- Listen 443
-</IfModule>
-
-# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml b/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
index fee64c38..97c4af40 100644
--- a/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
+++ b/deploy/adapters/ansible/roles/dashboard/vars/Debian.yml
@@ -1,8 +1,13 @@
---
-packages:
+http_packages:
- apache2
- libapache2-mod-wsgi
+http_service: apache2
+
+packages: []
+
services:
- - apache2
- memcached
+
+http_config_file: "/etc/apache2/ports.conf"
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml b/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
index f0acce9b..5e84901c 100644
--- a/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
@@ -1,8 +1,13 @@
---
-packages:
+http_packages:
- httpd
+
+http_service: httpd
+
+packages:
- mod_wsgi
- python-memcached
-services:
- - httpd
+services: []
+
+http_config_file: "/etc/httpd/conf/httpd.conf"