<commit_before># basics
text
skipx
cmdline
install
reboot
firstboot --disable
url --url="{{ location }}"

# localization
lang en_GB
keyboard fi
timezone --utc Europe/Helsinki

# repos
{% if repos is defined %}
{% for repo in repos %}
repo --name="{{ repo.name }}" --baseurl="{{ repo.url }}"
{% endfor %}
{% endif %}

{% if networks is defined %}
{% for network in networks %}
{{ network }}
{% endfor %}
{% endif %}

# firewall
firewall --enabled --service=ssh

{% if firewall_rules is defined %}
{% for firewall_rule in firewall_rules %}
{{ firewall_rule }}
{% endfor %}
{% endif %}

# authentication
rootpw --iscrypt {{ rootpwhash }}
authconfig --useshadow --passalgo=sha512 --kickstart
selinux --disabled

# disks
bootloader --location=mbr --append="selinux=0 nomodeset"
zerombr
clearpart --all --initlabel
part / --fstype="ext4" --grow --size=4000 --ondrive=vda
part swap --asprimary --size=1024 --ondrive=vda

%packages --nobase
@core
@server-policy
vim-enhanced
openssh-clients
%end

################################################################################

%post --log=/root/post-ks-log
/usr/bin/yum clean all
/usr/bin/yum update -y --skip-broken
echo "{{ internal_ip }} {{ fqdn }}" >> /etc/hosts

{% if root_keys is defined %}
{% for root_key in root_keys %} 
mkdir /root/.ssh && chmod 600 /root/.ssh
echo "{{ root_key }}" >> /root/.ssh/authorized_keys
chmod 400 /root/.ssh/authorized_keys
{% endfor %}
{% endif %}

{% if routes is defined %}
{% for route in routes %} <commit_msg>Closes #41<commit_after># basics
text
skipx
cmdline
install
reboot
firstboot --disable
url --url="{{ location }}"

# localization
lang en_GB
keyboard fi
timezone --utc Europe/Helsinki

# repos
{% if repos is defined %}
{% for repo in repos %}
repo --name="{{ repo.name }}" --baseurl="{{ repo.url }}"
{% endfor %}
{% endif %}

{% if networks is defined %}
{% for network in networks %}
{{ network }}
{% endfor %}
{% endif %}

# firewall
firewall --enabled --service=ssh

{% if firewall_rules is defined %}
{% for firewall_rule in firewall_rules %}
{{ firewall_rule }}
{% endfor %}
{% endif %}

# authentication
rootpw --iscrypt {{ rootpwhash }}
authconfig --useshadow --passalgo=sha512 --kickstart
selinux --disabled

# disks
bootloader --location=mbr --append="selinux=0 nomodeset"
zerombr
clearpart --all --initlabel
part / --fstype="ext4" --grow --size=4000 --ondrive=vda
part swap --asprimary --size=1024 --ondrive=vda

%packages --nobase
@core
@server-policy
vim-enhanced
openssh-clients
rsync
%end

################################################################################

%post --log=/root/post-ks-log
/usr/bin/yum clean all
/usr/bin/yum update -y --skip-broken
echo "{{ internal_ip }} {{ fqdn }}" >> /etc/hosts

{% if root_keys is defined %}
{% for root_key in root_keys %} 
mkdir /root/.ssh && chmod 600 /root/.ssh
echo "{{ root_key }}" >> /root/.ssh/authorized_keys
chmod 400 /root/.ssh/authorized_keys
{% endfor %}
{% endif %}

{% if routes is defined %}
{% for route in routes %} 
{'fraction_non_alphanumeric': 0.21602671118530886, 'fraction_numerical': 0.01335559265442404, 'mean_word_length': 3.9520661157024795, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3301885', 'n_tokens_mistral': 1125, 'n_tokens_neox': 959, 'n_words': 282}