From f00824fa8c4514aacb4d0495332568bf243c1fbf Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Sun, 8 Oct 2017 10:41:38 +0100 Subject: [PATCH] tasks: lxc_cache_preparation: Log cache preparation command output We already enable debug output (-x) in the shell script but we never actually see this output during or after the cache preparation step takes place. It's useful to log what exactly happened so we can look for problems or find potential optimization opportunities so just log the output to /var/log which is also being collected by the various CI scripts. Change-Id: I3d0ab31e052889b9ac03de9a3ccba680e840fca5 --- tasks/lxc_cache_preparation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/lxc_cache_preparation.yml b/tasks/lxc_cache_preparation.yml index 35b66bf7..b67dabc0 100644 --- a/tasks/lxc_cache_preparation.yml +++ b/tasks/lxc_cache_preparation.yml @@ -93,7 +93,7 @@ # This task runs several commands against the cached image to speed up the # lxc_container_create playbook. - name: Prepare cached image setup commands - command: "chroot {{ lxc_image_cache_path }} /usr/local/bin/cache-prep-commands.sh" + shell: "chroot {{ lxc_image_cache_path }} /usr/local/bin/cache-prep-commands.sh > /var/log/lxc-cache-prep-commands.log 2>&1" changed_when: false - name: Adjust sshd configuration in container