puppetlabs-apache icon indicating copy to clipboard operation
puppetlabs-apache copied to clipboard

Fix static SLES version to use facts

Open pascalseeland opened this issue 7 months ago • 1 comments

Summary

SUSE release SLES15 SP6, which causes a wrong module path when upgrading from SP5 to SP6.

This patch uses the major and minor number provided by factor to create the correct paths

Additional Context

Add any additional context about the problem here.

  • [x] Root cause and the steps to reproduce. (If applicable)

With the upgrade from 15.5 to 15.6 the path of the module needs to be changed. Otherwise the module tries to enable a 15.5 repo on 15.6 which fails with

Notice: /Stage[main]/Apache::Mod::Php/Exec[enable legacy repos]/returns: 
Notice: /Stage[main]/Apache::Mod::Php/Exec[enable legacy repos]/returns: Activating sle-module-legacy 15.5 x86_64 ...
Notice: /Stage[main]/Apache::Mod::Php/Exec[enable legacy repos]/returns: Error: Registration server returned 'The product you are attempting to activate (Legacy Module 15 SP5 x86_64) requires one of these products to be activated first: Server Applications Module 15 SP5 x86_64' (422)
Error: 'SUSEConnect --product sle-module-legacy/15.5/x86_64' returned 67 instead of one of [0]
Error: /Stage[main]/Apache::Mod::Php/Exec[enable legacy repos]/returns: change from 'notrun' to ['0'] failed: 'SUSEConnect --product sle-module-legacy/15.5/x86_64' returned 67 instead of one of [0] (corrective)
  • [ ] Thought process behind the implementation.

Related Issues (if any)

Mention any related issues or pull requests.

Checklist

  • [ ] 🟢 Spec tests.
  • [ ] 🟢 Acceptance tests.
  • [x] Manually verified. (For example puppet apply)

pascalseeland avatar Jul 06 '24 14:07 pascalseeland