Created
January 7, 2016 16:20
-
-
Save danzilio/82995742eb714705d854 to your computer and use it in GitHub Desktop.
First stab at converting your kickstart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define community_kickstarts::centos ( | |
$rootpw = '--plaintext changeme', | |
$url = 'http://mirror.centos.org/centos/7/os/x86_64', | |
$architecture = 'x86_64', | |
$lang = 'en_US.UTF-8', | |
$keyboard = 'us', | |
$network = '--onboot yes --device eth0 --bootproto dhcp --hostname kickstarted.example.com', | |
$firewall = '--service=ssh', | |
$authconfig = '--enableshadow --passalgo=sha512', | |
$selinux = '--enforcing', | |
$timezone = '--utc Etc/UTC', | |
$bootloader = '--location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"', | |
$post_log = '/root/ks-post.log', | |
$post_fragments = ['community_kickstarts/install_puppet.erb'], | |
$puppet_repo = 'https://yum.puppetlabs.com/el/7/products/x86_64/puppetlabs-release-7-11.noarch.rpm', | |
$repos = {}, | |
$partition_configuration = {}, | |
$additional_packages = [], | |
$post_fragments = [], | |
$additional_commands = {}, | |
$required_packages = [ | |
'@core', | |
'@server-policy', | |
'ntpdate', | |
'ntp', | |
'wget', | |
'screen', | |
'git', | |
'perl', | |
'openssh-clients', | |
'man', | |
'system-config-network-tui', | |
'mlocate', | |
'bind-utils', | |
'traceroute', | |
'mailx', | |
], | |
) { | |
$autopart = empty($partition_configuration) | |
$base_repo = { base => { baseurl => $url } } | |
$commands = { | |
install => true, | |
url => $url, | |
lang => $lang, | |
keyboard => $keyboard, | |
cmdline => true, | |
network => $network, | |
rootpw => $rootpw, | |
firewall => $firewall, | |
authconfig => $authconfig, | |
selinux => $selinux, | |
timezone => $timezone, | |
autopart => $autopart, | |
bootloader => $bootloader, | |
reboot => true, | |
} | |
$fragments = { | |
"post --log ${post_log}" => $post_fragments | |
} | |
::kickstart { $name: | |
packages => unique(concat($additional_packages, $required_packages)), | |
commands => merge($commands, $additional_commands), | |
partition_configuration => $partition_configuration, | |
repos => merge($base_repo, $repos), | |
fragments => $fragments, | |
} | |
} |
rnelson0
commented
Jan 7, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment