Puppet Function: debian::codename::gt

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

Summary

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

Overview

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

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