Hey @Nesbit7
Your playbook should work if you remove the LC_ALL=en_GB.UTF-8
from the last task, this is not actually related to Ansible itself, LC_ALL
is not supported in the locale.conf
file. Try:
- name: set as default locale
command: localectl set-locale LANG=en_GB.UTF-8
when: ansible_distribution == 'Ubuntu'
Using a role as stated above if you intend to do more complex set-ups is also a good idea!
You could use /etc/profile
or the .bashrc
file for LC_ALL.