openstack-ansible-lxc_hosts/vars/ubuntu-16.04.yml
Logan V 9ad190a7c8 Fix locales on Ubuntu
The new Ubuntu base image we use does not ship with any locales
or locale configuration. A fix[1] attempted to remedy this by
copying the default locale configuration from the host, but it
is not a valid fix since the locale from the host is not present
or generated in the container cache. This causes things to break
on the system when valid locales are used, such as database
systems[2].

Instead, to prepare locales in Ubuntu[3], we should install the
locales package and provide a list of valid locales to prep
the base image. It is not necessary to copy /etc/default/locale
from the system. The first locale provided will be used as
the system's base locale by running 'update-locale' which
builds /etc/default/locale.

[1] e62de979cb
[2] http://paste.openstack.org/show/719241/
[3] https://www.thomas-krenn.com/en/wiki/Configure_Locales_in_Ubuntu#No_locale_set

Change-Id: Iaa5351777d7db464e8a897fdf33c0f440bfa601b
2018-04-14 17:43:48 -05:00

57 lines
1.5 KiB
YAML

---
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
_lxc_hosts_container_image_url: "http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.4-base-{{ lxc_cache_map.arch }}.tar.gz"
_lxc_cache_map:
distro: ubuntu
arch: "{{ lxc_architecture_mapping.get( ansible_architecture ) }}"
release: xenial
copy_from_host:
- /etc/apt/sources.list
- /etc/apt/apt.conf.d/
- /etc/apt/preferences.d/
- /etc/environment
- /etc/localtime
- /root/repo.keys
- /etc/protocols
_lxc_cache_prep_template: "prep-scripts/ubuntu_16_prep.sh.j2"
_lxc_cache_distro_packages:
- apt-transport-https
- ca-certificates
- cron # xenial doesn't have cronie
- dbus
- debianutils # for 'which' executable
- gcc
- iproute2
- iputils-ping
- libffi-dev
- libssl-dev
- locales
- netbase
- openssh-server
- openssl
- python2.7
- python-dev
- python3-dev
- rsync
- sudo
- systemd
- systemd-sysv
- tar
- wget