Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-270

edit_template inserts extra new line

    XMLWordPrintable

    Details

      Description

      I have a test template file that I try to use with edit_template, but it seems that it adds an extra newline at the end
      of the resulting file.

      # cat /tmp/test.txt.cftmpl 
      [%CFEngine any:: %]
      1
      2
      [%CFEngine linux:: %]
      3
      4
      5
      # cat /tmp/test.cf 
      body common control {
      	bundlesequence => { "test" };
      	host_licenses_paid => "10";
      }
      
      bundle agent test {
      	files:
      		"/tmp/test.txt"
      			create => "true",
      			edit_template => "/tmp/test.txt.cftmpl";
      }
      # /var/cfengine/bin/cf-agent -K -f /tmp/test.cf && cat /tmp/test.txt
      1
      2
      3
      4
      5
      
      # 
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              a10007 Jon Henrik Bjørnstad (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: