Ask Your Question

Revision history [back]

You'll want to use the concat module.

It's well documented, but for convenience, here is an example:

class lumberjack_conf{
  $lumberjack_conf = '/var/tmp/lumberjack.conf'

  concat { $lumberjack_conf:
    owner => 'root',
    group => 'root',
    mode  => '0644'
  }

  concat::fragment{ 'lumberjack_header':
    target  => $lumberjack_conf,
    source => 'puppet:///modules/config/logconfig2',
    order   => '01'
  }

  concat::fragment{ 'lumberjack_middle:
    target => $lumberjack_conf,
    content => 'Middle Stuff',
    order  => '15'
  }

  concat::fragment{ 'lumberjack_header':
    target  => $lumberjack_conf,
    source => 'puppet:///modules/config/logconfig2_footer',
    order   => '99'
  }
}