I am using the IniFile module with augeas to create a Splunk management lens. This works well for all files containing section headers like a normal INI file but there are a couple files that don't follow this scheme, just using the name=value pairs.
Is there a ready way to map these entries without a section defined to something generic, like main? I'd rather not have to learn another module for this second file type of there is a ready way to avoid it for the moment.
module Splunk = autoload xfm let comment = IniFile.comment IniFile.comment_re IniFile.comment_default let sep = IniFile.sep IniFile.sep_re IniFile.sep_default let setting = IniFile.record_re let title = IniFile.title ( IniFile.record_re ) let entry = IniFile.entry steting sep comment let record = IniFile.record title entry let lns = IniFile.lns record comment let filter = incl "/etc/splunk/*.conf" let xfm = transform lns filter test lns get "[section]\ntest-value=yes\n" = ? test lns get "test=yes\n" = ?