Optionaly enable copr repo during koschei upgrade

This commit is contained in:
Mikolaj Izdebski 2016-05-13 12:00:58 +00:00
parent 467242053f
commit 97a517383a

View file

@ -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