summaryrefslogtreecommitdiff
path: root/manifests/preseeded_package.pp
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2010-09-02 19:12:58 -0400
committerMicah Anderson <micah@riseup.net>2010-09-02 19:12:58 -0400
commita5e4ab40d8e5074c3ef6525358858376c5dbdab7 (patch)
treef3342e4da7e620a7d43564cf7496d666c80b46e6 /manifests/preseeded_package.pp
parent9b916b3224b194c3e6805855b83886eae3e9fd39 (diff)
parentdd36612e50b2c44135fa10fdc3d6120ff2b1220e (diff)
Merge remote branch 'immerda/master'
Conflicts: manifests/init.pp
Diffstat (limited to 'manifests/preseeded_package.pp')
-rw-r--r--manifests/preseeded_package.pp18
1 files changed, 18 insertions, 0 deletions
diff --git a/manifests/preseeded_package.pp b/manifests/preseeded_package.pp
new file mode 100644
index 0000000..276c90f
--- /dev/null
+++ b/manifests/preseeded_package.pp
@@ -0,0 +1,18 @@
+define apt::preseeded_package ($content = "", $ensure = "installed") {
+ $seedfile = "/var/cache/local/preseeding/$name.seeds"
+ $real_content = $content ? {
+ "" => template ( "$debian_version/$name.seeds" ),
+ Default => $content
+ }
+
+ file{ $seedfile:
+ content => $real_content,
+ mode => 0600, owner => root, group => root,
+ }
+
+ package { $name:
+ ensure => $ensure,
+ responsefile => $seedfile,
+ require => File[$seedfile],
+ }
+}