Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-1868

Inifile file should handle global sections better

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: inifile
    • Labels:
      None
    • Template:
    • Story Points:
      1
    • Sprint:
      MODS 2015-04-01

      Description

      Inifile subsetting doesn't error out if you fail to provide 'section' as a parameter value, instead if the file doesn't exist it will change on every run and try to reference a section as [] and create it, the following manifest:

      ini_setting { "sample setting":
        ensure  => present,
        path    => '/tmp/test.foo',
        setting => 'foo',
        value   => 'a',
      }
      

      Would create a file /tmp/test.foo

      []
      foo = a
      []
      foo = a
      []
      foo = a
      []
      foo = a
      []
      foo = a
      

      Buried in documentation there is a note saying "if you want a global setting, you should provide section => "" " - changing the type to default the value to "" if none is provided would accomplish the same thing and follow the logical pattern of "if I don't declare a section, I want it global".

        Attachments

          Activity

            People

            • Assignee:
              bryan.jen Bryan Jen
              Reporter:
              cbarker Chris Barker
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support