summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-02-09 19:47:08 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-02-09 19:47:08 +0100
commit8efd13172f64d0cc7cf277ab5aeea97e9a8f86c9 (patch)
tree510ce7e7a2259992ea4d153353b78943d2345bcf
parentNspawn create machine. (diff)
downloadnspawn-8efd13172f64d0cc7cf277ab5aeea97e9a8f86c9.tar.gz
nspawn-8efd13172f64d0cc7cf277ab5aeea97e9a8f86c9.tar.xz
Reordering.
-rw-r--r--manifests/machine.pp14
1 files changed, 7 insertions, 7 deletions
diff --git a/manifests/machine.pp b/manifests/machine.pp
index de6d848..e6d01e2 100644
--- a/manifests/machine.pp
+++ b/manifests/machine.pp
@@ -15,6 +15,13 @@ define nspawn::machine (
$domain = $facts['domain']
$root = "${machine_dir}/${machine}"
+ exec { "lvcreate -n vm-${machine} -V 100G --thinpool lvpoolData VolGroup":
+ creates => "/dev/VolGroup/vm-${machine}",
+ path => ['/usr/bin',],
+ } -> systemd_mount { "/var/lib/machines/${machine}":
+ what => "/dev/VolGroup/vm-${machine}"
+ }
+
# Copies image to us
# TODO does this actually do anything more than a deep copy?
exec { "Create ${machine} from template":
@@ -49,13 +56,6 @@ define nspawn::machine (
# TODO deep merge?
} + $nspawn_opts
- exec { "lvcreate -n vm-${machine} -V 100G --thinpool lvpoolData VolGroup":
- creates => "/dev/VolGroup/vm-${machine}",
- path => ['/usr/bin',],
- } -> systemd_mount { "/var/lib/machines/${machine}":
- what => "/dev/VolGroup/vm-${machine}"
- }
-
file { "/etc/systemd/nspawn/${machine}.nspawn":
ensure => file,
content => epp('nspawn/unit_file.epp', {