summaryrefslogtreecommitdiff
path: root/manifests/os/arch.pp
diff options
context:
space:
mode:
Diffstat (limited to 'manifests/os/arch.pp')
-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: }
}