From 7df3be4b786d5fd131e47d1ef373c0d94a2eb024 Mon Sep 17 00:00:00 2001 From: Ben Grande Date: Sat, 22 Jun 2024 10:21:40 +0200 Subject: [PATCH] fix: install caching client before common update Cacher client installation state included in the common update state as all qubes that updates with Qusal states use it, rather than including it on all the installation states. The macro utils.macros.install-repo still also run's apt-cacher-ng-repo in case the user is not updating at that moment, just adding a new repository without restarting the qube (systemd service has already ran). Fixes: https://github.com/ben-grande/qusal/issues/66 --- salt/kicksecure-minimal/install.sls | 1 - salt/utils/tools/common/update.sls | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/salt/kicksecure-minimal/install.sls b/salt/kicksecure-minimal/install.sls index 994cbd3..beecb37 100644 --- a/salt/kicksecure-minimal/install.sls +++ b/salt/kicksecure-minimal/install.sls @@ -11,7 +11,6 @@ https://www.kicksecure.com/wiki/Debian include: - kicksecure-minimal.install-repo - utils.tools.common.update - - sys-cacher.install-client - utils.tools.zsh "{{ slsdotpath }}-installed": diff --git a/salt/utils/tools/common/update.sls b/salt/utils/tools/common/update.sls index ccb732a..86ccf2c 100644 --- a/salt/utils/tools/common/update.sls +++ b/salt/utils/tools/common/update.sls @@ -4,6 +4,12 @@ SPDX-FileCopyrightText: 2024 Benjamin Grande M. S. SPDX-License-Identifier: AGPL-3.0-or-later #} +{% if salt['cmd.retcode']('command -v apt-cacher-ng-repo >/dev/null') == 0 -%} +"common-update-run-apt-cacher-ng-repo": + cmd.run: + - name: apt-cacher-ng-repo +{% endif -%} + "common-updated": pkg.uptodate: - refresh: True