summaryrefslogtreecommitdiff
path: root/manifests/os/arch.pp
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-01-13 23:15:11 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2022-01-13 23:53:26 +0100
commitdfa81fe29a6be169d6ed2803c4bedcd211b16d72 (patch)
tree77bd0d72e5fe48e07b5d7be5f7532b776f9c53ba /manifests/os/arch.pp
parentRewrote mots of nspawn. (diff)
downloadnspawn-dfa81fe29a6be169d6ed2803c4bedcd211b16d72.tar.gz
nspawn-dfa81fe29a6be169d6ed2803c4bedcd211b16d72.tar.xz
Nspawn cleanup.
Diffstat (limited to '')
-rw-r--r--manifests/os/arch.pp15
1 files changed, 9 insertions, 6 deletions
diff --git a/manifests/os/arch.pp b/manifests/os/arch.pp
index e5fc210..d9bd258 100644
--- a/manifests/os/arch.pp
+++ b/manifests/os/arch.pp
@@ -1,14 +1,17 @@
define nspawn::os::arch (
- String $machine = $name,
+ String $template_name = $name,
+ String $template_dir = $nspawn::template_dir,
) {
ensure_packages(['arch-install-scripts'])
- $machine_path = "/var/lib/machines/${machine}"
+ $root = "${template_dir}/${template_name}"
- exec { "/usr/bin/pacstrap '${machine_path}' base puppet":
- creates => "${machine_path}/etc/os-release",
+ file { $root:
+ ensure => directory,
+ } -> exec { "/usr/bin/pacstrap '${root}' base puppet":
+ creates => "${root}/etc/os-release",
+ } -> nspawn::util::enable_networkd { $template_name:
+ template_dir => $template_dir,
}
-
- nspawn::util::enable_networkd { $machine: }
}