Skip to content

Commit

Permalink
Add support to Debian 12 and Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
tomposmiko authored and saz committed May 17, 2024
1 parent b78ab28 commit c2feca1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,22 @@

case $facts['os']['name'] {
/(Ubuntu|Debian|LinuxMint|Linuxmint|Raspbian|Kali|Pop!_OS)/: {
$default_file = '/etc/default/locale'
case $facts['os']['name'] {
'Debian': {
if versioncmp($facts['os']['release']['full'], '12') >= 0 {
$default_file = '/etc/locale.conf'
}
}
'Ubuntu': {
if versioncmp($facts['os']['release']['full'], '24.04') >= 0 {
$default_file = '/etc/locale.conf'
}
}
default: {
$default_file = '/etc/default/locale'
}
}

$locale_gen_cmd = '/usr/sbin/locale-gen'
$update_locale_cmd = '/usr/sbin/update-locale'
$supported_locales = '/usr/share/i18n/SUPPORTED' # ALL locales support
Expand Down

4 comments on commit c2feca1

@smoeding
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomposmiko @saz
This change leaves $default_file unset on Debian-11 or Ubuntu-22.04. The default condition only matches for non-Debian and non-Ubuntu operating systems.

Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Unknown variable: 'locales::params::default_file'. (file: /etc/puppetlabs/code/developments/development/modules/locales/manifests/init.pp, line: 144, column: 51)

@saz
Copy link
Owner

@saz saz commented on c2feca1 May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smoeding Damn! I'll release a fixed version asap. Thanks for reporting it!

@saz
Copy link
Owner

@saz saz commented on c2feca1 May 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smoeding 4.0.1 has been released.

@smoeding
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saz Works again for me. Thx! 👍

Please sign in to comment.