Resource Type: prepend_file_line

Defined in:
lib/puppet/type/prepend_file_line.rb
Providers:
ruby

Overview

Type that can prepend whole a line to a file if it does not already contain it.

Example:

file_prepend_line { ‘sudo_rule’:

path => '/etc/sudoers',
line => '%admin ALL=(ALL) ALL',

}

Properties

  • ensure (defaults to: present)

    Has no effect, items are only added to files

    Supported values:
    • present

Parameters

  • line

    The line to be prepended to the path.

  • name (namevar)

    arbitrary name used as identity

  • path

    File to possibly prepend a line to.

  • provider

    The specific backend to use for this ‘prepend_file_line` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.