Puppet Class: mongodb::repo::yum

Inherits:
mongodb::repo
Defined in:
manifests/repo/yum.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
# File 'manifests/repo/yum.pp', line 2

class mongodb::repo::yum inherits mongodb::repo {
  # We try to follow/reproduce the instruction
  # http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/

  if $mongodb::repo::ensure == 'present' or $mongodb::repo::ensure == true {
    yumrepo { 'mongodb':
      descr          => $mongodb::repo::description,
      baseurl        => $mongodb::repo::location,
      gpgcheck       => '0',
      enabled        => '1',
      proxy          => $mongodb::repo::proxy,
      proxy_username => $mongodb::repo::proxy_username,
      proxy_password => $mongodb::repo::proxy_password,
    }
    Yumrepo['mongodb'] -> Package<| tag == 'mongodb_package' |>
  }
  else {
    yumrepo { 'mongodb':
      ensure => absent,
    }
  }
}