Forge Home

rclocal

Manages rc.local

5,511 downloads

423 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 5.0.0 (latest)
  • 4.0.0
released Nov 30th 2023
This version is compatible with:
  • Puppet Enterprise 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , , , , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'puppet-rclocal', '5.0.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add puppet-rclocal
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install puppet-rclocal --version 5.0.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

puppet/rclocal — version 5.0.0 Nov 30th 2023

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!

Systemd based systems will need puppet/systemd.

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 was maintained and created by example42 GmbH (c) 2012-2021 Module is transferred to Vox Pupuli on Nov 11th 2021.