Compare commits
10 commits
b9d95e621c
...
fb41ae9661
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fb41ae9661 | ||
|
|
4f82e5ab96 | ||
|
|
9cbf4a7088 | ||
|
|
756da5570e | ||
|
|
1f1bd9d333 | ||
|
|
67110ce55a | ||
|
|
998bca2d36 | ||
|
|
5b53971da3 | ||
|
|
95bfb32459 | ||
|
|
c35f81871c |
6 changed files with 48 additions and 22 deletions
25
Makefile
25
Makefile
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -15,3 +15,6 @@ pillar_roots:
|
|||
|
||||
formula_dirs: ['/srv/formulas', '/srv/user/formulas']
|
||||
|
||||
include:
|
||||
- minion.d/*
|
||||
- /usr/local/etc/salt/minion.d/*.conf
|
||||
|
|
|
|||
|
|
@ -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: ""
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
user:
|
||||
dom0:
|
||||
- guardian-vms
|
||||
18
salt/salty.sls
Normal file
18
salt/salty.sls
Normal 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
3
salt/salty.top
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
user:
|
||||
dom0:
|
||||
- salty
|
||||
Loading…
Add table
Add a link
Reference in a new issue