(PUP-1624) cron: move the default value logic from user to target
Crontab is an oddball example for parsedfile resources, because resources don't
end up in actual files, but I/O is indirected through crontab(1) instead.
Therefor, the target property doesn't really apply and maps to the user
property instead, after a fashion - the user that runs the cron task is
determined by which crontab the entry is stored in.
For default values, it was determined that the user property should be
processed before the target property (on type level) and choose the default
(i.e. the user running puppet). The target property would use the value
of user as its default.
This leads to a peculiar situation when target is managed but user is not.
User *will* use its default value then, which will often differ from the
choice made for target. Puppet will then try and bring the user property
in sync with the default value.
To evade this, a default value for the user property should be avoided,
at least for resources that use the crontab provider. The current rules:
- The 'user' property uses the user running puppet as default.
- When crontab is in use, 'target' uses the 'user' value as default.
- For other parsedfile providers, 'target' uses the provider's default.
Instead, apply the following rules:
- When crontab is in use, 'user' has no default value.
- Otherwise, the default is the user running puppet.
- If crontab is in use and there is a 'user' value, 'target' defaults to that.
- If crontab is in use and there is no 'user' value, 'target' defaults to the
user running puppet.
- For other parsedfile providers, 'target' uses the provider's default.