|
Packit Service |
a2ae7a |
(* Puppet module for Augeas
|
|
Packit Service |
a2ae7a |
Author: Raphael Pinson <raphink@gmail.com>
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
puppet.conf is a standard INI File.
|
|
Packit Service |
a2ae7a |
*)
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
module Puppet =
|
|
Packit Service |
a2ae7a |
autoload xfm
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* INI File settings
|
|
Packit Service |
a2ae7a |
*
|
|
Packit Service |
a2ae7a |
* puppet.conf only supports "# as commentary and "=" as separator
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let comment = IniFile.comment "#" "#"
|
|
Packit Service |
a2ae7a |
let sep = IniFile.sep "=" "="
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* ENTRY
|
|
Packit Service |
a2ae7a |
* puppet.conf uses standard INI File entries
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let entry = IniFile.indented_entry IniFile.entry_re sep comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* RECORD
|
|
Packit Service |
a2ae7a |
* puppet.conf uses standard INI File records
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let title = IniFile.indented_title IniFile.record_re
|
|
Packit Service |
a2ae7a |
let record = IniFile.record title entry
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
(************************************************************************
|
|
Packit Service |
a2ae7a |
* LENS & FILTER
|
|
Packit Service |
a2ae7a |
* puppet.conf uses standard INI File records
|
|
Packit Service |
a2ae7a |
*************************************************************************)
|
|
Packit Service |
a2ae7a |
let lns = IniFile.lns record comment
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let filter = (incl "/etc/puppet/puppet.conf"
|
|
Packit Service |
a2ae7a |
.incl "/usr/local/etc/puppet/puppet.conf"
|
|
Packit Service |
a2ae7a |
.incl "/etc/puppetlabs/puppet/puppet.conf")
|
|
Packit Service |
a2ae7a |
|
|
Packit Service |
a2ae7a |
let xfm = transform lns filter
|