Puppet Function: debian::codename::lt

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

Summary

Test if the running debian codename is less then the codename passed

Overview

debian::codename::lt(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::lt('buster') == False
debian::codename::lt('stretch') == False
debian::codename::lt('bullseye') == True

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/lt.pp', line 10

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