From 6bf159ff07da57ad3428d5d33221d3fc101d6aa3 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Wed, 20 Jul 2016 11:37:37 +0100 Subject: [PATCH] Move LXC logs to /openstack/log In order to ensure that we collect LXC container actions for OpenStack-CI diagnostic purposes, and to collect the important logs in the right place, this patch moves the LXC log folder to /openstack/log which is where all other logs are gathered. Change-Id: I9455aa6cd17e12a5e90658e0cbdcdfc22552a5b0 --- playbooks/lxc-hosts-setup.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/playbooks/lxc-hosts-setup.yml b/playbooks/lxc-hosts-setup.yml index 085ebc47b5..e7706d4afe 100644 --- a/playbooks/lxc-hosts-setup.yml +++ b/playbooks/lxc-hosts-setup.yml @@ -18,6 +18,17 @@ gather_facts: "{{ gather_facts | default(True) }}" max_fail_percentage: 20 user: root + pre_tasks: + - name: Create log dir + file: + path: "/openstack/log/{{ inventory_hostname }}-lxc" + state: directory + - name: Create log aggregation links + file: + src: "/openstack/log/{{ inventory_hostname }}-lxc" + dest: "/var/log/lxc" + state: "link" + force: "yes" roles: - { role: "lxc_hosts", tags: [ "lxc-host", "host-setup" ] } - role: "rsyslog_client"