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

files promises using the cfengine template method should create files by default unless `create => "false"` is specified

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: N/A
    • Fix Version/s: 3.20.0
    • Component/s: cf-agent
    • Labels:
    • Story Points:
      2

      Description

      files promises using the cfengine template method should create files by default unless `create => "false"` is specified.

       

      root@hub:~# cat ~/cfengine.cf 
      bundle agent __main__
      {
        vars:
            "name"
              string => "Lars";
      
        files:
            "/tmp/edit_template"
              content => 
      "[%CFEngine BEGIN %]
      Hello $(name)!
      [%CFEngine END %]";
      
            "/tmp/test"
              template_method => "cfengine",
              edit_template => "/tmp/edit_template";
      }
      
      root@hub:~# cf-agent -KIf ~/cfengine.cf 
         error: Promised to edit '/tmp/test', but file does not exist
         error: Errors encountered when actuating files promise '/tmp/test'
      

        Attachments

          Activity

            People

            Assignee:
            larsewi Lars Erik Wik
            Reporter:
            larsewi Lars Erik Wik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: