Puppet Function: debian::codename::require::min

Defined in:
modules/debian/functions/codename/require/min.pp
Function type:
Puppet Language

Summary

fail to compile if the running debian codename is not at least equal to the $codename passed

Overview

debian::codename::require::min(String $codename, Optional[String] $msg = undef)Boolean

SPDX-License-Identifier: Apache-2.0

Examples:

Assuming theses functions are compiled for a host running debian buster then

debian::codename::require('buster')  # pass/no action
debian::codename::compare('stretch') # fail()
debian::codename::compare('stretch', '<') # fail()
debian::codename::compare('stretch', '>') # pass/no action
debian::codename::compare('buster', '>=') # pass/no action
debian::codename::compare('buster', '<=') # pass/no action

Parameters:

  • codename (String)

    the codename you want to test against

  • operator

    the comparison operator to us i.e

  • msg (Optional[String]) (defaults to: undef)

Returns:

  • (Boolean)

    result of the comparison



13
14
15
16
17
18
# File 'modules/debian/functions/codename/require/min.pp', line 13

function debian::codename::require::min (
    String           $codename,
    Optional[String] $msg      = undef,
) {
    debian::codename::require($codename, '>=', $msg)
}