Puppet Function: dovecot::print_config_value

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

Summary

returns a properly quoted dovecot config value

Overview

dovecot::print_config_value(Any $value)Any

Function: dovecot::print_config_value()

Parameters:

  • value (Any)

    the value to be printed

Returns:

  • (Any)

    the formatted config value suitable for inclusion in a dovecot config file

See Also:

  • dovecotdovecot::config
  • dovecotdovecot::rmilterdovecot::rmilter::config

Author:

  • Bernhard Frauendienst <puppet@nospam.obeliks.de>



14
15
16
17
18
19
20
21
22
23
# File 'functions/print_config_value.pp', line 14

function dovecot::print_config_value($value) {
  $value ? {
    Undef   => '',
    ''      => '""',
    true    => 'yes',
    false   => 'no',
    /(#|\n|\A\s+|\s+\z)/ => "\"${value}\"",
    default => $value,
  }
}