Create locale-gen using ansible

Hi,

I’m trying to install local-gen and point it to en_GB.UTF-8. Does anyone know how to do this please?

- locale_gen:
    name: de_CH.UTF-8
    state: present

But I got the following error,
efatal: [127.0.0.1]: FAILED! => {“changed”: false, “failed”: true, “msg”: “/etc/locale.gen and /var/lib/locales/supported.d/local are missing. Is the package "locales" installed?”}e

Thanks

Please read the error that you pasted.

Also, you copy/pasted the documentation example which is for a different locale?

Dick