Support ability to add more than one PPA
[puppet-modules/puppetlabs-apt.git] / manifests / init.pp
1 # apt.pp
2
3 class apt {
4         $root = '/etc/apt'
5         $provider = '/usr/bin/apt-get'
6
7   package { "python-software-properties": }
8
9         file { "sources.list":
10                 name => "${root}/sources.list",
11                 ensure => present,
12                 owner => root,
13                 group => root,
14                 mode => 644,
15         }
16
17         file { "sources.list.d":
18                 name => "${root}/sources.list.d",
19                 ensure => directory,
20                 owner => root,
21                 group => root,
22         }
23
24         exec { "apt_update":
25                 command => "${provider} update",
26                 subscribe => [ File["sources.list"], File["sources.list.d"] ],
27                 refreshonly => true,
28         }
29 }