Puppet Function: openvmtools::supported

Defined in:
functions/supported.pp
Function type:
Puppet Language

Summary

Returns whether the currently loaded OS is supported by the module

Overview

openvmtools::supported(String[1] $mod)Boolean

This function uses the current facts to check if the current Operating System and its release or major release is supported.

Examples:

Using the Puppet built in global $module_name

openvmtools::supported($module_name)

Parameters:

  • mod (String[1])

    The module name to check.

Returns:

  • (Boolean)

    Whether the current OS is supported for the given module



13
14
15
16
17
18
# File 'functions/supported.pp', line 13

function openvmtools::supported(String[1] $mod) >> Boolean {
  $metadata = load_module_metadata($mod)
  $metadata['operatingsystem_support'].any |$os| {
    $os['operatingsystem'] == $facts['os']['name'] and $facts['os']['release']['major'] in $os['operatingsystemrelease']
  }
}