Concat, file lines, and you!

The previous samples relied on existing resources such as the host, or existing forge modules such as haproxy and mysql. In some cases, we'll need to build custom configuration files on systems using exported resources. We'll go over samples using both concat and file_line. concat to declare the entire contents of a file, using a list of ordered strings. File line is part of puppetlabs-stdlib (for more information visit https://forge.puppet.com/puppetlabs/stdlib) and it places lines that are not present into an existing file, and can also be used to match an existing line using regex.

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.