Hi all
Can anyone see what I’m doing wrong? I’m trying to generate and set the system’s locale with the following tasks against ubuntu server 14.04.
tasks
- name: install the locales package
apt: pkg=locales state=present
-
name: ensure the locale exists
locale_gen: name={{ locale }} state=present -
name: set the locale
command: /usr/sbin/update-locale LANG={{ locale }} --reset
output
msg: /etc/locale.gen and /var/lib/locales/supported.d/local are missing. Is the package “locales” installed?
However I have confirmed that the locales package is indeed installed.
Also if I don’t use the locale_gen: module everything works fine.
tasks
- name: install the locales package
apt: pkg=locales state=present
-
name: ensure the locale exists
command: /usr/sbin/locale-gen {{ locale }} -
name: set the locale
command: /usr/sbin/update-locale LANG={{ locale }} --reset
output
changed: [vps03.fqdn.com] => {“changed”: true, “cmd”: [“/usr/sbin/locale-gen”, “en_GB.UTF-8”], “delta”: “0:00:02.105356”, “end”: “2014-04-25 01:03:10.600058”, “item”: “”, “rc”: 0, “start”: “2014-04-25 01:03:08.494702”, “stderr”: “”, “stdout”: “Generating locales…\n en_GB.UTF-8… done\nGeneration complete.”}
Thanks for the help