-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbootstrap.sh
executable file
·23 lines (17 loc) · 995 Bytes
/
bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash -xeu
# RedHat Prep
if grep "Red Hat Enterprise Linux Server" /etc/system-release; then
## Get current repo configurations for optional and extras
eval $(cat enabled_repos.txt | awk '/rhel-7-server-optional/{o=1}; o && /Enabled:/ { opts_enabled=$2; o=0}; /rhel-7-server-extras/{e=1}; e && /Enabled:/ {extras_enabled=$2;e=0}; END { print "extras=" extras_enabled; print "optional=" opts_enabled }')
if [[ $optional -ne 1 ]]; then
subscription-manager repos --enable=rhel-7-server-optional-rpms
fi
if [[ $extras -ne 1 ]]; then
subscription-manager repos --enable=rhel-7-server-extras-rpms
fi
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
else
yum -y install epel-release
fi
yum -y install python-pip python-jinja2 python-simplejson genisoimage pykickstart createrepo rsync isomd5sum syslinux pigz mock fuseiso libguestfs-tools-c initial-setup-gui firstboot tree grub2-efi-modules ansible rpm-sign
pip install pythonpy