Add playbooks/manual/upgrade/hotness.yml[
This commit is contained in:
parent
f9d6a0d9d3
commit
abfe05d488
1 changed files with 50 additions and 0 deletions
50
playbooks/manual/upgrade/hotness.yml
Normal file
50
playbooks/manual/upgrade/hotness.yml
Normal file
|
@ -0,0 +1,50 @@
|
|||
- name: push packages out
|
||||
hosts: hotness;hotness-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:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
tasks:
|
||||
- name: clean all metadata {%if testing%}(with infrastructure-testing on){%endif%}
|
||||
command: yum clean all {%if testing%} --enablerepo=infrastructure-testing {%endif%}
|
||||
always_run: yes
|
||||
- name: yum update hotness packages from main repo
|
||||
yum: name="the-new-hotness" state=latest
|
||||
when: not testing
|
||||
- name: yum update hotness packages from testing repo
|
||||
yum: name="the-new-hotness" state=latest enablerepo=infrastructure-testing
|
||||
when: testing
|
||||
|
||||
- name: verify the backend and restart it
|
||||
hosts: hotness;hotness-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:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
||||
|
||||
pre_tasks:
|
||||
- name: tell nagios to shush
|
||||
nagios: action=downtime minutes=60 service=host host={{ inventory_hostname }}
|
||||
delegate_to: noc01.phx2.fedoraproject.org
|
||||
ignore_errors: true
|
||||
|
||||
roles:
|
||||
- hotness
|
||||
|
||||
tasks:
|
||||
- service: name="fedmsg-hub" state=restarted
|
||||
|
||||
post_tasks:
|
||||
- name: tell nagios to unshush
|
||||
nagios: action=unsilence service=host host={{ inventory_hostname }}
|
||||
delegate_to: noc01.phx2.fedoraproject.org
|
||||
ignore_errors: true
|
Loading…
Add table
Add a link
Reference in a new issue