aboutsummaryrefslogtreecommitdiff
path: root/manifests/preseeded_package.pp
blob: 76c432ea185487599105613c83f5d0831676e33e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
define apt::preseeded_package ($content = "", $ensure = "installed") {
  $seedfile = "/var/cache/local/preseeding/$name.seeds"
  $real_content = $content ? { 
    ""      => template ( "$name.seeds", "$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],
  }   
}