mirror of
https://github.com/ben-grande/qusal.git
synced 2025-08-03 11:46:20 -04:00
refactor: initial commit
This commit is contained in:
commit
5eebd789ed
591 changed files with 18598 additions and 0 deletions
26
salt/utils/macros/switch-template.sls
Normal file
26
salt/utils/macros/switch-template.sls
Normal file
|
@ -0,0 +1,26 @@
|
|||
{#
|
||||
SPDX-FileCopyrightText: 2023 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
#}
|
||||
|
||||
{#
|
||||
Switch Template to Default Template
|
||||
|
||||
Usage:
|
||||
1: Import this template:
|
||||
{% from 'utils/macros/switch-template.sls' import switch_template -%}
|
||||
|
||||
2: Set list of qubes to set default template:
|
||||
{{ switch_template([sls_path, 'example']) }}
|
||||
#}
|
||||
|
||||
{% set default_template = salt['cmd.shell']('qubes-prefs default_template') -%}
|
||||
|
||||
{% macro switch_template(qubes) -%}
|
||||
{% for qube in qubes -%}
|
||||
"{{ slsdotpath }}-reset-{{ qube }}-template-to-default_template":
|
||||
cmd.run:
|
||||
- name: qvm-prefs {{ qube }} template {{ default_template }}
|
||||
{% endfor -%}
|
||||
{% endmacro -%}
|
Loading…
Add table
Add a link
Reference in a new issue