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

puppetlabs-inifile : White space not corrected when commented or incorrect PROMPT value already exists in file.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: inifile
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      puppetlabs-inifile (v1.6.0)
      2017.1.1.0-1
      redhat 6.7

      Using the following code

      ini_setting { '/etc/sysconfig/init PROMPT no': 
      ensure => present, 
      path => '/etc/sysconfig/init', 
      key_val_separator => "=", 
      setting => 'PROMPT', 
      value => 'no', 
      }
      
      

      When there is the following entry already in the file
      PROMPT = no
      Puppet does nothing and does not correct the entry

      If there is a commented line in the file the key_val_separator in the commented line appears to override the value that should be applied in the code...

      eg
      #PROMPT = no
      results in the following added
      PROMPT = no

      and
      #PROMPT =no
      Results in the following added
      PROMPT =no

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tp Thomas Honey
                Reporter:
                neil.binney Neil Binney
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Zendesk Support