X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=installation%2Fansible-server%2Fsrc%2Fmain%2Fscripts%2FstartAnsibleServer.sh;h=c35f7864ed9f0585a49b002bef0fe04278a5c9a4;hb=refs%2Fheads%2Fbeijing;hp=643bbab25392a46dad15302c3f5dc435ef4bcafa;hpb=ab93e4f6de3d0cc8abb707f98fc11b376a70e6fe;p=sdnc%2Foam.git diff --git a/installation/ansible-server/src/main/scripts/startAnsibleServer.sh b/installation/ansible-server/src/main/scripts/startAnsibleServer.sh index 643bbab2..c35f7864 100644 --- a/installation/ansible-server/src/main/scripts/startAnsibleServer.sh +++ b/installation/ansible-server/src/main/scripts/startAnsibleServer.sh @@ -1,16 +1,20 @@ -#/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 + 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 + + cp /etc/ansible/ansible.cfg /etc/ansible/ansible.cfg.orig + cat /etc/ansible/ansible.cfg.orig | sed -e 's/#host_key_checking/host_key_checking/' > /etc/ansible/ansible.cfg + 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