Enable testing repos for koschei updates

This commit is contained in:
Michael Simacek 2016-09-08 15:55:16 +02:00
parent 029f5225ac
commit 25e5f2b22f
2 changed files with 16 additions and 10 deletions

View file

@ -1,4 +1,9 @@
--- ---
- include: koschei.yml - include: koschei.yml
vars: vars:
testing: yes fedora_repos:
- updates
- msimacek-koschei
epel_repos:
- epel-testing
- msimacek-koschei

View file

@ -28,7 +28,8 @@
- /srv/private/ansible/vars.yml - /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
vars: vars:
testing: False fedora_repos:
- updates
pre_tasks: pre_tasks:
- name: schedule nagios downtime - name: schedule nagios downtime
nagios: action=downtime minutes=20 service=host host={{ inventory_hostname_short }}{{ env_suffix }} nagios: action=downtime minutes=20 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
@ -37,9 +38,9 @@
when: env != 'staging' when: env != 'staging'
tasks: tasks:
- name: clean dnf metadata - name: clean dnf metadata
command: dnf {%if env == 'staging'%}--enablerepo msimacek-koschei{%endif%} clean all command: dnf {% for repo in fedora_repos %}--enablerepo {{ repo }}{% endfor %} clean all
- name: create dnf metadata cache - name: create dnf metadata cache
command: dnf {%if env == 'staging'%}--enablerepo msimacek-koschei{%endif%} makecache command: dnf {% for repo in fedora_repos %}--enablerepo {{ repo }}{% endfor %} makecache
- name: stop services - name: stop services
service: name="{{ item }}" state=stopped service: name="{{ item }}" state=stopped
with_items: with_items:
@ -51,7 +52,7 @@
dnf: dnf:
name: "{{ item }}" name: "{{ item }}"
state: latest state: latest
enablerepo: "{{ 'msimacek-koschei' if env == 'staging' and testing else omit }}" enablerepo: "{{ fedora_repos | join(',') }}"
register: backend_upgrade register: backend_upgrade
with_items: with_items:
- koschei-admin - koschei-admin
@ -65,7 +66,8 @@
- /srv/private/ansible/vars.yml - /srv/private/ansible/vars.yml
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
vars: vars:
testing: False epel_repos:
- epel-testing
pre_tasks: pre_tasks:
- name: schedule nagios downtime - name: schedule nagios downtime
nagios: action=downtime minutes=20 service=host host={{ inventory_hostname_short }}{{ env_suffix }} nagios: action=downtime minutes=20 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
@ -74,17 +76,16 @@
when: env != 'staging' when: env != 'staging'
tasks: tasks:
- name: clean yum metadata - name: clean yum metadata
command: yum {%if env == 'staging'%}--enablerepo msimacek-koschei{%endif%} clean all command: yum {% for repo in epel_repos %}--enablerepo {{ repo }}{% endfor %} clean all
- name: create yum metadata cache - name: create yum metadata cache
command: yum {%if env == 'staging'%}--enablerepo msimacek-koschei{%endif%} makecache command: yum {% for repo in epel_repos %}--enablerepo {{ repo }}{% endfor %} makecache
- name: stop httpd - name: stop httpd
service: name="httpd" state=stopped service: name="httpd" state=stopped
- name: upgrade koschei - name: upgrade koschei
yum: yum:
name: "{{ item }}" name: "{{ item }}"
state: latest state: latest
enablerepo: "{{ 'msimacek-koschei' if env == 'staging' and testing else omit }}" enablerepo: "{{ epel_repos | join(',') }}"
update_cache: yes
register: frontend_upgrade register: frontend_upgrade
with_items: with_items:
- koschei-frontend - koschei-frontend