aboutsummaryrefslogtreecommitdiff
path: root/modules/locales/manifests/init.pp
blob: 6a5dc2a0e764751b043544e41577270b62b13c24 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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   => File_line['/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   => File_line['/etc/locale.gen#fr_FR.UTF-8'],
    refreshonly => true,
  }
}