Puppet Class: mongodb::repo::yum

Defined in:
manifests/repo/yum.pp

Summary

This is a repo class for yum

Overview

Parameters:

  • ensure (Enum['present', 'absent'])

    present or absent

  • repo_location (String[1])

    Location of the upstream repository

  • description (String[1])

    A human-readable description of the repository.

  • proxy (Optional[String[1]]) (defaults to: undef)

    Proxy hostnam

  • proxy_username (Optional[String[1]]) (defaults to: undef)

    Proxy user name

  • proxy_password (Optional[String[1]]) (defaults to: undef)

    Proxy pasword



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'manifests/repo/yum.pp', line 23

class mongodb::repo::yum (
  Enum['present', 'absent'] $ensure,
  String[1] $repo_location,
  String[1] $description,
  Optional[String[1]] $proxy          = undef,
  Optional[String[1]] $proxy_username = undef,
  Optional[String[1]] $proxy_password = undef,
) {
  # We try to follow/reproduce the instruction
  # https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-red-hat/

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