Class Puppet::Util::Settings
In: lib/puppet/util/settings.rb
Parent: Object

The class for handling configuration files.

Methods

Included Modules

Enumerable Puppet::Util::Cacher

Attributes

file  [RW] 
timer  [R] 

Public Class methods

Create a new collection of config settings.

Public Instance methods

Retrieve a config value

Set a config value. This doesn‘t set the defaults, it sets the value itself.

Generate the list of valid arguments, in a format that GetoptLong can understand, and add them to the passed option list.

Is our parameter a boolean parameter?

Remove all set values, potentially skipping cli values.

This is mostly just used for testing.

Do variable interpolation on the value.

Handle a command-line argument.

Return a given object‘s file metadata.

Make a directory with the appropriate user, group, and mode

Figure out our name.

Generate the list of valid arguments, in a format that OptionParser can understand, and add them to the passed option list.

Return all of the parameters associated with a given section.

Parse the configuration file. Just provides thread safety.

Iterate across all of the objects in a given section.

Prints the contents of a config file with the available config settings, or it prints a single value of a config setting.

Reparse our config file, if necessary.

The order in which to search for values.

Get a list of objects per section

Create a timer to check whether the file should be reparsed.

Set a bunch of defaults in a given section. The sections are actually pretty pointless, but they help break things up a bit, anyway.

Return an object by name.

check to see if a short name is already defined

Convert the settings we manage into a catalog full of resources that model those settings. We currently have to go through Trans{Object,Bucket} instances, because this hasn‘t been ported yet.

Convert our list of config settings into a configuration file.

Convert to a parseable manifest

Unsafely parse the file — this isn‘t thread-safe and causes plenty of problems if used directly.

Create the necessary objects to use a section. This is idempotent; you can ‘use’ a section as many times as you want.

Find the correct value using our search path. Optionally accept an environment in which to search before the other configuration sections.

Open a file with the appropriate user, group, and mode

Open a non-default file under a default dir with the appropriate user, group, and mode

[Validate]