Use reflector timer not manual cron
This commit is contained in:
parent
1f1da2d77d
commit
bae2ef64a4
4 changed files with 31 additions and 5 deletions
|
@ -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
16
files/reflector.conf
Normal 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 }}
|
|
@ -5,4 +5,3 @@ collections:
|
|||
|
||||
roles:
|
||||
- src: geerlingguy.ntp
|
||||
- src: realorangeone.reflector
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue