Puppet Class: mongodb::repo::zypper

Defined in:
manifests/repo/zypper.pp

Summary

This is a repo class for zypper

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.



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'manifests/repo/zypper.pp', line 14

class mongodb::repo::zypper (
  Enum['present', 'absent'] $ensure,
  String[1] $repo_location,
  String[1] $description,
) {
  # We try to follow/reproduce the instruction
  # https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-suse/

  assert_private()

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