Fix ansible startup script
[sdnc/oam.git] / installation / ansible-server / src / main / scripts / startAnsibleServer.sh
1 #!/bin/bash
2 exec &> >(tee -a "/var/log/ansible-server.log")
3
4 if [ ! -f /tmp/.ansible-server-installed ]
5 then
6         pip install PyMySQL
7         pip install cherrypy
8         pip install requests
9
10     apt-get -y install software-properties-common
11     apt-add-repository -y ppa:ansible/ansible
12     apt-get -y install ansible
13         date > /tmp/.ansible-server-installed 2>&1
14 fi
15
16 cd /opt/onap/sdnc
17 exec /usr/bin/python RestServer.py