Role lxc_hosts for OpenStack-Ansible
Go to file
Jesse Pretorius a5e5567369 Improve LXC cache preparation process
Without this patch, any errors that happen during the
'apt-get update' execution will cause the 'apt-get install'
execution to never happen.

This patch implements the following:

- It sets the cache prep script to exit on error to ensure
  that the task fails if there is an error.

- It splits the upgrade and install command on to different
  lines to ensure that each command's success can be
  determined individually.

- It removes the clearing of the archive metadata introduced
  in https://review.openstack.org/310091 as this also removes
  apt lock files and other things which should not be removed.
  Removing all this is unnecessary with the new cache prep
  process and the 'apt-get clean' execution later clears the
  cache before it is packaged.

- It removes the copy of /etc/apt/sources.list.d/ from the host
  to prevent a situation where a host apt source requires
  additional packages to be installed (for example curl) and
  those packages can't be installed due to the 'apt-get update'
  command failing because the package to update the index is
  missing.

Change-Id: I07a864e4125a7fc076cbf5bf7380a8e34e6d2d7c
2016-06-23 11:43:34 -05:00
defaults Make the LXC cache prep use the host resolver config 2016-05-27 16:21:07 +00:00
doc DOC - Adopting the common role documentation pattern 2016-06-07 11:13:06 -04:00
files Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
handlers Fix generation of LXC hostnames 2016-05-04 14:14:59 -07:00
meta Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
releasenotes Make the LXC cache prep use the host resolver config 2016-05-27 16:21:07 +00:00
tasks Improve LXC cache preparation process 2016-06-23 11:43:34 -05:00
templates Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
tests Make the LXC cache prep use the host package source config 2016-05-18 18:14:17 +01:00
vars Improve LXC cache preparation process 2016-06-23 11:43:34 -05:00
.gitignore Add .swp files to .gitignore 2016-05-04 15:18:34 +01:00
.gitreview New git dotfiles for independant repository 2015-11-25 20:56:11 +00:00
CONTRIBUTING.rst IRR for lxc_host 2015-11-03 04:22:57 -06:00
LICENSE IRR for lxc_host 2015-11-03 04:22:57 -06:00
manual-test.rc Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
other-requirements.txt Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
README.rst DOC - Adopting the common role documentation pattern 2016-06-07 11:13:06 -04:00
run_tests.sh Changed for lxc-host setup/build for multi-distro 2016-05-03 08:49:54 -05:00
setup.cfg Updates for typos 2015-12-09 09:17:00 -06:00
setup.py IRR for lxc_host 2015-11-03 04:22:57 -06:00
test-requirements.txt Pin test-requirements to match OpenStack requirements 2016-06-17 12:33:26 +01:00
tox.ini Make the LXC cache prep use the host package source config 2016-05-18 18:14:17 +01:00

OpenStack-Ansible LXC hosts

Ansible role that configures a host for running LXC containers.

Default Variables

../../defaults/main.yml

Required Variables

None

Example Playbook

- name: Basic lxc host setup
  hosts: "hosts"
  user: root
  roles:
    - { role: "lxc_hosts" }