Fix nginx to work with RedHat/CentOS
The CentOS version of nginx uses a conf.d style directory for virtual hosts instead of a sites-available/sites-enabled approach. We can add a var to select where the configuration file is placed, and only perform the link on Debian based systems. Change-Id: I00b8af093e17a4450b642a1534b8ec647c9d2513
This commit is contained in:
parent
6b3af85bf2
commit
15733bbd2f
@ -37,7 +37,7 @@
|
||||
- name: Configure virtual hosts
|
||||
template:
|
||||
src: keystone_nginx.conf.j2
|
||||
dest: "/etc/nginx/sites-available/{{ item }}.conf"
|
||||
dest: "/etc/nginx/{{ keystone_nginx_conf_path }}/{{ item }}.conf"
|
||||
with_items: keystone_wsgi_program_names
|
||||
notify: Restart Nginx
|
||||
|
||||
@ -47,4 +47,5 @@
|
||||
path: "/etc/nginx/sites-enabled/{{ item }}.conf"
|
||||
state: link
|
||||
with_items: keystone_wsgi_program_names
|
||||
when: ansible_os_family == "Debian"
|
||||
notify: Restart Nginx
|
||||
|
@ -72,4 +72,6 @@ keystone_apache_configs:
|
||||
- { src: "keystone-httpd.conf.j2", dest: "/etc/httpd/conf.d/keystone-httpd.conf" }
|
||||
- { src: "keystone-httpd-mpm.conf.j2", dest: "/etc/httpd/conf.modules.d/mpm_{{ keystone_httpd_mpm_backend }}.conf" }
|
||||
|
||||
keystone_nginx_conf_path: "conf.d"
|
||||
|
||||
keystone_system_service_name: httpd
|
||||
|
@ -65,4 +65,6 @@ keystone_apache_configs:
|
||||
- { src: "keystone-httpd.conf.j2", dest: "/etc/apache2/sites-available/keystone-httpd.conf" }
|
||||
- { src: "keystone-httpd-mpm.conf.j2", dest: "/etc/apache2/mods-available/mpm_{{ keystone_httpd_mpm_backend }}.conf" }
|
||||
|
||||
keystone_nginx_conf_path: "sites-available"
|
||||
|
||||
keystone_system_service_name: apache2
|
||||
|
@ -65,4 +65,6 @@ keystone_apache_configs:
|
||||
- { src: "keystone-httpd.conf.j2", dest: "/etc/apache2/sites-available/keystone-httpd.conf" }
|
||||
- { src: "keystone-httpd-mpm.conf.j2", dest: "/etc/apache2/mods-available/mpm_{{ keystone_httpd_mpm_backend }}.conf" }
|
||||
|
||||
keystone_nginx_conf_path: "sites-available"
|
||||
|
||||
keystone_system_service_name: apache2
|
||||
|
Loading…
x
Reference in New Issue
Block a user