openstack-ansible-lxc_hosts/tests
Jesse Pretorius aca3d5e01d Make the LXC cache prep use the host package source config
Currently the container cache preparation process uses a pre-prepared
LXC base image which includes its own package repository configuration.

This presents a few problems:
- The first packages installed will make use of the base image's
  package repo configuration, resulting in a bypass of local mirrors
  to install the first set of packages.
- A set of vars need to be set in order to have the containers use a
  local mirror, otherwise it'll use the mirrors set in the role's vars
  files. This is counterintuitive.

Another problem introduced by I95c210c83ca968d11ba6f6a36b634bb798fa291f
as a result of the package repository vars moving from the role defaults
to the vars files is that the precedence has changed. The change in
precedence means that a task which sets a fact can't be used to override
the defaults set in the vars file. This method is used in all the role
tests to ensure that the OpenStack-CI repositories can be discovered from
the host and then used.

This patch changes the image cache preparation process to ensure that
the container package repository configuration matches the host
configuration. This is simpler and more intuitive.

Additionally the copy task from the deployment host into the container
cache is set to assume the same destination in the container as the
source (to reduce configuration verbosity), appropriately sets the
leading '0' for the mode (to prevent unexpected surprises), and
appropriately quotes the variable (to ensure forward compatibility
with Ansible 2.0).

Finally, the use of lxc_container_caches in the test configuration
has been removed as it is no longer used.

Change-Id: I420382fd3bbbb5fcae90ae0c6160233202a1a51a
2016-05-18 18:14:17 +01:00
..
files Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
ansible-role-requirements.yml Updates for typos 2015-12-09 09:17:00 -06:00
inventory Use sudo for role testing 2015-11-25 14:39:11 -06:00
test.yml Make the LXC cache prep use the host package source config 2016-05-18 18:14:17 +01:00