File: apt.pp

package info (click to toggle)
puppet-module-puppetlabs-mongodb 0.7.0-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 304 kB
  • sloc: ruby: 982; sh: 10; makefile: 4
file content (25 lines) | stat: -rw-r--r-- 765 bytes parent folder | download | duplicates (3)
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
# PRIVATE CLASS: do not use directly
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 { 'downloads-distro.mongodb.org':
      location    => $::mongodb::repo::location,
      release     => 'dist',
      repos       => '10gen',
      key         => '9ECBEC467F0CEB10',
      key_server  => 'keyserver.ubuntu.com',
      include_src => false,
    }

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