aboutsummaryrefslogtreecommitdiff
path: root/modules/locales/manifests
diff options
context:
space:
mode:
Diffstat (limited to 'modules/locales/manifests')
-rw-r--r--modules/locales/manifests/init.pp12
-rw-r--r--modules/locales/manifests/locale.pp7
2 files changed, 11 insertions, 8 deletions
diff --git a/modules/locales/manifests/init.pp b/modules/locales/manifests/init.pp
index 6a5dc2a..982b48e 100644
--- a/modules/locales/manifests/init.pp
+++ b/modules/locales/manifests/init.pp
@@ -1,13 +1,9 @@
1class locales { 1class locales {
2 file_line { '/etc/locale.gen#fr_FR.UTF-8': 2 locales::locale { '/etc/locale.gen#fr_FR.UTF-8':
3 path => '/etc/locale.gen', 3 locale => 'fr_FR.UTF-8'
4 line => 'fr_FR.UTF-8 UTF-8 ',
5 match => '#?fr_FR.UTF-8 UTF-8 +$',
6 } 4 }
7 file_line { '/etc/locale.gen#en_US.UTF-8': 5 locales::locale { '/etc/locale.gen#en_US.UTF-8':
8 path => '/etc/locale.gen', 6 locale => 'en_US.UTF-8'
9 line => 'en_US.UTF-8 UTF-8 ',
10 match => '#?en_US.UTF-8 UTF-8 +$',
11 } 7 }
12 exec { '/usr/bin/locale-gen': 8 exec { '/usr/bin/locale-gen':
13 subscribe => File_line['/etc/locale.gen#fr_FR.UTF-8', '/etc/locale.gen#en_US.UTF-8'], 9 subscribe => File_line['/etc/locale.gen#fr_FR.UTF-8', '/etc/locale.gen#en_US.UTF-8'],
diff --git a/modules/locales/manifests/locale.pp b/modules/locales/manifests/locale.pp
new file mode 100644
index 0000000..1eb14be
--- /dev/null
+++ b/modules/locales/manifests/locale.pp
@@ -0,0 +1,7 @@
1define locales::locale ($locale, $charmap = 'UTF-8') {
2 file_line { "/etc/locale.gen#$locale":
3 path => '/etc/locale.gen',
4 line => "$locale $charmap ",
5 match => "#?$locale $charmap +$",
6 }
7}