Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Manage Debian APT System Repos
- class beryjuorg::apt::debian {
- if !defined(Class['apt']) {
- class { 'apt':
- purge => {
- 'sources.list' => true,
- 'sources.list.d' => true,
- 'preferences' => true,
- 'preferences.d' => true
- }
- }
- }
- $parts = split($::trusted['domain'], '\.')
- if size($parts) == 4 {
- $country = "${parts[1]}."
- } else {
- $country = ''
- }
- apt::source { "debian-${dist}":
- location => 'http://ftp.debian.org/debian',
- key => '126C0D24BD8A2942CC7DF8AC7638D0442B90D010',
- repos => 'main',
- release => 'stable',
- notify => Exec['apt_update'],
- }
- apt::source { "debian-${dist}-security":
- location => 'http://security.debian.org/',
- key => 'D21169141CECD440F2EB8DDA9D6D8F6BC857C906',
- repos => 'main',
- release => "stable/updates",
- require => Apt::Source["debian-${dist}"],
- }
- apt::source { "debian-${dist}-updates":
- location => 'http://ftp.debian.org/debian',
- key => '126C0D24BD8A2942CC7DF8AC7638D0442B90D010',
- repos => 'main',
- release => 'stable-updates',
- require => Apt::Source["debian-${dist}-security"],
- }
- apt::source { "debian-${dist}-backports":
- location => 'http://ftp.debian.org/debian',
- key => '126C0D24BD8A2942CC7DF8AC7638D0442B90D010',
- repos => 'main',
- release => 'stable-backports',
- require => Apt::Source["debian-${dist}-updates"],
- }
- apt::pin { "${::lsbdistcodename}-backports":
- packages => ['linux*', 'haproxy', 'nginx', 'bacula*', 'nodejs'],
- require => Apt::Source["debian-${dist}-backports"],
- priority => 500
- }
- apt::source { 'beryju.org':
- location => 'http://apt.beryju.org/',
- release => 'stable',
- repos => 'beryjuorg',
- key => {
- 'id' => 'EEB2544FAA2FC778E6C77C994C66B2475FD29847',
- 'source' => 'http://apt.beryju.org/public.key',
- },
- require => Apt::Pin["${::lsbdistcodename}-backports"],
- }
- apt::source { 'puppetlabs':
- location => 'http://apt.puppetlabs.com',
- repos => 'PC1',
- release => 'jessie',
- key => {
- 'id' => '6F6B15509CF8E59E6E469F327F438280EF8D349F',
- 'source' => 'https://apt.puppetlabs.com/pubkey.gpg',
- },
- require => Apt::Source['beryju.org'],
- }
- apt::source { 'zabbix':
- location => 'http://repo.zabbix.com/zabbix/3.2/debian/',
- repos => 'main',
- release => 'jessie',
- key => {
- 'id' => 'FBABD5FB20255ECAB22EE194D13D58E479EA5ED4',
- 'source' => 'http://repo.zabbix.com/zabbix-official-repo.key',
- },
- require => Apt::Source['puppetlabs'],
- }
- # Zabbix repo is managed by zabbix-agent module
- exec { 'apt-get-update':
- command => '/usr/bin/apt-get update',
- refreshonly => true,
- require => Apt::Source['zabbix'],
- }
- package { 'beryjuorg-ca':
- ensure => 'latest',
- require => Exec['apt-get-update'],
- }
- package { 'puppetlabs-release-pc1':
- ensure => 'latest',
- require => Exec['apt-get-update'],
- }
- package { 'linux-image-amd64':
- ensure => 'latest',
- require => Exec['apt-get-update'],
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement