diff --git a/roles/dbscripts/defaults/main.yml b/roles/dbscripts/defaults/main.yml index e67e0d8f7668ba78416e0c4feb8ed691b4234920..39fe9ebb1fe2b749f0ccdfd74add6ba5f51f053d 100644 --- a/roles/dbscripts/defaults/main.yml +++ b/roles/dbscripts/defaults/main.yml @@ -1,6 +1,6 @@ -dbscripts_commit: cde46716a8cde5424297c9ed350d43ad26e8b1f1 +dbscripts_commit: 0ebae15384d0f4acd79445a4beaf1599a7b379f7 dbscripts_update: true -dbscripts_pgp_emails: ['jelle@archlinux.org', 'anthraxx@archlinux.org', 'foxboron@archlinux.org'] +dbscripts_pgp_emails: ['jelle@archlinux.org', 'anthraxx@archlinux.org', 'foxboron@archlinux.org', 'kristian@klausen.dk'] git_state_repo: /srv/repos/state git_pkg_cache: /srv/repos/pkg-cache diff --git a/roles/dbscripts/files/archive-index.service b/roles/dbscripts/files/archive-index.service new file mode 100644 index 0000000000000000000000000000000000000000..705a8cd278e25151b6f36fff1e0b73bd03e331c7 --- /dev/null +++ b/roles/dbscripts/files/archive-index.service @@ -0,0 +1,11 @@ +[Unit] +# Fail-safe in case this is accidentally deployed on an archive server +ConditionPathExists=!/srv/archive/repos + +[Service] +User=archive +Type=oneshot +ExecStart=/srv/repos/git-packages/dbscripts/cron-jobs/archive-index +ProtectSystem=strict +ProtectHome=yes +ReadWritePaths=/srv/archive diff --git a/roles/dbscripts/files/archive-index.timer b/roles/dbscripts/files/archive-index.timer new file mode 100644 index 0000000000000000000000000000000000000000..bcd82802a4b1e73bfaa7b763f6180523c38f3a9e --- /dev/null +++ b/roles/dbscripts/files/archive-index.timer @@ -0,0 +1,6 @@ +[Timer] +OnCalendar=hourly +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/roles/dbscripts/tasks/main.yml b/roles/dbscripts/tasks/main.yml index b2aab27ae2659a32e1b0c90858a47b609c392572..6e8fa74122784ddad9b0ebdbf64a4455d42804a1 100644 --- a/roles/dbscripts/tasks/main.yml +++ b/roles/dbscripts/tasks/main.yml @@ -258,6 +258,8 @@ - createlinks.service - archive-cleanup.service - archive-cleanup.timer + - archive-index.service + - archive-index.timer - name: Activate systemd timers service: name={{ item }} enabled=yes state=started @@ -268,6 +270,7 @@ - gen_rsyncd.timer - createlinks.timer - archive-cleanup.timer + - archive-index.timer # Allow different maintainers (unix users) to touch the git state repositories # https://git-scm.com/docs/git-config/2.35.2#Documentation/git-config.txt-safedirectory diff --git a/roles/dbscripts/templates/rsyncd.conf.proto.j2 b/roles/dbscripts/templates/rsyncd.conf.proto.j2 index e6c85ecfd66a048141d325d7f860978c7879afea..ae62ca856d2b7902dead55ea6d824572d4ccdae3 100644 --- a/roles/dbscripts/templates/rsyncd.conf.proto.j2 +++ b/roles/dbscripts/templates/rsyncd.conf.proto.j2 @@ -22,6 +22,7 @@ hosts deny = * [archive] path = /srv/archive comment = archive + exclude = .* hosts allow = {{ hostvars['gemini.archlinux.org']['ipv4_address'] }} {{ hostvars['gemini.archlinux.org']['ipv6_address'] }} # Just the release/stable iso/packages (for most mirrors)