salt
salt copied to clipboard
locale.present not working in Ubuntu 14.04
Salt Tag: v2015.8.6
On Ubuntu 14.04, locale-gen returns an error if it is passed a charmap as part of the locale: [INFO ] Executing command ['locale-gen', 'de_DE.UTF-8 UTF-8'] in directory '/home/ubuntu' [ERROR ] Command ['locale-gen', 'de_DE.UTF-8 UTF-8'] failed with return code: 1
I therefore propose to pass salt.utils.locales.normalize_locale(locale) to locale-gen instead of just locale.
Does anyone know how this should be handled for other linux flavors? On debian, any parameter to locale-gen is just ignored; gentoo is already handled separately.
I'll post a PR later, probably I'll just qualify it with 'if os_ubuntu'.