Compare commits
No commits in common. "fb41ae96611cd283e160a2ee6eb0da4e064dfcf0" and "b9d95e621c0e05436848474384828c39170d4869" have entirely different histories.
fb41ae9661
...
b9d95e621c
6 changed files with 22 additions and 48 deletions
25
Makefile
25
Makefile
|
|
@ -21,16 +21,6 @@ endif
|
||||||
|
|
||||||
BUNDLEIN := .bundles/qubes-mgmt-salt
|
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)
|
clean-workdir = git init -q -b $* && git diff --quiet && git diff --cached --quiet || (echo 'dirty tree; check git status' && false)
|
||||||
|
|
||||||
.PHONY: guard-domu
|
.PHONY: guard-domu
|
||||||
|
|
@ -45,15 +35,6 @@ create-bundle: guard-domu
|
||||||
mkdir -p .bundles
|
mkdir -p .bundles
|
||||||
git bundle create - --all > .bundles/qubes-mgmt-salt
|
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/%
|
.PHONY: pull pull/%
|
||||||
pull: pull/$(shell git branch --show-current)
|
pull: pull/$(shell git branch --show-current)
|
||||||
pull/%:
|
pull/%:
|
||||||
|
|
@ -81,11 +62,7 @@ install:
|
||||||
mkdir -p /srv/user
|
mkdir -p /srv/user
|
||||||
ln -s $(CURDIR)/salt /srv/user/salt
|
ln -s $(CURDIR)/salt /srv/user/salt
|
||||||
|
|
||||||
.PHONY: apply
|
|
||||||
apply:
|
apply:
|
||||||
install -D -oroot -groot -m0644 conf/z_user.conf /etc/salt/minion.d/z_user.conf
|
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
|
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,6 +15,3 @@ pillar_roots:
|
||||||
|
|
||||||
formula_dirs: ['/srv/formulas', '/srv/user/formulas']
|
formula_dirs: ['/srv/formulas', '/srv/user/formulas']
|
||||||
|
|
||||||
include:
|
|
||||||
- minion.d/*
|
|
||||||
- /usr/local/etc/salt/minion.d/*.conf
|
|
||||||
|
|
|
||||||
18
salt/guardian-vms.sls
Normal file
18
salt/guardian-vms.sls
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
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: ""
|
||||||
3
salt/guardian.top
Normal file
3
salt/guardian.top
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
user:
|
||||||
|
dom0:
|
||||||
|
- guardian-vms
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
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: ""
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
user:
|
|
||||||
dom0:
|
|
||||||
- salty
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue