diff --git a/lib/puppet/provider/service/systemd.rb b/lib/puppet/provider/service/systemd.rb index b1757439678..dc0c8a2a11c 100644 --- a/lib/puppet/provider/service/systemd.rb +++ b/lib/puppet/provider/service/systemd.rb @@ -27,6 +27,7 @@ defaultfor :operatingsystem => :ubuntu notdefaultfor :operatingsystem => :ubuntu, :operatingsystemmajrelease => ["10.04", "12.04", "14.04", "14.10"] # These are using upstart defaultfor :operatingsystem => :cumuluslinux, :operatingsystemmajrelease => ["3", "4"] + defaultfor :operatingsystem => :raspbian, :operatingsystemmajrelease => ["12"] def self.instances i = [] diff --git a/spec/unit/provider/service/systemd_spec.rb b/spec/unit/provider/service/systemd_spec.rb index 72292d5bc51..3b34a679b3d 100644 --- a/spec/unit/provider/service/systemd_spec.rb +++ b/spec/unit/provider/service/systemd_spec.rb @@ -171,6 +171,13 @@ end end + it "should be the default provider on raspbian12" do + allow(Facter).to receive(:value).with(:osfamily).and_return(:debian) + allow(Facter).to receive(:value).with(:operatingsystem).and_return(:raspbian) + allow(Facter).to receive(:value).with(:operatingsystemmajrelease).and_return("12") + expect(provider_class).to be_default + end + [:enabled?, :daemon_reload?, :enable, :disable, :start, :stop, :status, :restart].each do |method| it "should have a #{method} method" do expect(provider).to respond_to(method)