Install AAF certificates in SDNC
[sdnc/oam.git] / installation / ansible-server / src / main / scripts / startAnsibleServer.sh
index 67af962..f1e9316 100644 (file)
@@ -1,12 +1,17 @@
-#/bin/bash
+#!/bin/bash
+exec &> >(tee -a "/var/log/ansible-server.log")
 
-if [ ! -d /tmp/.ansible-server-installed]
+if [ ! -f /tmp/.ansible-server-installed ]
 then
        pip install PyMySQL
        pip install cherrypy
        pip install requests
+
+    apt-get -y install software-properties-common
+    apt-add-repository -y ppa:ansible/ansible
+    apt-get -y install ansible
        date > /tmp/.ansible-server-installed 2>&1
 fi
 
 cd /opt/onap/sdnc
-exec python RestServer.py > RestServer.out
\ No newline at end of file
+exec /usr/bin/python RestServer.py