Puppet Function: debian::codename::ne

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

Summary

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

Overview

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



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

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