From a9e76aa4c831cd2317653d9930afbefa92bfb920 Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Thu, 17 May 2018 17:50:19 +0000 Subject: [PATCH] Bodhi's OS playbook always scales up at the end. Also, use the OS master group vars instead of host names. Signed-off-by: Randy Barlow --- playbooks/manual/upgrade/bodhi.yml | 4 ++-- playbooks/openshift-apps/bodhi.yml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/playbooks/manual/upgrade/bodhi.yml b/playbooks/manual/upgrade/bodhi.yml index dfb787f7ea..f52328d781 100644 --- a/playbooks/manual/upgrade/bodhi.yml +++ b/playbooks/manual/upgrade/bodhi.yml @@ -62,7 +62,7 @@ register: latest_migration_version - name: Stop the front end if there are migrations to run - hosts: os-master01.stg.phx2.fedoraproject.org:os-master01.phx2.fedoraproject.org + hosts: os-masters[0]:os-masters-stg[0] user: root vars_files: - /srv/web/infra/ansible/vars/global.yml @@ -123,7 +123,7 @@ ignore_errors: true - name: restart the frontend - hosts: os-master01.stg.phx2.fedoraproject.org:os-master01.phx2.fedoraproject.org + hosts: os-masters[0]:os-masters-stg[0] user: root vars_files: - /srv/web/infra/ansible/vars/global.yml diff --git a/playbooks/openshift-apps/bodhi.yml b/playbooks/openshift-apps/bodhi.yml index 90e67afd6b..53fb28daed 100644 --- a/playbooks/openshift-apps/bodhi.yml +++ b/playbooks/openshift-apps/bodhi.yml @@ -83,3 +83,11 @@ - role: openshift/rollout app: bodhi dcname: bodhi-web + + post_tasks: + - name: Scale up pods + command: oc -n bodhi scale dc/bodhi-web --replicas={{ groupvars['bodhi2']['openshift_pods'] }} + when: env != "staging" + - name: Scale up pods + command: oc -n bodhi scale dc/bodhi-web --replicas={{ groupvars['bodhi2-stg']['openshift_pods'] }} + when: env == "staging"