From 6f38cd47546dd96080f6016230f1c3480f76b470 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 5 Mar 2015 14:46:06 -0600 Subject: [PATCH] Create ansible log file and directory This commit adds the ansible log file to the aio bootstrap script and creates a vanilla logging directory that will allow us to collect additional information on what is happening within a given ansible run. Partial-Bug: #1425482 Partial-Bug: #1428744 Change-Id: I2786f73334b99bfa98d344c50337c86f75fae273 --- scripts/bootstrap-aio.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/bootstrap-aio.sh b/scripts/bootstrap-aio.sh index e88d4ed615..b243953167 100755 --- a/scripts/bootstrap-aio.sh +++ b/scripts/bootstrap-aio.sh @@ -42,6 +42,12 @@ mkdir -p /openstack/log # Implement the log directory link for openstack-infra log publishing ln -s /openstack/log $SYMLINK_DIR +# Create ansible logging directory and add in a log file entry into ansible.cfg +if [ -f "playbooks/ansible.cfg" ];then + mkdir -p /openstack/log/ansible-logging + sed -i '/\[defaults\]/a log_path = /openstack/log/ansible-logging/ansible.log' playbooks/ansible.cfg +fi + # Check that the link creation was successful [[ -d $SYMLINK_DIR ]] || exit_fail if ! [ -d $SYMLINK_DIR ] ; then