Puppet Function: debian::codename::require::max

Defined in:
modules/debian/functions/codename/require/max.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::max(String $codename, Optional[String] $msg = undef)Boolean

SPDX-License-Identifier: Apache-2.0

Examples:

Assumaxg 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/max.pp', line 13

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