Forge Home

conffile

Resource types for managing settings in CONF files

9,632 downloads

9,378 latest version

3.1 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

  • 0.1.1 (latest)
  • 0.1.0
released Oct 27th 2014
This version is compatible with:
  • Puppet 3.x
  • ,

Start using this module

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

Add this module to your Puppetfile:

mod 'preben-conffile', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add preben-conffile
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install preben-conffile --version 0.1.1

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

preben/conffile — version 0.1.1 Oct 27th 2014

#CONF file

####Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with conffile module
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Development - Guide for contributing to the module

##Overview

This module adds resource types to manage settings in CONF-style configuration files.

##Module Description

The conffile module adds a resource type so that you can use Puppet to manage settings in HOCON configuration files.

##Setup

##Beginning with conffile

To manage a conf file, add the resource type conf_setting to a class.

##Usage

Manage individual settings in CONF files by adding the conf_setting resource type to a class. For example:

conf_setting { "sample setting":
  ensure  => present,
  path    => '/tmp/foo.conf',
  setting => 'foosetting',
  value   => 'FOO!',
}

To control a setting nested within a map contained at another setting, provide the path to that setting under the "setting" parameter, with each level separated by a ".".

foo {
    bar {
        barsetting="FOO!"
    }
}

conf_setting {'sample nested setting':
  ensure  => present,
  path => '/tmp/foo.conf',
  setting => 'foo.bar.barsetting',
  value   => 'BAR!',
}

##Reference

###Type: conf_setting

Parameters

  • ensure: Ensures that the resource is present. Valid values are 'present', 'absent'.

  • name: An arbitrary name used as the identity of the resource.

  • path: The CONF file in which Puppet will ensure the specified setting.

  • provider: The specific backend to use for this conf_setting resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform. The only available provider for conf_setting is ruby.

  • setting: The name of the CONF file setting to be defined. This can be a top-level setting or a setting nested within another setting. To define a nested setting, give the full path to that setting with each level separated by a . So, to define a setting foosetting nested within a setting called foo contained on the top level, the setting parameter would be set to foo.foosetting.

  • value: The value of the CONF file setting to be defined.

##Development

Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.

We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.

You can read the complete module contribution guide on the Puppet Labs wiki.

##Contributors

The list of contributors can be found at: https://github.com/puppetlabs/puppetlabs-conffile/graphs/contributors/contributors.