diff --git a/roles/abrt/faf/tasks/check_web.yml b/roles/abrt/faf/tasks/check_web.yml index 6e7a606860..ebd25855e1 100644 --- a/roles/abrt/faf/tasks/check_web.yml +++ b/roles/abrt/faf/tasks/check_web.yml @@ -1,14 +1,6 @@ # check web functionality # -- set_fact: - url_suffix: "" - when: faf_web_on_root - -- set_fact: - url_suffix: "/faf" - when: not faf_web_on_root - - set_fact: main_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}" problems_url: "https://{{ ansible_default_ipv4.address }}{{ url_suffix }}/problems/" diff --git a/roles/abrt/faf/tasks/web.yml b/roles/abrt/faf/tasks/web.yml index ee3401dbf0..f786629528 100644 --- a/roles/abrt/faf/tasks/web.yml +++ b/roles/abrt/faf/tasks/web.yml @@ -16,11 +16,16 @@ notify: - restart httpd - # faf installs this file by itself if faf_web_on_root - # is disabled and is available under /faf +- set_fact: + url_suffix: "" + when: faf_web_on_root + +- set_fact: + url_suffix: "/faf" + when: not faf_web_on_root + - name: put webfaf on root (/) if configured template: src=etc-httpd-conf.d-faf-web.conf.j2 dest=/etc/httpd/conf.d/faf-web.conf - when: faf_web_on_root notify: - restart httpd diff --git a/roles/abrt/faf/templates/etc-httpd-conf.d-faf-web.conf.j2 b/roles/abrt/faf/templates/etc-httpd-conf.d-faf-web.conf.j2 index 1fdd289603..4c131b88e9 100644 --- a/roles/abrt/faf/templates/etc-httpd-conf.d-faf-web.conf.j2 +++ b/roles/abrt/faf/templates/etc-httpd-conf.d-faf-web.conf.j2 @@ -10,7 +10,7 @@ WSGIDaemonProcess faf user=faf group=faf processes=3 threads=5 {% set python = 'python2.7' %} {% endif %} -WSGIScriptAlias / /usr/lib/{{ python }}/site-packages/webfaf/hub.wsgi process-group=faf application-group=%{GLOBAL} +WSGIScriptAlias {{ url_suffix }} /usr/lib/{{ python }}/site-packages/webfaf/hub.wsgi process-group=faf application-group=%{GLOBAL}