2012-09-20 20:54:38 +02:00
|
|
|
define apt::sources_list (
|
|
|
|
$ensure = present,
|
|
|
|
$source = false,
|
|
|
|
$content = false
|
|
|
|
) {
|
|
|
|
|
|
|
|
if $source {
|
|
|
|
file {"/etc/apt/sources.list.d/${name}.list":
|
|
|
|
ensure => $ensure,
|
|
|
|
source => $source,
|
2013-11-14 03:44:10 +01:00
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
2012-09-20 20:54:38 +02:00
|
|
|
before => Exec['apt-get_update'],
|
|
|
|
notify => Exec['apt-get_update'],
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
file {"/etc/apt/sources.list.d/${name}.list":
|
|
|
|
ensure => $ensure,
|
|
|
|
content => $content,
|
2013-11-14 03:44:10 +01:00
|
|
|
owner => "root",
|
|
|
|
group => "root",
|
2012-09-20 20:54:38 +02:00
|
|
|
before => Exec['apt-get_update'],
|
|
|
|
notify => Exec['apt-get_update'],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|