qusal/salt/mgmt/prefs.sls
Ben Grande aea8438904
fix: stricter command-line parsing
- Add to qvm-run:
  - no-gui when command doesn't require a GUI
  - filter-escape-chars when pass-io is set and output is not a file,
    such as a pipe that could later be used to print information.
- Change remaining echo to printf
- Add end-of-options separator when possible
2025-01-08 16:12:31 +01:00

41 lines
1.2 KiB
Plaintext

{#
SPDX-FileCopyrightText: 2023 - 2025 Benjamin Grande M. S. <ben.grande.b@gmail.com>
SPDX-License-Identifier: AGPL-3.0-or-later
#}
include:
- .create
"{{ slsdotpath }}-set-qubes-prefs-management_dispvm-to-dvm-{{ slsdotpath }}":
cmd.run:
- require:
- cmd: "{{ slsdotpath }}-install-salt-deps"
- name: qubes-prefs -- management_dispvm dvm-{{ slsdotpath }}
"{{ slsdotpath }}-set-tpl-{{ slsdotpath }}-management_dispvm-to-default":
qvm.vm:
- require:
- cmd: "{{ slsdotpath }}-install-salt-deps"
- name: tpl-{{ slsdotpath }}
- prefs:
- management_dispvm: "*default*"
"{{ slsdotpath }}-remove-default-mgmt-dvm":
qvm.absent:
- require:
- cmd: "{{ slsdotpath }}-set-qubes-prefs-management_dispvm-to-dvm-{{ slsdotpath }}"
- qvm: "{{ slsdotpath }}-set-tpl-{{ slsdotpath }}-management_dispvm-to-default"
- name: default-mgmt-dvm
## TODO: Remove when template with patch reaches upstream or updates enforce
## salt-deps to be installed.
## https://github.com/QubesOS/qubes-issues/issues/8806
"{{ slsdotpath }}-shutdown-template":
qvm.shutdown:
- require:
- qvm: "{{ slsdotpath }}-set-tpl-{{ slsdotpath }}-management_dispvm-to-default"
- name: tpl-{{ slsdotpath }}
- flags:
- force