-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart
66 lines (54 loc) · 1.77 KB
/
start
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
/usr/bin/ansible-tower-service start
sleep 5
echo checking tower initial config...
if [ -f /firstboot.flg ]; then
echo this is the first boot of this container.
echo checking ansible certs
if [ ! -f /certs/ansible ]; then
echo no ansible cert found - this must be a fresh deployment.
echo generating cert....
ssh-keygen -f /certs/ansible -t rsa -N ''
fi
echo adding ssh config.
echo "Host node*
HostName %h
IdentityFile /certs/ansible
StrictHostKeyChecking no" >> ~/.ssh/config
echo checking initial config playbook
if [ "$TOWER_INIT_SCM_URL" == "not_set" ]; then
echo No initial config playbook was supplied. Tower will be as default.
else
git clone $TOWER_INIT_SCM_URL /tmp/initial_tower_config
ansible-playbook -i "localhost," -c local /tmp/initial_tower_config/playbook.yml &&\
echo done.
fi
rm /firstboot.flg
fi
if [ -f /userstart ]; then
echo "Running user start script"
source /userstart
fi
tail -f \
/var/log/postgresql/postgresql-9.4-main.log \
/var/log/nginx/access.log \
/var/log/nginx/error.log \
/var/log/tower/tower_rbac_migrations.log \
/var/log/tower/fact_receiver.log \
/var/log/tower/tower_system_tracking_migrations.log \
/var/log/tower/callback_receiver.log \
/var/log/tower/task_system.log \
/var/log/tower/tower.log \
/var/log/memcached.log \
/var/log/supervisor/supervisord.log \
/var/log/supervisor/awx-uwsgi.log \
/var/log/supervisor/awx-daphne.log \
/var/log/supervisor/awx-celeryd.log \
/var/log/supervisor/awx-channels-worker.log \
/var/log/supervisor/awx-celeryd-beat.log \
/var/log/supervisor/awx-fact-cache-receiver.log \
/var/log/supervisor/awx-callback-receiver.log \
/var/log/supervisor/failure-event-handler.stderr.log \
|
awk '/^==> / {a=substr($0, 5, length-8); next}
{print a":"$0}'