diff --git a/definitions/.fedora/cleanup.sh b/definitions/.fedora/cleanup.sh new file mode 100644 index 000000000..c515ffa94 --- /dev/null +++ b/definitions/.fedora/cleanup.sh @@ -0,0 +1,5 @@ +#!/bin/bash -eux +yum -y erase gtk2 libX11 hicolor-icon-theme freetype +yum -y clean all +rm -rf VBoxGuestAdditions_*.iso VBoxGuestAdditions_*.iso.? +rm -f /tmp/chef*rpm diff --git a/definitions/.fedora/ks.cfg b/definitions/.fedora/ks.cfg new file mode 100644 index 000000000..0decd94df --- /dev/null +++ b/definitions/.fedora/ks.cfg @@ -0,0 +1,45 @@ +install +cdrom +lang en_US.UTF-8 +keyboard us +network --bootproto=dhcp +rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/ +firewall --disabled +authconfig --enableshadow --passalgo=sha512 +selinux --disabled +timezone UTC +bootloader --location=mbr +text +skipx +zerombr +clearpart --all --initlabel +autopart +auth --useshadow --enablemd5 +firstboot --disabled +reboot + +%packages +@Core +bzip2 +gcc +kernel-devel +kernel-headers +openssl-devel +readline-devel +tar +wget +zlib-devel +%end + +%post +# update root certs +wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem +# vagrant +groupadd vagrant +useradd vagrant -g vagrant -G wheel -u 900 +echo "vagrant" | passwd --stdin vagrant +# sudo +echo 'Defaults:vagrant !requiretty' > /etc/sudoers.d/vagrant +echo '%vagrant ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers.d/vagrant +chmod 440 /etc/sudoers.d/vagrant +%end diff --git a/definitions/.fedora/session.rb b/definitions/.fedora/session.rb new file mode 100644 index 000000000..7a4d0dd4a --- /dev/null +++ b/definitions/.fedora/session.rb @@ -0,0 +1,13 @@ +require File.dirname(__FILE__) + "/../.common/session.rb" + +FEDORA_SESSION = + COMMON_SESSION.merge({ :boot_cmd_sequence => + [ ' text ks=http://%IP%:%PORT%/ks.cfg' ], + :kickstart_file => "ks.cfg", + :os_type_id => 'Fedora_64', + :memory_size=> "512", + :postinstall_files => [ "chef-client.sh", + "vagrant.sh", + "cleanup.sh", + "minimize.sh" ], + :shutdown_cmd => "/sbin/halt -h -p" }) diff --git a/definitions/fedora-18/chef-client.sh b/definitions/fedora-18/chef-client.sh new file mode 120000 index 000000000..635081810 --- /dev/null +++ b/definitions/fedora-18/chef-client.sh @@ -0,0 +1 @@ +../.common/chef-client.sh \ No newline at end of file diff --git a/definitions/fedora-18/cleanup.sh b/definitions/fedora-18/cleanup.sh new file mode 120000 index 000000000..1cf83b27e --- /dev/null +++ b/definitions/fedora-18/cleanup.sh @@ -0,0 +1 @@ +../.fedora/cleanup.sh \ No newline at end of file diff --git a/definitions/fedora-18/definition.rb b/definitions/fedora-18/definition.rb new file mode 100644 index 000000000..cb2d82dde --- /dev/null +++ b/definitions/fedora-18/definition.rb @@ -0,0 +1,11 @@ +require File.dirname(__FILE__) + "/../.fedora/session.rb" + +iso = "Fedora-18-x86_64-DVD.iso" + +session = + FEDORA_SESSION.merge( :iso_file => iso, + :iso_md5 => "17d5c860bf9dc83e035882a7b33ffc77", + :iso_src => "http://mirrors.kernel.org/fedora/releases/18/Fedora/x86_64/iso/#{iso}" +) + +Veewee::Session.declare session diff --git a/definitions/fedora-18/ks.cfg b/definitions/fedora-18/ks.cfg new file mode 120000 index 000000000..15c8071a4 --- /dev/null +++ b/definitions/fedora-18/ks.cfg @@ -0,0 +1 @@ +../.fedora/ks.cfg \ No newline at end of file diff --git a/definitions/fedora-18/minimize.sh b/definitions/fedora-18/minimize.sh new file mode 120000 index 000000000..b3632ccbc --- /dev/null +++ b/definitions/fedora-18/minimize.sh @@ -0,0 +1 @@ +../.common/minimize.sh \ No newline at end of file diff --git a/definitions/fedora-18/vagrant.sh b/definitions/fedora-18/vagrant.sh new file mode 120000 index 000000000..702949639 --- /dev/null +++ b/definitions/fedora-18/vagrant.sh @@ -0,0 +1 @@ +../.common/vagrant.sh \ No newline at end of file