voxpupuli / puppet-systemd

Puppet module to manage systemd
https://forge.puppet.com/puppet/systemd
Apache License 2.0
53 stars 142 forks source link

Setting default_target fails due to deprecated shell_escape function #479

Closed jormaster3k closed 1 month ago

jormaster3k commented 1 month ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

# Set systemd config                                                                                               
class { 'systemd':
   default_target => 'multi-user.target',
}

What are you seeing

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, deprecation. shell_escape. This function is deprecated, please use stdlib::shell_escape instead. at [".../ext-modules/systemd/manifests/init.pp", 287]:

What behaviour did you expect instead

Class applies successfully

Any additional information you'd like to impart

Need to swap out shell_escape() with stdlib::shell_escape()

jormaster3k commented 1 month ago

Several functions provided by stdlib module, including shell_escape(), were deprecated in 9.x (see https://github.com/puppetlabs/puppetlabs-stdlib/issues/1346). It seems that this change will remove compatibility with stdlib 8.x

TheMeier commented 1 month ago

stdlib deprecation leads to an error in Puppet 8 by default. As a workaround you can change the strict setting (https://www.puppet.com/docs/puppet/8/configuration#strict) in the meantime