
This patch adds version 2 of preseed files pointing to the to the new osbash ssh keys URL while keeping the older version to point to the vagrant keys URL. Change-Id: If0f0b609d5d58d7169eed0e2e84a890c7f3b4970
59 lines
1.5 KiB
INI
59 lines
1.5 KiB
INI
#platform=x86, AMD64, or Intel EM64T
|
|
#version=DEVEL
|
|
# Install OS instead of upgrade
|
|
install
|
|
# Keyboard layouts
|
|
keyboard 'us'
|
|
# Reboot after installation
|
|
reboot --eject
|
|
# Root password
|
|
rootpw --plaintext osbash
|
|
# User
|
|
user --name=osbash --password=osbash --plaintext
|
|
# System timezone
|
|
timezone Etc/UTC --isUtc
|
|
# System language
|
|
lang en_US
|
|
# Firewall configuration
|
|
firewall --disabled
|
|
# System authorization information
|
|
auth --useshadow --passalgo=sha512
|
|
# Use CDROM installation media
|
|
cdrom
|
|
# Use text mode install
|
|
text
|
|
# SELinux configuration
|
|
selinux --permissive
|
|
# Do not configure the X Window System
|
|
skipx
|
|
|
|
# System bootloader configuration
|
|
bootloader --location=mbr
|
|
# Partition clearing information
|
|
clearpart --all
|
|
|
|
part /boot --fstype=ext4 --size=1024
|
|
part pv.0 --grow --size=1
|
|
volgroup ROOTDISK --pesize=4096 pv.0
|
|
logvol swap --name=swap --vgname=ROOTDISK --recommended
|
|
logvol / --fstype=ext4 --name=root --vgname=ROOTDISK --size=1 --grow
|
|
|
|
%pre --interpreter=bash
|
|
%end
|
|
#-------------------------------------------------------------------------------
|
|
# Enable ssh login with insecure osbash key and password-less sudo for osbash
|
|
%post --interpreter=/bin/bash
|
|
DIR=/home/osbash/.ssh
|
|
mkdir $DIR
|
|
wget -O $DIR/authorized_keys https://git.openstack.org/cgit/openstack/training-guides/plain/labs/lib/osbash-ssh-keys/osbash_key.pub
|
|
chmod 700 $DIR
|
|
chmod 400 $DIR/authorized_keys
|
|
chown -R osbash:osbash $DIR
|
|
echo "osbash ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
|
echo "Defaults:osbash !requiretty" >> /etc/sudoers
|
|
%end
|
|
|
|
%packages
|
|
wget
|
|
%end
|