ERROR: Ansible requires the locale encoding to be UTF-8; Detected ISO8859–1.
Mar 26, 2024
Are you facing the below error, when executing the ansible?
ERROR: Ansible requires the locale encoding to be UTF-8; Detected ISO8859–1.
To set the system-wide locale to en_IN.UTF-8
, you need to follow these steps:
- Set the
LANG
variable:
Edit the /etc/default/locale
file:
sudo nano /etc/default/locale
And set the LANG
variable to en_IN.UTF-8
:
LANG="en_IN.UTF-8"
2. Apply Changes:
Reboot your system or log out and log back in to apply the changes.
After setting the LANG
variable to en_IN.UTF-8
and rebooting, your system should now use UTF-8 encoding with the en_IN
locale, and the Ansible encoding error should be resolved.