On 04/28/2016 03:53 PM, Louis Gillette wrote:
> I'm writing up a modular promise that will
>
> A. check to see if a config file exists (sudoers in this example)
> B. Delete that existing file only if it hasn't copied the replacement in
> from /inputs/standalone
> C. Copy config file into place if it doesn't exist and set a class to
> disable future passes on the promise from deleting the file
Is there a reason you want that specific behavior?
It might be simpler to promise that /etc/sudoers is a copy of
/inputs/standalone/etc/sudoers as long as /inputs/standalone/etc/sudoers
validates with visudo -c.
Generally unless you have some specific reason you shouldn't have to
first delete the file. You can simply promise that /etc/sudoers is a
copy of /inputs/standalone/etc/sudoers.