Concat – the hammer

We'll be building a file called /tmp/hammer.conf that is comprised of a header section and a variable number of sections provided by exported resources. This class was designed to be used on all machines in an infrastructure, but could easily be turned into a single server configuration file by splitting the exported resource into a separate profile from the concat resource and the header concat::fragment.

The following sample uses puppetlabs-concat from the Puppet Forge.(For more information visit https://forge.puppet.com/puppetlabs/concat). The concat module allows us to declare a file, made from pieces or fragments, and order the creation of a single file on a system. This allows us to define one or more headers and ...

Get Mastering Puppet 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.