1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/mirrorsync/tasks/sync.yml
Evangelos Foutras 43eb814bcf
Combine sync{archive,debug,riscv} into mirrorsync
These roles are very similar and can be merged into a single new role.

Note: The archive mirror is changed from a 4-hour sync to minutely for
conformity with the other two mirrors. In practice this doesn't matter
as it was already taking over 4 hours to finish and was starting again
right after its previous run.
2022-09-28 21:52:52 +03:00

12 lines
626 B
YAML

- name: Install sync script for {{ item.key }}
template: src=mirrorsync.j2 dest=/usr/local/bin/sync{{ item.key }} owner=root group=root mode=0755
- name: Install systemd service for {{ item.key }}
template: src=mirrorsync.service.j2 dest=/etc/systemd/system/sync{{ item.key }}.service owner=root group=root mode=0644
- name: Install systemd timer for {{ item.key }}
template: src=mirrorsync.timer.j2 dest=/etc/systemd/system/sync{{ item.key }}.timer owner=root group=root mode=0644
- name: Start and enable timer for {{ item.key }}
systemd: name=sync{{ item.key }}.timer enabled=yes state=started daemon_reload=yes