Add playbook for releng to expire old repo versions
This depends on: https://github.com/fedora-infra/mirrormanager2/pull/154 Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
f7e53ac52d
commit
0f615ef6f4
1 changed files with 34 additions and 0 deletions
34
playbooks/manual/releng-emergency-expire-old-repo.yml
Normal file
34
playbooks/manual/releng-emergency-expire-old-repo.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
# Expire old repo metadata from mirrormanager
|
||||
#
|
||||
# This playbook will mark all older versions of a distro version to be outdated
|
||||
# so that metalink will not serve <alternates> for old versions.
|
||||
# CAUTION: Until mirrors pick up the new content, this will mean that the master
|
||||
# mirror is the only one deemed respectable, and as such should be used very
|
||||
# sparingly!
|
||||
#
|
||||
# requires --extra-vars="product=Fedora version=23"
|
||||
#
|
||||
# Possible product: Fedora/EPEL/RHEL
|
||||
|
||||
- name: Expire old repo files
|
||||
hosts: mm-backend01.phx2.fedoraproject.org
|
||||
user: root
|
||||
gather_facts: False
|
||||
|
||||
vars_files:
|
||||
- /srv/web/infra/ansible/vars/global.yml
|
||||
- "/srv/private/ansible/vars.yml"
|
||||
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
||||
|
||||
tasks:
|
||||
- name: Expire old files
|
||||
command: /usr/bin/mm2_emergency-expire-repo {{product}} {{version}}
|
||||
|
||||
- name: Recreate pickle
|
||||
command: /usr/bin/mm2_update-mirrorlist-server
|
||||
|
||||
- name: Sync the pickle
|
||||
command: /usr/local/bin/sync_pkl_to_mirrorlists.sh
|
||||
|
||||
handlers:
|
||||
- include: "{{ handlers }}/restart_services.yml"
|
Loading…
Add table
Add a link
Reference in a new issue