diff options
author | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-09-12 10:53:10 -0400 |
---|---|---|
committer | Timoney, Dan (dt5972) <dt5972@att.com> | 2018-09-12 10:53:10 -0400 |
commit | 12622054e9b501d4e7df9302cbfcd0b5968e3b59 (patch) | |
tree | bd623f2ee6792af96959b8be1114393663c47c3a /ansible-server/src/main/scripts/startAnsibleServer.sh | |
parent | be3e583d1b519b31286a573f6ff3b49e03153997 (diff) |
Add ansible-server to ccsdk
Add ansible-server to CCSDK (copied from sdnc)
Change-Id: I1a351ada1b31cb6623ec2ef850a9d85f856ba41c
Issue-ID: CCSDK-554
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Diffstat (limited to 'ansible-server/src/main/scripts/startAnsibleServer.sh')
-rw-r--r-- | ansible-server/src/main/scripts/startAnsibleServer.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ansible-server/src/main/scripts/startAnsibleServer.sh b/ansible-server/src/main/scripts/startAnsibleServer.sh new file mode 100644 index 00000000..dd6f2a36 --- /dev/null +++ b/ansible-server/src/main/scripts/startAnsibleServer.sh @@ -0,0 +1,20 @@ +#!/bin/bash +exec &> >(tee -a "/var/log/ansible-server.log") + +if [ ! -f /tmp/.ansible-server-installed ] +then + pip install PyMySQL + pip install 'cherrypy<18.0.0' + pip install requests + + apt-get -y install software-properties-common + apt-add-repository -y ppa:ansible/ansible + apt-get -y install ansible + + 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/ccsdk +exec /usr/bin/python RestServer.py |