Project

General

Profile

Download (3.43 KB) Statistics
| Branch: | Tag: | Revision:
0fa5d146 Dominic Cleal
<%#
kind: provision
name: Community Preseed
oses:
- Debian 6.0
- Debian 7.0
- Ubuntu 10.04
- Ubuntu 12.04
- Ubuntu 13.04
%>
ae2998af Jochen Schalanda
# Locale, country and keyboard settings
93bd0d5d Ohad Levy
d-i debian-installer/locale string en_US
ae2998af Jochen Schalanda
d-i console-setup/ask_detect boolean false
d-i console-setup/modelcode string pc105
d-i console-setup/variant USA
d-i console-setup/layout USA
d-i console-setup/layoutcode string us

c021e19a Lukas Zapletal
<% if @host.operatingsystem.name == "Debian" && @host.operatingsystem.major.to_i >= 7 -%>
cb92c0be Dmitri Dolguikh
d-i keymap select us
<% end -%>

ae2998af Jochen Schalanda
# Network configuration
93bd0d5d Ohad Levy
d-i netcfg/choose_interface select auto
ec80ab80 Ohad Levy
d-i netcfg/get_hostname string <%= @host %>
d-i netcfg/get_domain string <%= @host.domain %>
ae2998af Jochen Schalanda
d-i netcfg/wireless_wep string

d-i hw-detect/load_firmware boolean true

# Mirror settings
d-i mirror/country string manual
5f75dccc Paul Kelly
d-i mirror/http/hostname string <%= @preseed_server %>
ae2998af Jochen Schalanda
d-i mirror/http/directory string <%= @preseed_path %>
93bd0d5d Ohad Levy
d-i mirror/http/proxy string
ae2998af Jochen Schalanda
d-i mirror/codename string <%= @host.operatingsystem.release_name %>
d-i mirror/suite string <%= @host.operatingsystem.release_name %>
d-i mirror/udeb/suite string <%= @host.operatingsystem.release_name %>

# Time settings
d-i clock-setup/utc boolean true
c021e19a Lukas Zapletal
<% if @host.params['time-zone'] -%>
d-i time/zone string <%= @host.params['time-zone'] %>
<% else -%>
ae2998af Jochen Schalanda
d-i time/zone string UTC
c021e19a Lukas Zapletal
<% end -%>
ae2998af Jochen Schalanda
# NTP
d-i clock-setup/ntp boolean true

# Set alignment for automatic partitioning
# Choices: cylinder, minimal, optimal
#d-i partman/alignment select cylinder
f76a77e7 Ohad Levy
<%= @host.diskLayout %>

ae2998af Jochen Schalanda
# Install different kernel
#d-i base-installer/kernel/image string linux-server
93bd0d5d Ohad Levy
ae2998af Jochen Schalanda
# User settings
f76a77e7 Ohad Levy
d-i passwd/root-password-crypted password <%= root_pass %>
user-setup-udeb passwd/root-login boolean true
d-i passwd passwd/make-user boolean false
user-setup-udeb passwd/make-user boolean false

cb92c0be Dmitri Dolguikh
<% if @host.params['enable-puppetlabs-repo'] && @host.params['enable-puppetlabs-repo'] == 'true' -%>
c021e19a Lukas Zapletal
# Puppetlabs products
d-i apt-setup/local0/repository string \
http://apt.puppetlabs.com <%= @host.operatingsystem.release_name %> main
d-i apt-setup/local0/comment string Puppetlabs products
d-i apt-setup/local0/source boolean true
d-i apt-setup/local0/key string http://apt.puppetlabs.com/pubkey.gpg
# Puppetlabs dependencies
cb92c0be Dmitri Dolguikh
d-i apt-setup/local1/repository string \
c021e19a Lukas Zapletal
http://apt.puppetlabs.com <%= @host.operatingsystem.release_name %> dependencies
d-i apt-setup/local1/comment string Puppetlabs dependencies
d-i apt-setup/local1/source boolean true
d-i apt-setup/local1/key string http://apt.puppetlabs.com/pubkey.gpg
cb92c0be Dmitri Dolguikh
<% end -%>

ae2998af Jochen Schalanda
# Install minimal task set (see tasksel --task-packages minimal)
tasksel tasksel/first multiselect minimal

cb92c0be Dmitri Dolguikh
<% if @host.operatingsystem.name == "Ubuntu" and @host.operatingsystem.major.to_i == 10 -%>
<% puppet_package = "puppet/lucid-backports" -%>
d-i apt-setup/backports boolean true
<% else -%>
<% puppet_package = "puppet" -%>
<% end -%>

ae2998af Jochen Schalanda
# Install some base packages
cb92c0be Dmitri Dolguikh
d-i pkgsel/include string <%= puppet_package %> lsb-release openssh-server
ae2998af Jochen Schalanda
d-i pkgsel/update-policy select unattended-upgrades

popularity-contest popularity-contest/participate boolean false

# Boot loader settings
#grub-pc grub-pc/hidden_timeout boolean false
#grub-pc grub-pc/timeout string 10
93bd0d5d Ohad Levy
d-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
ae2998af Jochen Schalanda
93bd0d5d Ohad Levy
d-i finish-install/reboot_in_progress note

d4d1dc8c Ohad Levy
d-i preseed/late_command string wget <%= foreman_url("finish") %> -O /target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh && in-target /tmp/finish.sh