Created
December 2, 2018 17:37
-
-
Save grafuls/2eb98bcef80267616aad303140805bb5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #platform=x86, AMD64, or Intel EM64T | |
| #version=DEVEL | |
| # Keyboard layouts | |
| keyboard 'us' | |
| # Root password | |
| rootpw --iscrypted $1$tvvGFEPf$rRtRXMNAteB4KjEAZ2s4Z/ | |
| # System language | |
| lang en_US | |
| # Reboot after installation | |
| reboot | |
| # System timezone | |
| timezone Europe/Prague | |
| # Use text mode install | |
| text | |
| # Network information | |
| network --bootproto=dhcp --device=$interface | |
| repo --name="EPEL" --baseurl=http://dl.fedoraproject.org/pub/epel/7/x86_64 | |
| repo --name="CENTOS" --baseurl=http://mirror.centos.org/centos/7/os/x86_64 | |
| # Use network installation | |
| url --url="http://mirror.karneval.cz/pub/centos/7/os/x86_64/" | |
| # System authorization information | |
| auth --useshadow --passalgo=sha512 | |
| # Firewall configuration | |
| firewall --disabled | |
| firstboot --disable | |
| # SELinux configuration | |
| selinux --enforcing | |
| # System services | |
| services --enabled="NetworkManager,sshd,chronyd" | |
| # System bootloader configuration | |
| bootloader --location=none | |
| # Partition clearing information | |
| clearpart --all --initlabel | |
| %pre | |
| ip addr | grep -i broadcast | awk '{ print $2 }' > /tmp/interface | |
| sed -i 's/:/\ /g' /tmp/interface | |
| interface=`cat /tmp/interface` | |
| echo "network --bootproto static --device $interface --ip 192.0.2.2 --netmask 255.255.255.0 --gateway 192.0.2.1 --nodns --nameserver=192.0.2.3" >/tmp/network.ks | |
| echo "network --hostname=newserver" >>/tmp/network.ks | |
| %end | |
| %post | |
| exec < /dev/tty3 > /dev/tty3 | |
| chvt 3 | |
| echo | |
| echo "################################" | |
| echo "# Running Post Configuration #" | |
| echo "################################" | |
| # update the system | |
| yum update -y | |
| # install rpm fusion repo | |
| rpm -Uvh \ | |
| http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm \ | |
| http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm | |
| # disable rpmfusion repo, to prevent a yum update contaminating the system with rpmfusion rpms. | |
| sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/rpmfusion-* | |
| # swap to console 1 | |
| chvt 1 | |
| %end | |
| %packages | |
| @core | |
| @ftp-server | |
| @networkmanager-submodules | |
| @python-web | |
| %end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment