From 0d1517e203940b06dcbe024a294b3313c0b0bc4d Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Tue, 31 Oct 2017 20:30:57 +0000 Subject: [PATCH] Make the fmn upgrade playbook work with f26 and fmn-2.0 Signed-off-by: Jeremy Cline --- playbooks/manual/upgrade/fmn.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/playbooks/manual/upgrade/fmn.yml b/playbooks/manual/upgrade/fmn.yml index b2f2542646..0adb358f2b 100644 --- a/playbooks/manual/upgrade/fmn.yml +++ b/playbooks/manual/upgrade/fmn.yml @@ -14,14 +14,12 @@ - name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%} command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%} check_mode: no + when: env != "staging" - name: yum update FMN packages from main repo 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-tags-stg - when: testing - - name: yum update FMN packages from testing repo - yum: pkg=python-fmn state=latest enablerepo=epel-testing + when: env != "staging" + - name: Update FMN packages + package: name=python-fmn state=latest when: env == "staging" - name: verify the frontend and stop it @@ -78,6 +76,10 @@ - fmn-worker@3 - fmn-worker@4 + - name: Stop the celerybeat service + service: name=fmn-celerybeat state=stopped + when: env == "staging" + - name: Upgrade the database command: /usr/bin/alembic -c /usr/share/fmn/alembic.ini upgrade head args: @@ -92,6 +94,10 @@ - fmn-worker@3 - fmn-worker@4 + - name: Re-start the celerybeat service + service: name=fmn-celerybeat state=started + when: env == "staging" + - name: And... start the backend again service: name="fedmsg-hub" state=started