Fix ansible startup script 71/45471/1
authorTimoney, Daniel (dt5972) <dt5972@att.com>
Tue, 1 May 2018 16:42:44 +0000 (12:42 -0400)
committerTimoney, Daniel (dt5972) <dt5972@att.com>
Tue, 1 May 2018 16:42:44 +0000 (12:42 -0400)
Fixed ansible startup script to (1) fix first line to use /bin/bash
and (2) write to both stdout and to /var/log/ansible-server.log
so that docker-compose logs can be used to see messages on
failure

Change-Id: I3895329aa3ca2b805aebb8c00d5876f337fd7944
Issue-ID: SDNC-295
Signed-off-by: Timoney, Daniel (dt5972) <dt5972@att.com>
Former-commit-id: 5af9a1719e7dfd69dd298fa4efeb63b2560554e8

installation/ansible-server/src/main/scripts/startAnsibleServer.sh

index eec62ba..f1e9316 100644 (file)
@@ -1,5 +1,5 @@
-#/bin/bash
-exec &> /var/log/ansible-server.log
+#!/bin/bash
+exec &> >(tee -a "/var/log/ansible-server.log")
 
 if [ ! -f /tmp/.ansible-server-installed ]
 then
@@ -14,4 +14,4 @@ then
 fi
 
 cd /opt/onap/sdnc
-exec python RestServer.py
\ No newline at end of file
+exec /usr/bin/python RestServer.py