Since base::service_unit (ab)uses a behaviour of puppet 3 that has changed with puppet 4, so that templates defined within this define could freely lookup variables from the calling resource, that is not possible anymore with puppet 4.
So we need a clear way to fix this. My first take was "fix the templates", but that's a ton of work and is admittedly ugly. I'd rather do the following, in order:
- Create an helper function that auto-calculates the template name and renders it, the same way base::service_unit did.
- Convert all base::service_unit declarations that are systemd-only to use systemd::service or systemd::unit
- Change base::service_unit to accept content from the caller, and obtain that with the functions implemented earlier
This should give us the possibility to avoid touching the templates, and let us transition to the future parser with less friction.