diff --git a/playbooks/manual/upgrade/koschei.yml b/playbooks/manual/upgrade/koschei.yml index 6755a8d57f..80e5c2063d 100644 --- a/playbooks/manual/upgrade/koschei.yml +++ b/playbooks/manual/upgrade/koschei.yml @@ -4,6 +4,8 @@ - /srv/web/infra/ansible/vars/global.yml - /srv/private/ansible/vars.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + vars: + testing: False handlers: - include: "{{ handlers }}/restart_services.yml" roles: @@ -17,10 +19,15 @@ tasks: - name: stop httpd service: name="httpd" state=stopped - - name: clean yum metadata - command: yum clean all - - name: upgrade koschei - package: name="{{ item }}" state=latest + - name: upgrade koschei from testing repo + yum: name="{{ item }}" state=latest update_cache=yes enablerepo=copr + when: testing + with_items: + - koschei-frontend + - koschei-frontend-fedora + - name: upgrade koschei from production repo + yum: name="{{ item }}" state=latest update_cache=yes + when: not testing with_items: - koschei-frontend - koschei-frontend-fedora @@ -31,6 +38,8 @@ - /srv/web/infra/ansible/vars/global.yml - /srv/private/ansible/vars.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + vars: + testing: False handlers: - include: "{{ handlers }}/restart_services.yml" roles: @@ -51,8 +60,16 @@ - koschei-watcher - name: clean dnf metadata command: dnf clean all - - name: upgrade koschei - package: name="{{ item }}" state=latest + - name: upgrade koschei from copr repo + dnf: name="{{ item }}" state=latest enablerepo=copr + when: copr_repo + with_items: + - koschei-admin + - koschei-backend + - koschei-backend-fedora + - name: upgrade koschei from production repo + dnf: name="{{ item }}" state=latest + when: not copr_repo with_items: - koschei-admin - koschei-backend