From 1f331606007cce5ab28f18045944f4c764343065 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Wed, 25 Nov 2020 20:59:58 +0100 Subject: [PATCH] Add reflector configuration --- roles/arch/tasks/main.yml | 10 +++++++++- roles/arch/templates/reflector.j2 | 29 +++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 roles/arch/templates/reflector.j2 diff --git a/roles/arch/tasks/main.yml b/roles/arch/tasks/main.yml index 5231b57..3f56e66 100644 --- a/roles/arch/tasks/main.yml +++ b/roles/arch/tasks/main.yml @@ -26,9 +26,17 @@ mode: "0600" notify: restart nftables +- name: copy reflector configuration + become: yes + template: + src: "reflector.j2" + dest: "/etc/xdg/reflector/reflector.conf" + owner: root + group: root + mode: "0600" + # TODO # - network setup (laptop) -# - reflector setup # - pacman setup depending on platform (see include section for common options) - include_tasks: network.yml diff --git a/roles/arch/templates/reflector.j2 b/roles/arch/templates/reflector.j2 new file mode 100644 index 0000000..fbd1a42 --- /dev/null +++ b/roles/arch/templates/reflector.j2 @@ -0,0 +1,29 @@ +# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }} +# +# Reflector configuration file for the systemd service. +# +# Empty lines and lines beginning with "#" are ignored. All other lines should +# contain valid reflector command-line arguments. The lines are parsed with +# Python's shlex modules so standard shell syntax should work. All arguments are +# collected into a single argument list. +# +# See "reflector --help" for details. + +# Recommended Options + +# Set the output path where the mirrorlist will be saved (--save). +--save /etc/pacman.d/mirrorlist + +# Select the transfer protocol (--protocol). +--protocol https + +# Select the country (--country). +# Consult the list of available countries with "reflector --list-countries" and +# select the countries nearest to you or the ones that you trust. For example: +--country Germany,Netherlands,France + +# Use only the most recently synchronized mirrors (--latest). +#--latest 5 + +# Sort the mirrors by synchronization time (--sort). +--sort rate