summaryrefslogtreecommitdiffstats
path: root/http/centos-7.3/anaconda-ks.cfg
diff options
context:
space:
mode:
authorJonathan Bauer2017-03-10 18:37:04 +0100
committerJonathan Bauer2017-03-10 18:37:04 +0100
commite866286a4411138c49e329b7e71f67d9b187edba (patch)
treedb7fefef0b82ca5577641a18935d6f3937fe02f6 /http/centos-7.3/anaconda-ks.cfg
parentinitial commit (diff)
downloadpacker-templates-e866286a4411138c49e329b7e71f67d9b187edba.tar.gz
packer-templates-e866286a4411138c49e329b7e71f67d9b187edba.tar.xz
packer-templates-e866286a4411138c49e329b7e71f67d9b187edba.zip
Templates for Centos 7.3 and Ubuntu 16.04
These were tested with qemu (2.8.0), virtualbox (5.1.16) and vmplayer (12.5.2-4638234). Using the qemu builder is preferable as it creates a qcow2 file directly. The unattended install is configured to install the necessary packages for ansible which will be needed to provision the VM. The rest is still pretty minimal.
Diffstat (limited to 'http/centos-7.3/anaconda-ks.cfg')
-rw-r--r--http/centos-7.3/anaconda-ks.cfg37
1 files changed, 37 insertions, 0 deletions
diff --git a/http/centos-7.3/anaconda-ks.cfg b/http/centos-7.3/anaconda-ks.cfg
new file mode 100644
index 0000000..8cb0be2
--- /dev/null
+++ b/http/centos-7.3/anaconda-ks.cfg
@@ -0,0 +1,37 @@
+install
+text
+reboot
+url --mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
+lang en_US.UTF-8
+keyboard --vckeymap=de-nodeadkeys --xlayouts='de (nodeadkeys)'
+timezone Europe/Berlin --isUtc --nontp
+auth --enableshadow --passalgo=sha512
+rootpw --iscrypted $6$6yzbOJJy5auuBh9$XUAtAt/ErLkz6.1t8J4UpyZPPUbKjGO1uATaZaxmG02IhJbOwnJMqI6MTJw.SzbBvy8THCmmoia1tVMfXhGVJ1
+clearpart --none --initlabel
+bootloader --location=mbr --boot-drive=sda
+part biosboot --fstype="biosboot" --ondisk=sda --size=1
+part / --fstype="ext4" --ondisk=sda --grow --label=SLX_SYS
+
+%packages
+@^minimal
+@core
+kexec-tools
+%end
+
+%post --erroronfail
+yum -y update
+yum -y install wget
+wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+rpm -ivh epel-release-latest-7.noarch.rpm
+yum -y install ansible
+# allow root login for ansible
+sed 's,^[[:blank:]]*#*PermitRootLogin.*,PermitRootLogin yes,g' /etc/ssh/sshd_config
+
+ln -s /dev/null /etc/udev/rules.d/80-net-name-slot.rules
+cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF
+DEVICE="eth0"
+BOOTPROTO="dhcp"
+ONBOOT="yes"
+TYPE="Ethernet"
+EOF
+%end