summaryrefslogtreecommitdiff
path: root/manifests/preferences.pp
blob: f188149c7e9bbbc7fd2f34eb142bbd4a69638cfb (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 => $custom_preferences ? {
      '' => $operatingsystem ? {
        'debian' => template("apt/${operatingsystem}/preferences_${codename}.erb"),
        'ubuntu' => template("apt/${operatingsystem}/preferences_${codename}.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;
  }

}