summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible')
-rw-r--r--deploy/adapters/ansible/roles/dashboard/tasks/main.yml8
-rw-r--r--deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j221
-rw-r--r--deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml2
3 files changed, 31 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
index ce4fd978..da6990c4 100644
--- a/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
+++ b/deploy/adapters/ansible/roles/dashboard/tasks/main.yml
@@ -53,6 +53,14 @@
notify:
- restart dashboard services
+- name: update apache2 configs redhat
+ template:
+ src: openstack-dashboard-redhat.conf.j2
+ dest: '{{ apache_config_dir }}/conf.d/openstack-dashboard.conf'
+ when: ansible_os_family == 'RedHat'
+ notify:
+ - restart dashboard services
+
- name: enable dashboard
file:
src: "/etc/apache2/sites-available/openstack-dashboard.conf"
diff --git a/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j2 b/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j2
new file mode 100644
index 00000000..d4d1f297
--- /dev/null
+++ b/deploy/adapters/ansible/roles/dashboard/templates/openstack-dashboard-redhat.conf.j2
@@ -0,0 +1,21 @@
+{% set work_threads = (ansible_processor_vcpus + 1) // 2 %}
+
+WSGIDaemonProcess horizon processes={{ work_threads }} threads={{ work_threads }}
+WSGIProcessGroup horizon
+WSGISocketPrefix run/wsgi
+
+WSGIScriptAlias /horizon {{ horizon_dir }}/openstack_dashboard/wsgi/django.wsgi
+Alias /horizon/static {{ horizon_dir }}/static
+
+<Directory {{ horizon_dir }}/openstack_dashboard/wsgi>
+ Options All
+ AllowOverride All
+ Require all granted
+</Directory>
+
+<Directory {{ horizon_dir }}/static>
+ Options All
+ AllowOverride All
+ Require all granted
+</Directory>
+
diff --git a/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml b/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
index d213381a..651cbee3 100644
--- a/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/dashboard/vars/RedHat.yml
@@ -15,3 +15,5 @@ services:
- httpd
http_config_file: "/etc/httpd/conf/httpd.conf"
+apache_config_dir: /etc/httpd
+horizon_dir: /usr/share/openstack-dashboard