Skip to content
  • Thomas Bellman's avatar
    72f76588
    ini_file: Allow a "global" section without header. · 72f76588
    Thomas Bellman authored
    Some INI-style files can have a "global properties", variable settings
    that come first in the file before any section header.  Here we add
    support in the ini_file definition for generating such settings, by
    putting them in a section named "" (the empty string).  So for example
    
        cfgfile::ini_file {
            '/etc/smurf.ini':
                settings => {
                    'smurfs' => { 'colour' => 'blue', },
                    '' => { 'creator' => 'Pierre', },
                };
        }
    
    will generate a file with the content
    
        creator = Pierre
    
        [smurfs]
        colour = blue
    72f76588
    ini_file: Allow a "global" section without header.
    Thomas Bellman authored
    Some INI-style files can have a "global properties", variable settings
    that come first in the file before any section header.  Here we add
    support in the ini_file definition for generating such settings, by
    putting them in a section named "" (the empty string).  So for example
    
        cfgfile::ini_file {
            '/etc/smurf.ini':
                settings => {
                    'smurfs' => { 'colour' => 'blue', },
                    '' => { 'creator' => 'Pierre', },
                };
        }
    
    will generate a file with the content
    
        creator = Pierre
    
        [smurfs]
        colour = blue
Loading