aboutsummaryrefslogtreecommitdiff
path: root/manifests/preferences.pp
blob: 8f532f8db254061398ccc6062723ab10231e17d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class apt::preferences {

  concat::fragment{"apt_preferences_header":
    content => $apt::custom_preferences ? {
      '' => $::operatingsystem ? {
        'debian' => template("apt/${::operatingsystem}/preferences_${::lsbdistcodename}.erb"),
        'ubuntu' => template("apt/${::operatingsystem}/preferences_${::lsbdistcodename}.erb"),
      },
      default => $custom_preferences
    },
    order => 00,
    target => '/etc/apt/preferences',
  }

  concat{'/etc/apt/preferences':
    alias => apt_config,
    # only update together
    require => File["/etc/apt/sources.list"],
    owner => root, group => 0, mode => 0644;
  }

}