Merge "Fix apache + uwsgi for keystone"
This commit is contained in:
@@ -99,3 +99,26 @@
|
|||||||
- ansible_pkg_mgr == 'apt'
|
- ansible_pkg_mgr == 'apt'
|
||||||
notify:
|
notify:
|
||||||
- Restart service
|
- Restart service
|
||||||
|
|
||||||
|
## NOTE(cloudnull):
|
||||||
|
## Module enable/disable process is only functional on Debian based systems.
|
||||||
|
- name: Enable/disable proxy_http
|
||||||
|
apache2_module:
|
||||||
|
name: proxy_http
|
||||||
|
state: "{{ (keystone_mod_wsgi_enabled | bool) | ternary('absent', 'present') }}"
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr == 'apt'
|
||||||
|
notify:
|
||||||
|
- Restart service
|
||||||
|
|
||||||
|
## NOTE(andymccr):
|
||||||
|
## We need to enable a module for httpd on RedHat/CentOS using LoadModule inside conf files
|
||||||
|
- name: Enable/disable proxy_uwsgi_module
|
||||||
|
lineinfile:
|
||||||
|
dest: '/etc/httpd/conf.modules.d/00-proxy.conf'
|
||||||
|
line: 'LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so'
|
||||||
|
state: "{{ (keystone_mod_wsgi_enabled | bool) | ternary('absent', 'present') }}"
|
||||||
|
when:
|
||||||
|
- ansible_pkg_mgr == 'yum'
|
||||||
|
notify:
|
||||||
|
- Restart service
|
||||||
|
|||||||
@@ -120,7 +120,7 @@
|
|||||||
tags:
|
tags:
|
||||||
- keystone-install
|
- keystone-install
|
||||||
- keystone-config
|
- keystone-config
|
||||||
when: not keystone_apache_enabled | bool
|
when: not keystone_mod_wsgi_enabled | bool
|
||||||
|
|
||||||
- name: Flush handlers
|
- name: Flush handlers
|
||||||
meta: flush_handlers
|
meta: flush_handlers
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
<VirtualHost *:{{ keystone_service_port }}>
|
<VirtualHost *:{{ keystone_service_port }}>
|
||||||
|
{% if keystone_mod_wsgi_enabled | bool -%}
|
||||||
WSGIDaemonProcess keystone-service user={{ keystone_system_user_name }} group={{ keystone_system_group_name }} processes={{ keystone_wsgi_processes }} threads={{ keystone_wsgi_threads }} display-name=%{GROUP} python-path={{ keystone_bin | dirname }}/lib/python2.7/site-packages
|
WSGIDaemonProcess keystone-service user={{ keystone_system_user_name }} group={{ keystone_system_group_name }} processes={{ keystone_wsgi_processes }} threads={{ keystone_wsgi_threads }} display-name=%{GROUP} python-path={{ keystone_bin | dirname }}/lib/python2.7/site-packages
|
||||||
|
|
||||||
WSGIProcessGroup keystone-service
|
WSGIProcessGroup keystone-service
|
||||||
@@ -57,7 +58,6 @@
|
|||||||
WSGIScriptAliasMatch ^(/v3/OS-FEDERATION/identity_providers/.*?/protocols/.*?/auth)$ /var/www/cgi-bin/keystone/main/$1
|
WSGIScriptAliasMatch ^(/v3/OS-FEDERATION/identity_providers/.*?/protocols/.*?/auth)$ /var/www/cgi-bin/keystone/main/$1
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if keystone_mod_wsgi_enabled | bool -%}
|
|
||||||
<Directory /var/www/cgi-bin/keystone>
|
<Directory /var/www/cgi-bin/keystone>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
@@ -65,12 +65,12 @@
|
|||||||
allow from all
|
allow from all
|
||||||
</Directory>
|
</Directory>
|
||||||
{% else %}
|
{% else %}
|
||||||
ProxyPass / uwsgi://127.0.0.1:{{ keystone_uwsgi_ports[keystone-wsgi-public]["socket"] }}/
|
ProxyPass / uwsgi://127.0.0.1:{{ keystone_uwsgi_ports['keystone-wsgi-public']['socket'] }}/
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
<VirtualHost *:{{ keystone_admin_port }}>
|
<VirtualHost *:{{ keystone_admin_port }}>
|
||||||
|
{% if keystone_mod_wsgi_enabled | bool -%}
|
||||||
WSGIDaemonProcess keystone-admin user={{ keystone_system_user_name }} group={{ keystone_system_group_name }} processes={{ keystone_wsgi_processes }} threads={{ keystone_wsgi_threads }} display-name=%{GROUP} python-path={{ keystone_bin | dirname }}/lib/python2.7/site-packages
|
WSGIDaemonProcess keystone-admin user={{ keystone_system_user_name }} group={{ keystone_system_group_name }} processes={{ keystone_wsgi_processes }} threads={{ keystone_wsgi_threads }} display-name=%{GROUP} python-path={{ keystone_bin | dirname }}/lib/python2.7/site-packages
|
||||||
|
|
||||||
WSGIProcessGroup keystone-admin
|
WSGIProcessGroup keystone-admin
|
||||||
@@ -101,7 +101,6 @@
|
|||||||
SSLOptions +StdEnvVars +ExportCertData
|
SSLOptions +StdEnvVars +ExportCertData
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if keystone_mod_wsgi_enabled | bool -%}
|
|
||||||
<Directory /var/www/cgi-bin/keystone>
|
<Directory /var/www/cgi-bin/keystone>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
@@ -109,11 +108,10 @@
|
|||||||
allow from all
|
allow from all
|
||||||
</Directory>
|
</Directory>
|
||||||
{% else -%}
|
{% else -%}
|
||||||
ProxyPass / uwsgi://127.0.0.1:{{ keystone_uwsgi_ports[keystone-wsgi-admin]["socket"] }}/
|
ProxyPass / uwsgi://127.0.0.1:{{ keystone_uwsgi_ports['keystone-wsgi-admin']["socket"] }}/
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
{% if not keystone_mod_wsgi_enabled | bool -%}
|
{% if not keystone_mod_wsgi_enabled | bool -%}
|
||||||
ProxyPass /identity uwsgi://127.0.0.1:{{ keystone_uwsgi_ports[keystone-wsgi-public]['socket'] }}/
|
ProxyPass /identity uwsgi://127.0.0.1:{{ keystone_uwsgi_ports['keystone-wsgi-public']['socket'] }}/
|
||||||
ProxyPass /identity_admin uwsgi://127.0.0.1:{{ keystone_uwsgi_ports[keystone-wsgi-admin]['socket'] }}/
|
ProxyPass /identity_admin uwsgi://127.0.0.1:{{ keystone_uwsgi_ports['keystone-wsgi-admin']['socket'] }}/
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user