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

subsettings appended after comment

    Details

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

      puppet version: 4.6.1,
      OS: Debian GNU/Linux 8.5 (jessie)
      inifile version: 1.5.0, 1.6.0

      Description

      hi,

      it would seem that a ini_subsetting is problematic, when a comment is present in the same line after the setting. when i try to add a JAVA_ARGS subsetting to a (jenkins) properties file, they get added after a comment.

      the initial line is:

      JAVA_ARGS="-Djava.awt.headless=true"  # Allow graphs etc. to work even when an X server is present

      my puppet code:

       ini_subsetting { 'jenkins_xmx':
          ensure            => present,
          section           => '',
          key_val_separator => '=',
          path              => '/etc/default/jenkins',
          setting           => 'JAVA_ARGS',
          subsetting        => '-Xmx',
          value             => $jenkins_xmx,
        }
      

      after puppet was applied the result is:

      JAVA_ARGS="-Djava.awt.headless=true" # Allow graphs etc. to work even when an X server is present -Xmx2048m

      when i additionally set:

      quote_char        => '"',

      the result is:

      JAVA_ARGS=""-Djava.awt.headless=true" # Allow graphs etc. to work even when an X server is present -Xmx2048m"

      i would expect that a setting gets added before a comment inside the the quotes.
      did i miss how to set that up correctly or is this a bug?

      thanks

        Attachments

          Activity

            People

            • Assignee:
              lavinia.foldenyi Lavinia Dan
              Reporter:
              ssanden ssanden
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support