I'm trying to link a list of installed packages to the services they have running on a system (init.d). I'm using ansible for this, but of course a bash hint is also usable.
For example if upon examination it turns out that openssh is installed, I want that the state and status of the service sshd is also reported.
Which ways are there to find out which services belong to which package ?
rpm -qf
on the running binary? – Jeff Schaller Jul 06 '20 at 22:09