Puppet Class: mongodb::repo::apt

Inherits:
mongodb::repo
Defined in:
manifests/repo/apt.pp

Overview

PRIVATE CLASS: do not use directly



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
# File 'manifests/repo/apt.pp', line 2

class mongodb::repo::apt inherits mongodb::repo {
  # we try to follow/reproduce the instruction
  # from http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/

  include ::apt

  if($::mongodb::repo::ensure == 'present' or $::mongodb::repo::ensure == true) {
    apt::source { 'mongodb':
      location => $::mongodb::repo::location,
      release  => $::mongodb::repo::release,
      repos    => $::mongodb::repo::repos,
      key      => {
        'id'     => $::mongodb::repo::key,
        'server' => $::mongodb::repo::key_server,
      }
    }

    Apt::Source['mongodb']->Package<|tag == 'mongodb'|>
  }
  else {
    apt::source { 'mongodb':
      ensure => absent,
    }
  }
}