Puppet Function: debian::codename::ge

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

Summary

Test if the running debian codename is greater then or equal to the codename passed

Overview

debian::codename::ge(String $codename, Optional[String[1]] $compare_codename = undef)Boolean

SPDX-License-Identifier: Apache-2.0

Examples:

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

debian::codename::ge('buster') == True
debian::codename::ge('stretch') == True
debian::codename::ge('bullseye') == False

Parameters:

  • codename (String)

    the codename you want to test against

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

    An explicit codename to compare otherweise use facter

Returns:

  • (Boolean)

    result of the comparison



10
11
12
13
14
15
# File 'modules/debian/functions/codename/ge.pp', line 10

function debian::codename::ge (
    String              $codename,
    Optional[String[1]] $compare_codename = undef,
) >> Boolean {
    debian::codename::compare($codename, '>=', $compare_codename)
}