From f756de713e30c9139ad1404f057361154dea4e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Mon, 8 Aug 2016 20:07:40 +0200 Subject: Add locales module --- modules/locales/manifests/init.pp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 modules/locales/manifests/init.pp (limited to 'modules/locales/manifests') diff --git a/modules/locales/manifests/init.pp b/modules/locales/manifests/init.pp new file mode 100644 index 0000000..d9a71fb --- /dev/null +++ b/modules/locales/manifests/init.pp @@ -0,0 +1,20 @@ +class locales { + file_line { '/etc/locale.gen#fr_FR.UTF-8': + path => '/etc/locale.gen', + line => 'fr_FR.UTF-8 UTF-8', + match => 'fr_FR.UTF-8 UTF-8$', + } + file_line { '/etc/locale.gen#en_US.UTF-8': + path => '/etc/locale.gen', + line => 'en_US.UTF-8 UTF-8', + match => 'en_US.UTF-8 UTF-8$', + } + exec { '/usr/bin/locale-gen': + subscribe => FileLine['/etc/locale.gen#fr_FR.UTF-8', '/etc/locale.gen#en_US.UTF-8'], + refreshonly => true, + } + exec { '/usr/bin/localectl set-locale LANG=fr_FR.UTF-8': + subscribe => FileLine['/etc/locale.gen#fr_FR.UTF-8'], + refreshonly => true, + } +} -- cgit v1.2.3