mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-05-01 05:51:56 +08:00
50 lines
1.7 KiB
YAML
50 lines
1.7 KiB
YAML
---
|
|
- name: Push packages out
|
|
hosts: bugzilla2fedmsg:bugzilla2fedmsg_stg
|
|
user: root
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
vars:
|
|
testing: false
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
tasks:
|
|
- name: Clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
|
|
ansible.builtin.command: yum clean all {%if testing%} --enablerepo=infrastructure-tags-stg {%endif%}
|
|
check_mode: no
|
|
- name: Update bugzilla2fedmsg packages from main repo
|
|
ansible.builtin.package: name="python-bugzilla2fedmsg" state=latest
|
|
when: not testing
|
|
- name: Update bugzilla2fedmsg packages from testing repo
|
|
yum: name="python-bugzilla2fedmsg" state=latest enablerepo=infrastructure-tags-stg
|
|
when: testing
|
|
|
|
- name: Verify the backend and restart it
|
|
hosts: bugzilla2fedmsg:bugzilla2fedmsg_stg
|
|
user: root
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
handlers:
|
|
- import_tasks: "{{ handlers_path }}/restart_services.yml"
|
|
|
|
pre_tasks:
|
|
- name: Tell nagios to shush
|
|
nagios: action=downtime minutes=60 service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
|
delegate_to: noc01.rdu3.fedoraproject.org
|
|
ignore_errors: true
|
|
|
|
roles:
|
|
- bugzilla2fedmsg
|
|
|
|
post_tasks:
|
|
- service: name="moksha-hub" state=restarted
|
|
- name: Tell nagios to unshush
|
|
nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }}
|
|
delegate_to: noc01.rdu3.fedoraproject.org
|
|
ignore_errors: true
|