[augeas-devel] [PATCH 3 of 7] Rewrite puppet.aug on new inifile.aug
Raphael Pinson
raphink at gmail.com
Thu Aug 14 15:52:05 UTC 2008
# HG changeset patch
# User Raphael Pinson <raphink at gmail.com>
# Date 1218728942 -7200
# Node ID eeabbccba76be48bd0b338d625bf434e795ae77c
# Parent 2d254500331759e7334d28d5af680e4b360da724
Rewrite puppet.aug on new inifile.aug
diff -r 2d2545003317 -r eeabbccba76b lenses/puppet.aug
--- a/lenses/puppet.aug Thu Aug 14 17:48:37 2008 +0200
+++ b/lenses/puppet.aug Thu Aug 14 17:49:02 2008 +0200
@@ -8,10 +8,35 @@ module Puppet =
module Puppet =
autoload xfm
-let comment = IniFile.comment_generic "#" "#"
-let entry = IniFile.entry_nocolon_setcomment /[a-z][a-z0-9\._-]+/ comment
-let record = IniFile.record_setcomment "section" entry comment
-let lns = IniFile.lns_setcomment record comment
+(************************************************************************
+ * INI File settings
+ *
+ * puppet.conf only supports "# as commentary and "=" as separator
+ *************************************************************************)
+let comment = IniFile.comment "#" "#"
+let sep = IniFile.sep "=" "="
+
+
+(************************************************************************
+ * ENTRY
+ * puppet.conf uses standard INI File entries
+ *************************************************************************)
+let entry = IniFile.entry IniFile.entry_re sep comment
+
+
+(************************************************************************
+ * RECORD
+ * puppet.conf uses standard INI File records
+ *************************************************************************)
+let title = IniFile.title IniFile.record_re
+let record = IniFile.record title entry
+
+
+(************************************************************************
+ * LENS & FILTER
+ * puppet.conf uses standard INI File records
+ *************************************************************************)
+let lns = IniFile.lns record comment
let filter = (incl "/etc/puppet/puppet.conf")
More information about the augeas-devel
mailing list