I would like to report that the standard_services policy in the standard library doesn't properly detect whether a systemd service is enabled or not.
In the current implementation, cfengine parses the output of systemctl show and checks if UnitFileState=enabled as shown on this line : https://github.com/cfengine/masterfiles/blob/092371f6241598f483b202d9593139b3f263f0ae/lib/services.cf#L231
The problem is that UnitFileState is misleading as it can take many values, and among these values all the following describe an enabled service : enabled-runtime, indirect, generated, and transient.
I see two ways to fix the current implementation : either use the systemctl is-enabled command, which will take care of these details correctly, or fix the parsing to check for these additional values.
Thank you for making cfengine so great!
Have a nice day,