Forge Home

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

7,376 downloads

6,545 latest version

3.8 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

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

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'gorantornqvist-array_realize', '1.0.3'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add gorantornqvist-array_realize
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install gorantornqvist-array_realize --version 1.0.3

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

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]