Compare commits

...

10 commits

Author SHA1 Message Date
mustard
fb41ae9661 a salty change 2025-10-24 19:04:16 +02:00
mustard
4f82e5ab96 hmmm 2025-10-24 18:59:11 +02:00
mustard
9cbf4a7088 makefile change 2025-10-24 18:55:15 +02:00
mustard
756da5570e hmmm 2025-10-21 01:14:38 +02:00
mustard
1f1bd9d333 wip: tweaking make apply 2025-10-21 00:46:27 +02:00
mustard
67110ce55a wip: hmmm 2025-10-21 00:39:41 +02:00
mustard
998bca2d36 wip: salty top 2025-10-21 00:35:38 +02:00
mustard
5b53971da3 wip: salt testing 2025-10-21 00:32:46 +02:00
mustard
95bfb32459 wip: add cure task 2025-10-20 23:44:17 +02:00
mustard
c35f81871c wip: add cure task 2025-10-20 23:42:41 +02:00
6 changed files with 48 additions and 22 deletions

View file

@ -21,6 +21,16 @@ endif
BUNDLEIN := .bundles/qubes-mgmt-salt
ifeq (apply, $(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
APPLY_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(APPLY_ARGS):;@:)
endif
clean-workdir = git init -q -b $* && git diff --quiet && git diff --cached --quiet || (echo 'dirty tree; check git status' && false)
.PHONY: guard-domu
@ -35,6 +45,15 @@ create-bundle: guard-domu
mkdir -p .bundles
git bundle create - --all > .bundles/qubes-mgmt-salt
# cures common weird states (thanks xyhhx for the tip)
# also try `sudo rm -rf /var/cache/salt /srv/salt/_tops/*`
.PHONY: cure
cure:
sudo rm -rf /var/cache/salt
sudo rm -rf /srv/salt/_tops/user
qubesctl saltutil.clear_cache
qubesctl saltutil.sync_all
.PHONY: pull pull/%
pull: pull/$(shell git branch --show-current)
pull/%:
@ -62,7 +81,11 @@ install:
mkdir -p /srv/user
ln -s $(CURDIR)/salt /srv/user/salt
.PHONY: apply
apply:
install -D -oroot -groot -m0644 conf/z_user.conf /etc/salt/minion.d/z_user.conf
install -D -oroot -groot -m0644 conf/overrides.conf /usr/local/etc/salt/minion.d/overrides.conf
run0 qubesctl top.enable dom0
qubesctl top.enable $(APPLY_ARGS)
qubesctl --show-output state.apply $(APPLY_ARGS) saltenv=user
qubesctl top.disable $(APPLY_ARGS)

View file

@ -15,3 +15,6 @@ pillar_roots:
formula_dirs: ['/srv/formulas', '/srv/user/formulas']
include:
- minion.d/*
- /usr/local/etc/salt/minion.d/*.conf

View file

@ -1,18 +0,0 @@
create-guardian-template:
qvm.vm:
- name: guardian-template
- clone:
- source: fedora-42
- label: black
- prefs:
- netvm: ""
create-app:
qvm.vm:
- name: app
- present:
- template: guardian-template
- label: green
- prefs:
- template: guardian-template
- netvm: ""

View file

@ -1,3 +0,0 @@
user:
dom0:
- guardian-vms

18
salt/salty.sls Normal file
View file

@ -0,0 +1,18 @@
create-template:
qvm.vm:
- name: super-salty-template
- clone:
- source: fedora-42
- label: black
- prefs:
- netvm: ""
create-app:
qvm.vm:
- name: salty-appvm
- present:
- template: super-salty-template
- label: black
- prefs:
- template: super-salty-template
- netvm: ""

3
salt/salty.top Normal file
View file

@ -0,0 +1,3 @@
user:
dom0:
- salty