43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
- name: Do mm-backend stuff
|
|
hosts: mm-backend01.phx2.fedoraproject.org
|
|
user: root
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
tasks:
|
|
- name: Copy borked pkl
|
|
copy: src=/var/lib/mirrormanager/mirrorlist_cache.pkl dest=/root/mirrorlist_cache.pkl-{{ ansible_date_time.date }} remote_src=yes
|
|
|
|
- name: Nuke borked pkl
|
|
file: path=/var/lib/mirrormanager/mirrorlist_cache.pkl state=absent
|
|
|
|
- name: Copy old pkl/files into place
|
|
copy: src=/var/lib/mirrormanager/old/{{item}} dest=/var/lib/mirrormanager/{{item}} force=yes remote_src=yes
|
|
with_items:
|
|
- mirrorlist_cache.pkl
|
|
- i2_netblocks.txt
|
|
- global_netblocks.txt
|
|
|
|
- name: Sync the pkl
|
|
command: /usr/local/bin/sync_pkl_to_mirrorlists.sh
|
|
become: yes
|
|
become_user: mirrormanager
|
|
|
|
- name: Do mm-proxy stuff
|
|
hosts: mirrorlist-proxies
|
|
user: root
|
|
|
|
vars_files:
|
|
- /srv/web/infra/ansible/vars/global.yml
|
|
- "/srv/private/ansible/vars.yml"
|
|
- /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml
|
|
|
|
tasks:
|
|
- name: Restart mirrorlist1
|
|
command: systemctl restart mirrorlist1
|
|
|
|
- name: Stop mirrorlist2
|
|
command: systemctl stop mirrorlist2
|