5ad3a27798
Currently we don't have logs of what happened in the containers. This commit changes the lxc_container_create default bind mounts to ensure that the /var/log directory from the containers is bind mounted to /var/log/{{ inventory_hostname }} on the host. The tox configuration is also changed to ensure that links are not dereferenced in the log copy, and that the layout of the log storage is the same as that of the integrated gate. Change-Id: I56f5e422313c405d4f65feb8e445d4f4b0700566 Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk> Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
41 lines
1.2 KiB
YAML
41 lines
1.2 KiB
YAML
---
|
|
# Copyright 2015, 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.
|
|
|
|
- name: Playbook for creating containers
|
|
hosts: localhost
|
|
become: true
|
|
gather_facts: true
|
|
|
|
- include: destroy_containers.yml
|
|
when: destroy_first | default(True) | bool
|
|
|
|
- name: Playbook for creating containers
|
|
hosts: all_containers
|
|
serial: 1
|
|
become: True
|
|
gather_facts: False
|
|
roles:
|
|
- role: "lxc_container_create"
|
|
post_tasks:
|
|
- name: Wait for ssh to be available
|
|
local_action:
|
|
module: wait_for
|
|
port: "{{ ansible_port | default('22') }}"
|
|
host: "{{ ansible_host | default(inventory_hostname) }}"
|
|
search_regex: OpenSSH
|
|
delay: 1
|
|
vars_files:
|
|
- test-vars.yml
|