{% if sysprofile %}
{% for snippet_profile in sysprofile|split(';') %}
# Snippet Profile: {{ snippet_profile }}
{% snippet snippet_profile %}
{% endfor  %}
{% else %}
{% snippet 'install_method' %}

key --skip

{{ mode|default('cmdline') }}
{% if manual is defined %}
ignoredisk --interactive
{% endif %}
{% if manual is undefined %}
# System bootloader configuration
bootloader --location=mbr{% if kernel_options_post %} --append="{{ kernel_options_post }}"{% endif %}

{% snippet 'network' %}
{#
## Firewall configuration
## firewall in kickstart metadata will enable the firewall
## firewall=22:tcp,80:tcp will enable the firewall with ports 22 and 80 open.
## always allow port 12432 so that beah harness will support multihost
#}
firewall
{%- if firewall|default('disabled') == 'disabled' %} --disabled
{%- else %} --enabled --port=12432:tcp{% if firewall is defined %},{{ firewall }}{% endif %}
{% endif %}

# System keyboard
keyboard {{ keyboard|default('us') }}
# System language
lang {{ lang|default('en_US.UTF-8') }}

reboot
{% snippet 'password' %}
# SELinux configuration
selinux {{ selinux|default('--disabled') }}

# Configure the X Window System
{% if skipx is defined %}
skipx
{% else %}
{% if not (distro_tree is arch('s390', 's390x')) %}
xconfig --startxonboot
{% endif %}
{% endif %}

{% snippet 'timezone' %}
# Install OS instead of upgrade
install

{% snippet 'print_anaconda_repos' %}
{% snippet 'rhts_devices' %}
{% snippet 'rhts_partitions' %}
{% snippet 'RedHatStorage2' %}
{% snippet 'system' %}

{% if unsupported_hardware is defined %}
unsupported_hardware
{% endif %}

%packages {{ pkgoptions|default('--ignoremissing') }}
{% if recipe or packages is defined %}
{% snippet 'rhts_packages' %}
{% endif %}
{% snippet 'packages' %}
%end

{% endif %}{# manual #}

{% endif %}{# sysprofile #}

%include {{ distro_tree.url_in_lab(lab_controller, scheme='http', required=True) }}kickstarts/ksappend.cfg

%pre --log=/dev/console
{% snippet 'rhts_pre' %}
{% snippet 'RedHatStorage2_pre' %}
{% snippet 'system_pre' %}
%end

%post --log=/dev/console
{% snippet 'rhts_post' %}
{% snippet 'RedHatStorage2_post' %}
{% snippet 'system_post' %}
%end

{{ ks_appends|join('\n') }}
{% snippet 'postinstall_done' %}
{% snippet 'post_s390_reboot' %}
{% snippet 'postreboot' %}
