Since we no longer have any machines in phx2, I have tried to remove them from ansible. Note that there are still some places where we need to remove them still: nagios, dhcp, named were not touched, and in cases where it wasn't pretty clear what a conditional was doing I left it to be cleaned up later. Signed-off-by: Kevin Fenzi <kevin@scrye.com>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
- name: Do mm-backend stuff
|
|
hosts: mm-backend01.iad2.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 proto
|
|
copy: src=/var/lib/mirrormanager/mirrorlist_cache.proto dest=/root/mirrorlist_cache.proto-{{ ansible_date_time.date }} remote_src=yes
|
|
|
|
- name: Nuke borked proto
|
|
file: path=/var/lib/mirrormanager/mirrorlist_cache.proto state=absent
|
|
|
|
- name: Copy old proto/files into place
|
|
copy: src=/var/lib/mirrormanager/old/{{item}} dest=/var/lib/mirrormanager/{{item}} force=yes remote_src=yes
|
|
with_items:
|
|
- mirrorlist_cache.proto
|
|
- i2_netblocks.txt
|
|
- global_netblocks.txt
|
|
|
|
- name: Sync the proto
|
|
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
|
|
|
|
- name: Stop mirrorlist3
|
|
command: systemctl stop mirrorlist3
|
|
when: datacenter == 'iad2'
|