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

puppetlabs-stdlib: file_line match not working in v4.20.0

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • None
    • stdlib
    • None
    • MODULES Bug Template
    • Modules
    • Needs Assessment
    • Needs Assessment

    Description

      Basic Info
      *Module Version:v4.20.0
      *Puppet Version: 4.10.4 (2017_2.2)
      *OS Name/Version: Redhat Linux 7.2

      Describe your issue in as much detail as possible...
      file _line match and replace a string is not working..

      if ($::hostname =~ /(wooddesktop)/) {
      file_line { 'system.conf':
              ensure => 'present',
              path => "/etc/systemd/system.conf",
              line => 'LogLevel=notice',
              match => '^#LogLevel\$',
              #match => '^#relayhost\ =\ uucphost$',
              append_on_no_match => false,
        }
      
      

      Desired Behavior:
      match string ^#LogLevel, replace with LogLevel=notice

      Actual Behavior:
      added append_on_no_match => false,
      to stop appending the "line: every run. tried undef, had not effect

      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

            hailee Hailee Kenney
            unilinux@westfieldgrp.com Westfield Insurance
            Votes:
            2 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support