diff options
author | Micah Anderson <micah@riseup.net> | 2010-09-02 19:12:58 -0400 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2010-09-02 19:12:58 -0400 |
commit | a5e4ab40d8e5074c3ef6525358858376c5dbdab7 (patch) | |
tree | f3342e4da7e620a7d43564cf7496d666c80b46e6 /manifests/preseeded_package.pp | |
parent | 9b916b3224b194c3e6805855b83886eae3e9fd39 (diff) | |
parent | dd36612e50b2c44135fa10fdc3d6120ff2b1220e (diff) |
Merge remote branch 'immerda/master'
Conflicts:
manifests/init.pp
Diffstat (limited to 'manifests/preseeded_package.pp')
-rw-r--r-- | manifests/preseeded_package.pp | 18 |
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], + } +} |