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, } }