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

Allow to ignore missing sources in file copy operations

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.8.0
    • Fix Version/s: 3.12.0
    • Component/s: cf-runagent
    • Labels:
      None

      Description

      In my environment, it is a common pattern that files are copied from optional places. With cfengine3, this is very noisy because missing source files are treated as an error.

      There exist hacks like copying the parent directory and checking whether file exists there, but:

      • this makes things very ugly; you have either to write dozens of complex bundles, or create a bundle with dozens of parameters covering the possible use cases (e.g. permissions, ownerships, recursion levels, backup, incusion/exclusion lists...)
      • it causes overhead; file_select works on files only and the mentioned check will create all subdirectories
      • it makes ordering complicated; you have to mix methods: and files: sections

      Some tag like missing_ok => "true" would make things much more easy to write.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              a10038 jimis (Dimitrios Apostolou)
              Reporter:
              ensc Enrico Scholz
              Votes:
              5 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: