Puppet Function: role::translate_double_underscores

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

Overview

role::translate_double_underscores(String $role)String

Translates all double (or more) underscores in a role to ‘::’

Parameters:

  • role (String)

    Role to perform translate on.

Returns:

  • (String)

    Translated role.



5
6
7
# File 'functions/translate_double_underscores.pp', line 5

function role::translate_double_underscores(String $role) >> String {
  role::translate_with_map($role, {/_[_]+/ => '::' })
}