summaryrefslogtreecommitdiff
path: root/files/puppet/modules/pixelated/manifests/apt.pp
blob: 76f4697ebef0402433f1b1360c05797ef07bdd3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# add the pixelated sources and the signing key
class pixelated::apt {

  include apt

  $version = $::domain ? {
    /^(staging|dev|unstable)\.pixelated-project\.org$/ => '-snapshots',
    default                         => '',
  }

  apt::sources_list { 'pixelated.list':
    content => "deb [arch=amd64] http://packages.pixelated-project.org/debian ${::lsbdistcodename}${version} main\n",
    require => Exec[add_pixelated_key],
    notify  => Exec[refresh_apt],
  }

  file { '/srv/leap/0x287A1542472DC0E3_packages@pixelated-project.org.asc':
    source => 'puppet:///modules/pixelated/0x287A1542472DC0E3_packages@pixelated-project.org.asc',
    notify => Exec['add_pixelated_key']
  }
  exec{'add_pixelated_key':
    command     => '/usr/bin/apt-key add /srv/leap/0x287A1542472DC0E3_packages@pixelated-project.org.asc',
    refreshonly => true,
    require     => File['/srv/leap/0x287A1542472DC0E3_packages@pixelated-project.org.asc'],
  }
}