Use reflector timer not manual cron

This commit is contained in:
Jake Howard 2023-07-29 19:24:06 +01:00
parent 1f1da2d77d
commit bae2ef64a4
Signed by: jake
GPG Key ID: 57AFB45680EDD477
4 changed files with 31 additions and 5 deletions

View File

@ -17,9 +17,6 @@
- include_role:
name: geerlingguy.ntp
- include_role:
name: realorangeone.reflector
- import_tasks: tasks/boot.yml
- import_tasks: tasks/i3.yml
- import_tasks: tasks/network.yml

16
files/reflector.conf Normal file
View File

@ -0,0 +1,16 @@
# Reflector configuration file for the systemd service.
# Set the output path where the mirrorlist will be saved (--save).
--save /etc/pacman.d/mirrorlist
# Select the transfer protocol (--protocol).
--protocol https
# Sort the mirrors by speed.
--sort rate
# Only consider recently synced mirrors
--age 24
# Multi-threaded
--threads {{ ansible_facts.processor_vcpus }}

View File

@ -5,4 +5,3 @@ collections:
roles:
- src: geerlingguy.ntp
- src: realorangeone.reflector

View File

@ -92,6 +92,20 @@
- name: Install pacman tools
kewlfft.aur.aur:
name: pacman-contrib
name: "{{ item }}"
loop:
- pacman-contrib
- reflector
become: true
become_user: aur_builder
- name: Install reflector config
template:
src: ./files/reflector.conf
dest: /etc/xdg/reflector/reflector.conf
mode: 0644
- name: Enable reflector
systemd:
name: reflector
enabled: true