In puppet, how to I determine if node is using systemd or sysvinit? [closed]
Firstly, we are running puppet 4.4.2.
I have a custom puppet module which installs a daemon/service: a small ruby Webrick. I have both a systemd script to start/stop the daemon, and I also have a Sysvinit script. I would like to install the appropriate script for either one.
My ideal puppet-flow would be:
- puppet detects if systemd or sysvinit is being used
- puppet module then installs the appropriate script
- puppet module enables & ensures the service is running, using the appropriate script.
Is this possible?