Puppet Function: debian::codename::le

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

Summary

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

Overview

debian::codename::le(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::le('buster') == True
debian::codename::le('stretch') == False
debian::codename::le('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/le.pp', line 10

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