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

inifile : AIX inifile handling lines beginning with "*" strangely

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: inifile
    • Template:
      MODULES Bug Template
    • Team:
      Modules
    • Sprint:
      Modules Triage
    • Method Found:
      Customer Feedback
    • QA Risk Assessment:
      Needs Assessment

      Description

      Basic Info
      *Module Version: 2.0.0 and 2.3.0 tried both
      *Puppet Version: 2018.1.2
      OS Name/Version: AIX v7.1 - 7100-04-05-1720

      Describe your issue in as much detail as possible...

      Desired Behavior:

      Wish to change items in the default: stanza in the /etc/security/user file to:
      default:
      minlen = 100
      maxrepeats = 5
      minloweralpha = 55

      Option to ignore lines that begin with "*" which is AIX comment character because it appears that the inifile module is manipulating lines beginning with "*" in very strange ways.

      Using puppet code:
      class xxxx_aix_base::etcsecurityuser {
      ini_setting

      { 'default minlen': ensure => present, path => '/etc/security/user-testfile', section => 'default', setting => 'minlen', value => '100', section_prefix => '', section_suffix => ':', indent_char => ' ', indent_width => '8', }

      ini_setting

      { 'default minloweralpha': ensure => present, path => '/etc/security/user-testfile', section => 'default', setting => 'minloweralpha', value => '55', section_prefix => '', section_suffix => ':', indent_char => ' ', indent_width => '8', }

      }

      Actual Behavior:

      When parsing the /etc/security/user file to replace/add specific values, the desired lines are changed to the desired values but lines beginning with "*" are being manipulated in strange ways, blank lines are being inserted, text is being shifted around.

      Please review the attached files for a better understanding of what is happening.
      The original file:
      user-testfile-template
      the resulting file after puppet has run:
      user-testfile

      and the output from an SDIFF compare:
      user-testfile-sdiff

      Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              tustm@schneider.com Michael Tust
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support