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

{{ mode|default('text') }}
{% if manual is defined %}
{%- if has_ignoredisk_interactive %}ignoredisk --interactive{% endif %}

{% endif %}
{% if manual is undefined %}
{% if auth %}
auth {{ auth }}
{% endif %}
# System bootloader configuration
bootloader --location={{ boot_loc|default("mbr") }}{% if kernel_options_post %} --append="{{ kernel_options_post }}"{% endif %}{% if distro_tree is arch('ppc', 'ppc64', 'ppc64le') and has_leavebootorder is defined %} --leavebootorder{% endif %}{% if bootloader_type %} --{{ bootloader_type }}{% endif %}

{% snippet 'network' %}

{% if distro.osversion.osmajor.name == 'Fedora' %}
{% if no_updates_repos is undefined and distro.osversion.osmajor.number != 'rawhide' %}
repo --name=fedora-updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f{{ distro.osversion.osmajor.number }}&arch={{ distro_tree.arch.arch }}
{% endif %}
{% endif %}
{% if has_rpmostree is undefined and liveimg is undefined %}
{% snippet 'print_anaconda_repos' %}
{% endif %}

{#
## 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 %}

# Run the Setup Agent on first boot
firstboot {{ firstboot|default('--disable') }}
# System keyboard
keyboard {{ keyboard|default('us') }}
# System language
lang {{ lang|default('en_US.UTF-8') }}

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

{% if skipx is defined %}
# Do not configure the X Window System
skipx
{% endif %}

{% snippet 'timezone' %}

{% snippet 'rhts_devices' %}
{% snippet 'rhts_partitions' %}
{% snippet distro.osversion.osmajor.osmajor %}
{% snippet distro.osversion.osmajor.name %}
{% snippet 'system' %}
{% if unsupported_hardware is defined and has_unsupported_hardware is defined %}
unsupported_hardware
{% endif %}

{% if has_rpmostree is defined %}
ostreesetup --osname=atomic-host --remote=atomic-host --url={{ ostree_repo_url }} --ref={{ ostree_ref }} --nogpg
{% elif liveimg is defined %}
liveimg --url=file:///tmp/squashfs
{% else %}
%packages {{ pkgoptions|default('--ignoremissing') }}
{%- if not recipe and packages is undefined %} --default
{% else %}

{% snippet 'rhts_packages' %}
{% endif %}
{% snippet 'packages' %}
{% if no_clock_sync is undefined and has_chrony is defined %}
chrony
{% endif %}
%end
{% endif %}

{% endif %}{# manual #}

{% endif %}{# sysprofile #}

%pre --log=/dev/console
{% snippet 'rhts_pre' %}
{% snippet (distro.osversion.osmajor.osmajor + '_pre') %}
{% snippet (distro.osversion.osmajor.name + '_pre') %}
{% snippet 'system_pre' %}
{% snippet 'liveimg_pre' %}
%end

%post --log=/dev/console
{% snippet 'rhts_post' %}
{% snippet (distro.osversion.osmajor.osmajor + '_post') %}
{% snippet (distro.osversion.osmajor.name + '_post') %}
{% snippet 'system_post' %}
%end

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