forked from ajgargan/awx-util
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_awx.sh
42 lines (31 loc) · 795 Bytes
/
build_awx.sh
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
#~/bin/bash -x
# Create build dir
mkdir -p build
# Clear old repos
rm -rf awx*
# Check out awx
git clone https://github.com/ansible/awx.git
# Check out awx-logos
git clone https://github.com/ansible/awx-logos.git
# Copy projects into build
cp -dpru awx build/
cp -drpu awx-logos build/
cd build/awx
pwd
# if we get given a release checkout that version
if [ "X$1" != "X" ]
then
git checkout $1
# Build official logos (Since we are using an official release)
sed -i "s/^# awx_official=false/awx_official=true/g" installer/inventory
fi
# TODO: make this optional
# Don't use docker_hub images
sed -i "s/^dockerhub/#docker/g" installer/inventory
# run installer
cd installer
ansible-playbook -i inventory install.yml
# Install / awx / build
cd ../../..
# cleanup
rm -rf build