From 3263b7b76cf2b861d4251222771ba06334f3b521 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Tue, 20 Jun 2017 14:40:29 +0000 Subject: [PATCH] Adjust the notifs roles for the new release The new release of fmn merges fmn.web with fmn and several paths need adjusting. Signed-off-by: Jeremy Cline --- playbooks/manual/upgrade/fmn.yml | 2 +- roles/notifs/frontend/tasks/main.yml | 26 ++------------------ roles/notifs/frontend/templates/fmn.web.conf | 8 ------ 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/playbooks/manual/upgrade/fmn.yml b/playbooks/manual/upgrade/fmn.yml index e731fa92a0..1f10737ea1 100644 --- a/playbooks/manual/upgrade/fmn.yml +++ b/playbooks/manual/upgrade/fmn.yml @@ -15,7 +15,7 @@ command: yum clean all {%if testing%} --enablerepo=infrastructure-testing {%endif%} check_mode: no - name: yum update FMN packages from main repo - yum: name="python-fmn*" state=latest + yum: name="python-fmn" state=latest when: not testing - name: yum update FMN packages from testing repo yum: pkg=python-fmn state=latest enablerepo=infrastructure-testing diff --git a/roles/notifs/frontend/tasks/main.yml b/roles/notifs/frontend/tasks/main.yml index d33e1b78ce..55093fa087 100644 --- a/roles/notifs/frontend/tasks/main.yml +++ b/roles/notifs/frontend/tasks/main.yml @@ -4,9 +4,7 @@ - name: install needed packages yum: pkg={{ item }} state=present with_items: - - python-fmn-web - - python-fmn-lib - - python-fmn-rules + - python-fmn - python-psycopg2 - libsemanage-python - python-memcached @@ -58,22 +56,11 @@ - notifs - notifs/frontend -- name: setup symlink to fedora theme - file: > - src=/usr/share/fmn.web/static/bootstrap-3.3.4-fedora - dest=/usr/share/fmn.web/static/bootstrap - state=link - when: env != "staging" - tags: - - notifs - - notifs/frontend - - name: setup symlink to fedora theme file: > src=/usr/share/fmn/static/bootstrap-3.3.4-fedora dest=/usr/share/fmn/static/bootstrap state=link - when: env == "staging" tags: - notifs - notifs/frontend @@ -88,17 +75,8 @@ - notifs - notifs/frontend -- name: copy custom wsgi file - copy: src=fmn.web.wsgi dest=/usr/share/fmn.web/fmn.web.wsgi mode=0644 - notify: - - restart apache - tags: - - notifs - - notifs/frontend - - name: copy custom wsgi file copy: src=fmn.web.wsgi dest=/usr/share/fmn/fmn.web.wsgi mode=0644 - when: env == "staging" notify: - restart apache tags: @@ -132,7 +110,7 @@ - name: apply selinux type to static files file: > - dest=/usr/share/fmn.web/static + dest=/usr/share/fmn/static setype=httpd_sys_content_t state=directory recurse=yes diff --git a/roles/notifs/frontend/templates/fmn.web.conf b/roles/notifs/frontend/templates/fmn.web.conf index 1362f654c5..3ebce15945 100644 --- a/roles/notifs/frontend/templates/fmn.web.conf +++ b/roles/notifs/frontend/templates/fmn.web.conf @@ -1,8 +1,4 @@ -{% if env == 'staging' %} Alias /notifications/static /usr/share/fmn/static -{% else %} -Alias /notifications/static /usr/share/fmn.web/static -{% endif %} WSGIDaemonProcess fmn user=apache group=apache maximum-requests=1000 display-name=fmn processes={{ wsgi_procs }} threads={{ wsgi_threads }} WSGISocketPrefix run/wsgi @@ -10,11 +6,7 @@ WSGIRestrictStdout On WSGIRestrictSignal Off WSGIPythonOptimize 1 -{% if env == 'staging' %} WSGIScriptAlias /notifications /usr/share/fmn/fmn.web.wsgi -{% else %} -WSGIScriptAlias /notifications /usr/share/fmn.web/fmn.web.wsgi -{% endif %} WSGIProcessGroup fmn