Add an assert to koschei upgrade playbook
This commit is contained in:
parent
7d2375f040
commit
d1a665e8e4
1 changed files with 8 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
||||||
- koschei-watcher
|
- koschei-watcher
|
||||||
- name: upgrade koschei from copr repo
|
- name: upgrade koschei from copr repo
|
||||||
dnf: name="{{ item }}" state=latest enablerepo=msimacek-koschei
|
dnf: name="{{ item }}" state=latest enablerepo=msimacek-koschei
|
||||||
|
register: frontend_upgrade
|
||||||
when: env == 'staging' and testing
|
when: env == 'staging' and testing
|
||||||
with_items:
|
with_items:
|
||||||
- koschei-admin
|
- koschei-admin
|
||||||
|
@ -37,6 +38,7 @@
|
||||||
- koschei-backend-fedora
|
- koschei-backend-fedora
|
||||||
- name: upgrade koschei from production repo
|
- name: upgrade koschei from production repo
|
||||||
dnf: name="{{ item }}" state=latest
|
dnf: name="{{ item }}" state=latest
|
||||||
|
register: frontend_upgrade
|
||||||
when: env != 'staging' or not testing
|
when: env != 'staging' or not testing
|
||||||
with_items:
|
with_items:
|
||||||
- koschei-admin
|
- koschei-admin
|
||||||
|
@ -70,12 +72,14 @@
|
||||||
service: name="httpd" state=stopped
|
service: name="httpd" state=stopped
|
||||||
- name: upgrade koschei from testing repo
|
- name: upgrade koschei from testing repo
|
||||||
yum: name="{{ item }}" state=latest update_cache=yes enablerepo=msimacek-koschei
|
yum: name="{{ item }}" state=latest update_cache=yes enablerepo=msimacek-koschei
|
||||||
|
register: backend_upgrade
|
||||||
when: env == 'staging' and testing
|
when: env == 'staging' and testing
|
||||||
with_items:
|
with_items:
|
||||||
- koschei-frontend
|
- koschei-frontend
|
||||||
- koschei-frontend-fedora
|
- koschei-frontend-fedora
|
||||||
- name: upgrade koschei from production repo
|
- name: upgrade koschei from production repo
|
||||||
yum: name="{{ item }}" state=latest update_cache=yes
|
yum: name="{{ item }}" state=latest update_cache=yes
|
||||||
|
register: backend_upgrade
|
||||||
when: env != 'staging' or not testing
|
when: env != 'staging' or not testing
|
||||||
with_items:
|
with_items:
|
||||||
- koschei-frontend
|
- koschei-frontend
|
||||||
|
@ -116,3 +120,7 @@
|
||||||
- include: "{{ handlers }}/restart_services.yml"
|
- include: "{{ handlers }}/restart_services.yml"
|
||||||
roles:
|
roles:
|
||||||
- koschei/backend
|
- koschei/backend
|
||||||
|
|
||||||
|
- name: Check whether an update happened
|
||||||
|
assert:
|
||||||
|
that: backend_upgrade.changed and frontend_upgrade.changed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue