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

puppetlabs/inifile: wrong behaviour if colon are present in 'setting'

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: inifile
    • Environment:

      puppetlabs-inifile: 1.2.0

    • Template:

      Description

      ini_setting doesn't handle colon in 'setting' very well. It keeps adding the line at each runs.

      example:

      ini_setting { 'Test':
          ensure  => present,
          path    => '/tmp/test.ini',
          section => 'test',
          setting => 'testsetting:tests',
          value   => 'testvalue',
        }
      

      Run it multiple times and '/tmp/test.ini' looks like:

      [test]
      testsetting:tests = testvalue
      testsetting:tests = testvalue
      testsetting:tests = testvalue
      testsetting:tests = testvalue
      testsetting:tests = testvalue
      testsetting:tests = testvalue
      #[...]
      

      ```

      This could be problematic for ini files using colons in setting name (ex: samba with smb.conf)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kakwa Pierre-Francois Carpentier
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support