File: yum.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 (20 lines) | stat: -rw-r--r-- 610 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
# PRIVATE CLASS: do not use directly
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/10gen Repository',
      baseurl  => $::mongodb::repo::location,
      gpgcheck => '0',
      enabled  => '1',
    }
    Yumrepo['mongodb'] -> Package<|tag == 'mongodb'|>
  }
  else {
    yumrepo { 'mongodb':
      enabled => absent,
    }
  }
}