qusal/salt/media/create.sls

119 lines
2.3 KiB
Plaintext
Raw Normal View History

2023-11-13 09:33:28 -05:00
{#
SPDX-FileCopyrightText: 2022 - 2023 unman <unman@thirdeyesecurity.org>
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
#}
{%- from "qvm/template.jinja" import load -%}
{%- import "debian-minimal/template.jinja" as template -%}
2023-11-13 09:33:28 -05:00
include:
- .clone
{% load_yaml as defaults -%}
name: tpl-{{ slsdotpath }}
force: True
require:
- sls: {{ slsdotpath }}.clone
prefs:
- audiovm: ""
{%- endload %}
{{ load(defaults) }}
2023-11-13 09:33:28 -05:00
{% load_yaml as defaults -%}
name: {{ slsdotpath }}
force: True
require:
- sls: {{ slsdotpath }}.clone
present:
- template: {{ template.template }}
- label: yellow
prefs:
- template: {{ template.template }}
- label: yellow
- netvm: ""
- audiovm: ""
2023-11-13 09:33:28 -05:00
- vcpus: 2
- memory: 300
- maxmem: 800
- autostart: False
- include_in_backups: True
features:
- disable:
- service.cups
- service.cups-browsed
- service.tinyproxy
- service.tracker
- service.evolution-data-server
{%- endload %}
{{ load(defaults) }}
{% load_yaml as defaults -%}
name: dvm-{{ slsdotpath }}
force: True
require:
- sls: {{ slsdotpath }}.clone
present:
- template: tpl-{{ slsdotpath }}
- label: yellow
prefs:
- template: tpl-{{ slsdotpath }}
- label: yellow
- netvm: ""
- audiovm: "*default*"
- vcpus: 2
2023-11-13 09:33:28 -05:00
- memory: 300
- maxmem: 800
- template_for_dispvms: True
- include_in_backups: False
features:
- disable:
- service.cups
- service.cups-browsed
- service.tinyproxy
- service.tracker
- service.evolution-data-server
{%- endload %}
{{ load(defaults) }}
{% load_yaml as defaults -%}
name: disp-{{ slsdotpath }}
force: True
require:
- qvm: dvm-{{ slsdotpath }}
present:
- template: dvm-{{ slsdotpath }}
- label: yellow
- class: DispVM
prefs:
- template: dvm-{{ slsdotpath }}
- label: yellow
- netvm: ""
- audiovm: "*default*"
- vcpus: 2
2023-11-13 09:33:28 -05:00
- memory: 300
- maxmem: 800
- autostart: False
- include_in_backups: False
features:
- appmenus-dispvm: True
- disable:
- service.cups
- service.cups-browsed
- service.tinyproxy
- service.tracker
- service.evolution-data-server
- enable:
- service.shutdownle
{%- endload %}
{{ load(defaults) }}
"{{ slsdotpath }}-extend-private-volume":
cmd.run:
- name: qvm-volume extend {{ slsdotpath }}:private 50Gi
{% from 'utils/macros/policy.sls' import policy_set with context -%}
{{ policy_set(sls_path, '80') }}