rclocal

approved
pdk
Manages rc.local

Example42

example42

1,171,453 downloads

267 latest version

5.0 quality score

Version information

  • 3.3.1 (latest)
  • 3.3.0
  • 3.1.0
  • 3.0.7
  • 3.0.6
  • 3.0.4
  • 3.0.3
  • 3.0.2
  • 3.0.1
  • 3.0.0
  • 2.0.9
  • 2.0.8
  • 2.0.7
  • 2.0.6
  • 2.0.5
  • 2.0.4
  • 2.0.3
  • 2.0.2
  • 2.0.1
released May 3rd 2021
This version is compatible with:
  • Puppet Enterprise 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2016.4.x
  • Puppet >= 4.10.0 < 8.0.0
  • CentOS
    ,
    OracleLinux
    ,
    RedHat
    ,
    Scientific
    ,
    Debian
    ,
    Ubuntu
    ,
    SLES

Start using this module

Documentation

example42/rclocal — version 3.3.1 May 3rd 2021

Puppet rclocal module

Build Status

Table of Contents

  1. Module Description
  2. Setup
  3. Usage
  4. Parameters
  5. Development
  6. Author

Module description

This module manages rc.local entries in /etc/rc.local file directory.

Setup

This module uses Data Types from puppetlabs-stdlib!

Usage

To only manage the content of rc.local file:

class { 'rclocal':
  # config_file - OS specific, set via hiera data in module
  # config_dir  - OS specific, set via hiera data in module
  # template    - name a template to fill rc.local file, defaults to module template
  # scripts     - a hash of rc.local.d snippets to add
}

or include rclocal

Main usage is via a defined resource tye:

rclocal::script { 'name':
  ensure   => 'present',
  content  => "content for rc_local snippet\n",
  priority => '44',
  autoexec => true,
}

Or by defining hiera data for main class scripts parameter:

---
rclocal::scripts:
  'name':
    'ensure': 'present'
    'content': "content for rc_local snippet\n"
    'priority': '44'
    'autoexec': true

and then consume the data in your profile:

lookup('rclocal::scripts').each |$key, $params| {
  rclocal::script { $key:
    * => $params,
  }
}

Parameters

  • ensure: set to 'present' or 'absent'
  • content: the content you want to add
  • priority: manages the order where the content appears
  • autoexec: true or false - should puppet execute the code snippet from content - if set to false code will get executed on next reboot

Development

If you encounter problems, please open an issue, if you miss functionality, we are happy to review Pull Requests

Author

This module is maintained and created by example42 GmbH (c) 2012-2018