Puppet Class: conf::config::apt

Inherits:
conf::install::apt
Inherited by:
conf::setup::apt
Defined in:
manifests/config/apt.pp

Summary

A short summary of the purpose of this class

Overview

A description of what this class does

Examples:

include conf::config::apt


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'manifests/config/apt.pp', line 7

class conf::config::apt() inherits conf::install::apt {




  if ($::operatingsystem == 'Debian') {
    include stdlib
    $lsbdistid = downcase( $::operatingsystem )
    exec { "/usr/bin/apt-get -q -y --force-yes -o DPkg::Options::=--force-confold install ${lsbdistid}-archive-keyring":
      before   => Package['apt'],
      cwd      => '/tmp',
      provider => shell,
      unless   => "/usr/bin/dpkg ${lsbdistid}-archive-keyring",
    }
  }

  file { '/etc/cron.daily/apt':
    require => Package['apt', 'cron'],
  }

  include conf::install::cron

  file { '/etc/apt/apt.conf.d/02periodic':
    owner   => root,
    group   => root,
    mode    => '0644',
    require => [File['/etc/cron.daily/apt'], Service['cron']],
  }

  include conf::service::cron

  exec { '/usr/bin/apt-get update':
    provider    => shell,
    refreshonly => true,
    user        => root,
    cwd         => '/tmp',
  }

}