mirror of
https://github.com/ben-grande/qusal.git
synced 2024-10-01 02:35:49 -04:00
fix: do not remove created dvm
The removal was first implemented to get a clean state of the qube, but there are side effects, it fails if the user created a named disposable based on the dvm and also removes the (dvm) entry from the appmenu. The sys-usb case is a workaround in case the user selected a non-disposable, an appvm sys-usb during system installation.
This commit is contained in:
parent
5b9b0bba5b
commit
040594ae74
@ -14,7 +14,6 @@ include:
|
||||
"dvm-{{ template.template }}-absent":
|
||||
qvm.absent:
|
||||
- names:
|
||||
- dvm-{{ template.template_clean }}
|
||||
- {{ template.template_clean }}-dvm
|
||||
- {{ template.template }}-dvm
|
||||
|
||||
|
@ -14,7 +14,6 @@ include:
|
||||
"dvm-{{ template.template }}-absent":
|
||||
qvm.absent:
|
||||
- names:
|
||||
- dvm-{{ template.template_clean }}
|
||||
- {{ template.template_clean }}-dvm
|
||||
- {{ template.template }}-dvm
|
||||
|
||||
|
@ -14,7 +14,6 @@ include:
|
||||
"dvm-{{ template.template }}-absent":
|
||||
qvm.absent:
|
||||
- names:
|
||||
- dvm-{{ template.template_clean }}
|
||||
- {{ template.template_clean }}-dvm
|
||||
- {{ template.template }}-dvm
|
||||
|
||||
|
@ -14,7 +14,6 @@ include:
|
||||
"dvm-{{ template.template }}-absent":
|
||||
qvm.absent:
|
||||
- names:
|
||||
- dvm-{{ template.template_clean }}
|
||||
- {{ template.template_clean }}-dvm
|
||||
- {{ template.template }}-dvm
|
||||
|
||||
|
@ -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 }}
|
||||
|
Loading…
Reference in New Issue
Block a user