array_realize

Pass an array of virtual resources and it will be realized, nothing more, nothing less. Best used with an ENC and/or Hiera

Göran Törnqvist

gorantornqvist

6,185 downloads

5,567 latest version

3.8 quality score

Version information

  • 1.0.3 (latest)
  • 1.0.2
  • 1.0.1
  • 1.0.0
released Mar 17th 2017

Start using this module

Documentation

gorantornqvist/array_realize — version 1.0.3 Mar 17th 2017

puppet-array_realize

Pass an array or hash of virtual resources to the realize parameter and it will be realized, nothing more, nothing less.

This is useful when you define resources like users or ssh keys as virtual resources in puppet modules and want to use an ENC like foreman to control where the resources are defined, like certain hostgroups or hosts. The hiera_array parameter also takes all parameters defined in hiera and performs an array merge using hiera_array() function.


Examples

class { 'array_realize':
  realize => [
    File['/tmp/myfile'],
    Ssh_authorized_key['root_key'],
    Mymodule::Mycustomdefinedtype['something']
  ]
}

Hash:

array_realize: 
  realize: 
    File[/tmp/myfile]:
    Ssh_authorized_key[root_key]:
    Mymodule::Mycustomdefinedtype[something]:

Hiera:

array_realize::hiera_array: 
 - File[/tmp/myfile]
 - Ssh_authorized_key[root_key]
 - Mymodule::Mycustomdefinedtype[something]