From e866286a4411138c49e329b7e71f67d9b187edba Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Fri, 10 Mar 2017 18:37:04 +0100 Subject: 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. --- http/centos-7.3/anaconda-ks.cfg | 37 ++++++++++++++++++++++++++++++ http/ubuntu-16.04/preseed.cfg | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 http/centos-7.3/anaconda-ks.cfg create mode 100644 http/ubuntu-16.04/preseed.cfg (limited to 'http') 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 < /usr/lib/post-base-installer.d/90skip-tasksel && \ + chmod +x /usr/lib/post-base-installer.d/90skip-tasksel + +d-i preseed/late_command string sed -i 's,^PermitRootLogin.*,PermitRootLogin yes,' /target/etc/ssh/sshd_config -- cgit v1.2.3-55-g7522