diff --git a/salt/debian-minimal/create.sls b/salt/debian-minimal/create.sls index 9725ff8..b69818a 100644 --- a/salt/debian-minimal/create.sls +++ b/salt/debian-minimal/create.sls @@ -14,7 +14,6 @@ include: "dvm-{{ template.template }}-absent": qvm.absent: - names: - - dvm-{{ template.template_clean }} - {{ template.template_clean }}-dvm - {{ template.template }}-dvm diff --git a/salt/debian/create.sls b/salt/debian/create.sls index 42dd63d..075f5a3 100644 --- a/salt/debian/create.sls +++ b/salt/debian/create.sls @@ -14,7 +14,6 @@ include: "dvm-{{ template.template }}-absent": qvm.absent: - names: - - dvm-{{ template.template_clean }} - {{ template.template_clean }}-dvm - {{ template.template }}-dvm diff --git a/salt/fedora-minimal/create.sls b/salt/fedora-minimal/create.sls index 34f6fc9..1e26bd3 100644 --- a/salt/fedora-minimal/create.sls +++ b/salt/fedora-minimal/create.sls @@ -14,7 +14,6 @@ include: "dvm-{{ template.template }}-absent": qvm.absent: - names: - - dvm-{{ template.template_clean }} - {{ template.template_clean }}-dvm - {{ template.template }}-dvm diff --git a/salt/fedora/create.sls b/salt/fedora/create.sls index 34f6fc9..1e26bd3 100644 --- a/salt/fedora/create.sls +++ b/salt/fedora/create.sls @@ -14,7 +14,6 @@ include: "dvm-{{ template.template }}-absent": qvm.absent: - names: - - dvm-{{ template.template_clean }} - {{ template.template_clean }}-dvm - {{ template.template }}-dvm diff --git a/salt/sys-usb/create.sls b/salt/sys-usb/create.sls index e9934da..385654f 100644 --- a/salt/sys-usb/create.sls +++ b/salt/sys-usb/create.sls @@ -10,24 +10,13 @@ SPDX-License-Identifier: AGPL-3.0-or-later include: - .clone -{# -"{{ slsdotpath }}-updated-dom0": - pkg.uptodate: - - refresh: True - -"{{ slsdotpath }}-install-dom0-package": - pkg.installed: - - pkgs: - - qubes-ctap-dom0 -#} - -"{{ slsdotpath }}-absent": +## If sys-usb is an AppVM, the state will fail, replace the AppVM for a DispVM +{% set non_disp_usb = salt['cmd.shell']("qvm-ls --no-spinner --raw-data --fields=NAME,CLASS sys-usb sys-usb-dock sys-usb-left 2>/dev/null | awk -F '|' '!/\|DispVM$/{print $1}'") -%} # noqa: 204 +{% for wrong_class in non_disp_usb.split("\n") -%} +"{{ slsdotpath }}-absent-{{ wrong_class }}": qvm.absent: - - names: - - {{ slsdotpath }} - - sys-usb-dock - - sys-usb-left - - dvm-{{ slsdotpath }} + - name: {{ wrong_class }} +{% endfor -%} {% load_yaml as defaults -%} name: dvm-{{ slsdotpath }}