2023-11-13 09:33:28 -05:00
|
|
|
{#
|
2024-01-29 10:49:54 -05:00
|
|
|
SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
2023-11-13 09:33:28 -05:00
|
|
|
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
#}
|
|
|
|
|
2024-01-04 15:59:15 -05:00
|
|
|
{% set qube = slsdotpath -%}
|
2023-11-13 09:33:28 -05:00
|
|
|
|
2024-01-04 15:59:15 -05:00
|
|
|
{% set running = 0 -%}
|
|
|
|
{% if salt['cmd.shell']('qvm-ls --no-spinner --raw-list --running ' ~ qube) == qube -%}
|
|
|
|
{% set running = 1 -%}
|
|
|
|
{% endif -%}
|
|
|
|
|
|
|
|
"{{ qube }}-start":
|
|
|
|
qvm.start:
|
|
|
|
- name: {{ qube }}
|
|
|
|
|
|
|
|
"{{ qube }}-qubes-prefs-updatevm":
|
2023-11-13 09:33:28 -05:00
|
|
|
cmd.run:
|
|
|
|
- require:
|
2024-01-04 15:59:15 -05:00
|
|
|
- qvm: {{ qube }}-start
|
|
|
|
- name: qubes-prefs updatevm {{ qube }}
|
2023-11-13 09:33:28 -05:00
|
|
|
|
2024-01-04 15:59:15 -05:00
|
|
|
"{{ qube }}-qubes-prefs-default_netvm":
|
2023-11-13 09:33:28 -05:00
|
|
|
cmd.run:
|
|
|
|
- require:
|
2024-01-04 15:59:15 -05:00
|
|
|
- qvm: {{ qube }}-start
|
|
|
|
- name: qubes-prefs default_netvm {{ qube }}
|
2023-12-21 17:38:39 -05:00
|
|
|
|
2024-01-04 15:59:15 -05:00
|
|
|
"{{ qube }}-qubes-prefs-clockvm":
|
2023-12-21 17:38:39 -05:00
|
|
|
cmd.run:
|
|
|
|
- require:
|
2024-01-04 15:59:15 -05:00
|
|
|
- qvm: {{ qube }}-start
|
|
|
|
- name: qubes-prefs clockvm {{ qube }}
|
|
|
|
|
|
|
|
{% if running == 0 -%}
|
|
|
|
"{{ qube }}-shutdown":
|
|
|
|
qvm.shutdown:
|
|
|
|
- name: {{ qube }}
|
|
|
|
- flags:
|
|
|
|
- wait
|
|
|
|
- force
|
|
|
|
{% endif -%}
|