Puppet Function: ssh::yesno

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

Overview

ssh::yesno(Variant[Boolean, String[1]] $value)String[1]

Pass through strings and convert booleans into ‘yes’ or ‘no’

Parameters:

  • value (Variant[Boolean, String[1]])

    The boolean value to convert to a string.

Returns:

  • (String[1])

    Returns a string content of either ‘yes’ or ‘no’.



6
7
8
9
10
11
12
# File 'functions/yesno.pp', line 6

function ssh::yesno ( Variant[Boolean, String[1]] $value ) >> String[1] {
  case $value {
    true:    { 'yes' }
    false:   { 'no' }
    default: { $value }
  }
}