Salt - add example to create qubes-builder

This commit is contained in:
unman 2019-07-18 13:19:37 +00:00
commit 41de6fd213
5 changed files with 64 additions and 0 deletions

9
clone.sls Normal file
View File

@ -0,0 +1,9 @@
include:
- build.template-fedora-30-minimal
qvm-clone-id:
qvm.clone:
- require:
- sls: build.template-fedora-30-minimal
- name: template-builder
- source: fedora-30-minimal

4
clone.top Normal file
View File

@ -0,0 +1,4 @@
base:
dom0:
- match: nodegroup
- build.clone

30
create.sls Normal file
View File

@ -0,0 +1,30 @@
include:
- build.clone
qvm-present-id:
qvm.present:
- name: builder
- template: template-builder
- label: gray
qvm-prefs-id:
qvm.prefs:
- name: builder
- netvm: tor
- memory: 800
- maxmem: 8000
- vcpus: 4
qvm-features-id:
qvm.features:
- name: builder
- disable:
- service.cups
'qvm-volume extend builder:private 20G' :
cmd.run
update_file:
file.prepend:
- name: /etc/qubes-rpc/policy/qubes.Gpg
- text: builder gpg allow

4
create.top Normal file
View File

@ -0,0 +1,4 @@
base:
dom0:
- match: nodegroup
- build.create

View File

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
# vim: set syntax=yaml ts=2 sw=2 sts=2 et :
##
# qvm.template-fedora-30-minimal
# ======================
#
# Installs 'fedora-30-minimal' template.
#
# Execute:
# qubesctl state.sls qvm.template-fedora-30-minimal dom0
##
template-fedora-30-minimal:
pkg.installed:
- name: qubes-template-fedora-30-minimal
- fromrepo: qubes-templates-itl