summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2024-02-17 12:29:29 -0500
committerJesse Luehrs <doy@tozt.net>2024-02-17 12:29:29 -0500
commit4ff7e214a977a1dacff42d2c406bf6c144957a11 (patch)
tree21c8eb46834f7d1b2c2747cdd3447da3ed84242b /modules
parente1cf695a7d40352015eebf80400c5248ae782619 (diff)
downloadpuppet-tozt-4ff7e214a977a1dacff42d2c406bf6c144957a11.tar.gz
puppet-tozt-4ff7e214a977a1dacff42d2c406bf6c144957a11.zip
use reflector for maintaining the mirrorlist
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/files/mirrorlist5
-rw-r--r--modules/mail/manifests/operatingsystem.pp5
-rw-r--r--modules/partofme/files/mirrorlist3
-rw-r--r--modules/partofme/manifests/operatingsystem.pp3
-rw-r--r--modules/reflector/files/reflector.conf6
-rw-r--r--modules/reflector/manifests/init.pp18
-rw-r--r--modules/tozt/files/mirrorlist5
-rw-r--r--modules/tozt/manifests/operatingsystem.pp5
8 files changed, 27 insertions, 23 deletions
diff --git a/modules/mail/files/mirrorlist b/modules/mail/files/mirrorlist
deleted file mode 100644
index d1c515d..0000000
--- a/modules/mail/files/mirrorlist
+++ /dev/null
@@ -1,5 +0,0 @@
-Server = https://arch.mirror.constant.com/$repo/os/$arch
-Server = https://mirrors.sorengard.com/archlinux/$repo/os/$arch
-Server = https://mirror.stephen304.com/archlinux/$repo/os/$arch
-Server = https://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch
-Server = https://mirrors.rit.edu/archlinux/$repo/os/$arch
diff --git a/modules/mail/manifests/operatingsystem.pp b/modules/mail/manifests/operatingsystem.pp
index 8a02700..8819bdf 100644
--- a/modules/mail/manifests/operatingsystem.pp
+++ b/modules/mail/manifests/operatingsystem.pp
@@ -1,7 +1,4 @@
class mail::operatingsystem {
+ include reflector
include wireguard
-
- file { '/etc/pacman.d/mirrorlist':
- source => 'puppet:///modules/mail/mirrorlist';
- }
}
diff --git a/modules/partofme/files/mirrorlist b/modules/partofme/files/mirrorlist
deleted file mode 100644
index 2d004c6..0000000
--- a/modules/partofme/files/mirrorlist
+++ /dev/null
@@ -1,3 +0,0 @@
-Server = https://arch.mirror.constant.com/$repo/os/$arch
-Server = https://mirror.epiphyte.network/archlinux/$repo/os/$arch
-Server = https://mirrors.sorengard.com/archlinux/$repo/os/$arch
diff --git a/modules/partofme/manifests/operatingsystem.pp b/modules/partofme/manifests/operatingsystem.pp
index e6c5a15..a98e950 100644
--- a/modules/partofme/manifests/operatingsystem.pp
+++ b/modules/partofme/manifests/operatingsystem.pp
@@ -1,12 +1,11 @@
class partofme::operatingsystem {
+ include reflector
include wireguard
file {
'/etc/mkinitcpio.conf':
source => 'puppet:///modules/partofme/mkinitcpio.conf',
notify => Exec['/usr/bin/mkinitcpio -p linux'];
- '/etc/pacman.d/mirrorlist':
- source => 'puppet:///modules/partofme/mirrorlist';
}
exec { '/usr/bin/mkinitcpio -p linux':
diff --git a/modules/reflector/files/reflector.conf b/modules/reflector/files/reflector.conf
new file mode 100644
index 0000000..de4257b
--- /dev/null
+++ b/modules/reflector/files/reflector.conf
@@ -0,0 +1,6 @@
+--save /etc/pacman.d/mirrorlist
+--country US
+--age 24
+--protocol https
+--fastest 5
+--sort rate
diff --git a/modules/reflector/manifests/init.pp b/modules/reflector/manifests/init.pp
new file mode 100644
index 0000000..e51e08e
--- /dev/null
+++ b/modules/reflector/manifests/init.pp
@@ -0,0 +1,18 @@
+class reflector {
+ package { "reflector":
+ ensure => installed;
+ }
+
+ file { "/etc/xdg/reflector/reflector.conf":
+ source => 'puppet:///modules/reflector/reflector.conf',
+ require => Package['reflector'];
+ }
+
+ service { "reflector":
+ enable => true,
+ require => [
+ Package['reflector'],
+ File['/etc/xdg/reflector/reflector.conf'],
+ ];
+ }
+}
diff --git a/modules/tozt/files/mirrorlist b/modules/tozt/files/mirrorlist
deleted file mode 100644
index d1c515d..0000000
--- a/modules/tozt/files/mirrorlist
+++ /dev/null
@@ -1,5 +0,0 @@
-Server = https://arch.mirror.constant.com/$repo/os/$arch
-Server = https://mirrors.sorengard.com/archlinux/$repo/os/$arch
-Server = https://mirror.stephen304.com/archlinux/$repo/os/$arch
-Server = https://mirror.wdc1.us.leaseweb.net/archlinux/$repo/os/$arch
-Server = https://mirrors.rit.edu/archlinux/$repo/os/$arch
diff --git a/modules/tozt/manifests/operatingsystem.pp b/modules/tozt/manifests/operatingsystem.pp
index fa43938..c978e75 100644
--- a/modules/tozt/manifests/operatingsystem.pp
+++ b/modules/tozt/manifests/operatingsystem.pp
@@ -1,7 +1,4 @@
class tozt::operatingsystem {
+ include reflector
include wireguard
-
- file { '/etc/pacman.d/mirrorlist':
- source => 'puppet:///modules/tozt/mirrorlist';
- }
}