Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / puppet.aug
1 (* Puppet module for Augeas
2  Author: Raphael Pinson <raphink@gmail.com>
3
4  puppet.conf is a standard INI File.
5 *)
6
7
8 module Puppet =
9   autoload xfm
10
11 (************************************************************************
12  * INI File settings
13  *
14  * puppet.conf only supports "# as commentary and "=" as separator
15  *************************************************************************)
16 let comment    = IniFile.comment "#" "#"
17 let sep        = IniFile.sep "=" "="
18
19
20 (************************************************************************
21  *                        ENTRY
22  * puppet.conf uses standard INI File entries
23  *************************************************************************)
24 let entry   = IniFile.indented_entry IniFile.entry_re sep comment
25
26
27 (************************************************************************
28  *                        RECORD
29  * puppet.conf uses standard INI File records
30  *************************************************************************)
31 let title   = IniFile.indented_title IniFile.record_re
32 let record  = IniFile.record title entry
33
34
35 (************************************************************************
36  *                        LENS & FILTER
37  * puppet.conf uses standard INI File records
38  *************************************************************************)
39 let lns     = IniFile.lns record comment
40
41 let filter = (incl "/etc/puppet/puppet.conf"
42              .incl "/usr/local/etc/puppet/puppet.conf"
43              .incl "/etc/puppetlabs/puppet/puppet.conf")
44
45 let xfm = transform lns filter