| Puppet Version: 7.24 Puppet Server Version: None OS Name/Version: Amazon Linux 2023 I'm using Puppet 7.24 installed from `https://yum.puppet.com/puppet7-release-el-9.noarch.rpm` The same issue reported in PUP-11168 and PUP-11433 also applies for Amazon Linux 2023. When using the service resource type, Amazon Linux 2023 is not listed in https://github.com/puppetlabs/puppet/blob/main/lib/puppet/provider/service/systemd.rb, so it falls back to using chkconfig and /sbin/service. Desired Behavior:{} Amazon Linux 2023 should use systemd for services. Actual Behavior: The service resource type in Amazon Linux 2023 falls back to chkconfig and /sbin/service. Let's suppose an example service like this: service { 'my-service': ensure => 'running', name => 'my-service', enable => true, } When running puppet apply I get errors from chkconfig Error: Could not enable envoy: Execution of '/sbin/chkconfig --add my-service' returned 1: error reading information on service my-service: No such file or directory Error: /Stage[main]/My_Class/Service[my-service]/ensure: change from 'stopped' to 'running' failed: Could not enable my-service: Execution of '/sbin/chkconfig --add my-service' returned 1: error reading information on service my-service: No such file or directory By patching /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/service/systemd.rb with: defaultfor :operatingsystem => :amazon, :operatingsystemmajrelease => ["2", "2023"] the issue appears to be fixed. |