Puppet Function: debian::codename::eq

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

Summary

Test if the running debian codename is equal to the codename passed

Overview

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


8
9
10
11
12
13
# File 'modules/debian/functions/codename/eq.pp', line 8

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