ensure => absent,
}
site::aptrepo { 'buildd.debian.org':
- content => template('buildd/etc/apt/sources.list.d/buildd.list.erb'),
- key => 'puppet:///modules/buildd/buildd.debian.org.asc',
+ template => 'buildd/etc/apt/sources.list.d/buildd.list.erb',
+ key => 'puppet:///modules/buildd/buildd.debian.org.asc',
}
file { '/etc/apt/preferences.d/buildd':
if $::debarchitecture != 'armhf' {
site::aptrepo { 'security':
- content => template('debian-org/etc/apt/sources.list.d/security.list.erb'),
+ template => 'debian-org/etc/apt/sources.list.d/security.list.erb',
}
site::aptrepo { 'backports.debian.org':
- content => template('debian-org/etc/apt/sources.list.d/backports.debian.org.list.erb'),
+ template => 'debian-org/etc/apt/sources.list.d/backports.debian.org.list.erb',
}
site::aptrepo { 'volatile':
- content => template('debian-org/etc/apt/sources.list.d/volatile.list.erb'),
+ template => 'debian-org/etc/apt/sources.list.d/volatile.list.erb',
}
}
site::aptrepo { 'backports.org':
}
site::aptrepo { 'db.debian.org':
- content => template('debian-org/etc/apt/sources.list.d/debian.org.list.erb'),
- key => 'puppet:///modules/debian-org/db.debian.org.asc',
+ template => 'debian-org/etc/apt/sources.list.d/debian.org.list.erb',
+ key => 'puppet:///modules/debian-org/db.debian.org.asc',
}
file { '/etc/facter':
class debian-org::proliant {
site::aptrepo { 'debian.restricted':
- content => template('debian-org/etc/apt/sources.list.d/debian.restricted.list.erb'),
+ template => 'debian-org/etc/apt/sources.list.d/debian.restricted.list.erb',
}
package { 'hpacucli':
}
}
}
+
+
}
site::aptrepo { 'debian.restricted':
- content => template('debian-org/etc/apt/sources.list.d/debian.restricted.list.erb'),
+ template => 'debian-org/etc/apt/sources.list.d/debian.restricted.list.erb',
}
}
}
site::aptrepo { 'geoip':
- content => template('debian-org/etc/apt/sources.list.d/geoip.list.erb'),
+ template => 'debian-org/etc/apt/sources.list.d/geoip.list.erb',
}
file { '/etc/bind/':
-define site::aptrepo ($key = undef, $keyid = undef, $content = '', $source = '', $ensure = present) {
+define site::aptrepo ($key = undef, $keyid = undef, $template = undef, $config = undef, $ensure = present) {
+
case $ensure {
present: {
}
if $ensure == present {
- if ! ($source or $content) {
+ if ! ($config or $template) {
fail ( "No configuration found for ${name}" )
}
}
- file { "/etc/apt/sources.list.d/${name}.list":
- ensure => $ensure,
- content => $content,
- source => $source,
- notify => Exec['apt-get update'],
+ if $template {
+ file { "/etc/apt/sources.list.d/${name}.list":
+ ensure => $ensure,
+ content => template($template),
+ notify => Exec['apt-get update'],
+ }
+ } else {
+ file { "/etc/apt/sources.list.d/${name}.list":
+ ensure => $ensure,
+ source => $config,
+ notify => Exec['apt-get update'],
+ }
}
}