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.