Before your change puppet treated the provider unsuitable if `/bin/systemctl` has been absent (the command method creates a confine for that provider, telling puppet that the command has to exist for the provider to work). Now you wrap that in an if clause but if neither `/bin/systemctl` nor `/usr/bin/systemctl` exist the new code does not declare any confine. So puppet can happily pick the provider for service resources on systems that don't have systemd installed.

Maybe you can change that to something like

    systemctl_binary = File.executable?('/usr/bin/systemctl') ? '/usr/bin/systemctl' : '/bin/systemctl'
    commands :systemctl => systemctl_binary

so you will always declare a confine. If `/usr/bin/systemctl` is present use this command otherwise `/bin/systemctl`. If that one is also absent, puppet will treat the provider as unsuitable