On both Ubuntu 14.04 and 16.04, the DB VM fails to complete its "Add all the packages needed for operation" playbook task if the host locale is not set to en_US. In my case, Ubuntu had automagically set my locale to es_ES based on my timezone during installation. The error reported is:
Adding user postgres to group ssl-cert
Creating config file /etc/logrotate.d/postgresql-common with new version
Building PostgreSQL dictionaries from installed myspell/hunspell packages...
Removing obsolete dictionary files:
* No PostgreSQL clusters exist; see \"man pg_createcluster\"
Error: The locale requested by the environment is invalid.
Error: could not create default cluster. Please create it manually with
pg_createcluster 9.3 main --start
or a similar command (see 'man pg_createcluster').
After setting my locale back to en_US in all aspects (date, time, numeric, etc), the LANGUAGE environment variable was set properly again and postgres installed successfully.
A fix would be to hardcode the locale environment variables into the playbook. If that is an acceptable solution, I will prepare a PR. A workaround is having a proper LANGUAGE variable defined in your .bash_profile.
Last tested on 3e9b52b082ad602fdcab5cc05643b022a7655f2f.
Thanks for reporting. I think hardcoding the env vars seems reasonable, I don't think we will need to support non-US locales in the BTS. If you can prepare a PR that would be great.
On both Ubuntu 14.04 and 16.04, the DB VM fails to complete its "Add all the packages needed for operation" playbook task if the host locale is not set to en_US. In my case, Ubuntu had automagically set my locale to es_ES based on my timezone during installation. The error reported is:
This is because remote sessions using non-en_US locales fail to set the
LANGUAGE
environment variable properly. An article referencing the problem can be found here: https://www.digitalocean.com/community/questions/language-problem-on-ubuntu-14-04After setting my locale back to en_US in all aspects (date, time, numeric, etc), the
LANGUAGE
environment variable was set properly again and postgres installed successfully.A fix would be to hardcode the locale environment variables into the playbook. If that is an acceptable solution, I will prepare a PR. A workaround is having a proper
LANGUAGE
variable defined in your .bash_profile.Last tested on 3e9b52b082ad602fdcab5cc05643b022a7655f2f.