ansible/roles/kickstarts/files/fedora-post.sh
Kevin Fenzi 76bda7e176 New kickstarts role
Move kickstarts into ansible from the side repo they were in before.
Hopefully this will make it easier for people to contibute to them
and see what they are. All sensitive info here should be templated
out from the private repo.

note that before we merge/run this, we need to move the old repo
out of the way in the location we are syncing to.
We can gradually move other kickstarts out of the old repo into this
role as we need them to build rdu3 out.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-28 21:57:12 +00:00

25 lines
709 B
Bash

#!/bin/bash
# This script gets run on every host after the kickstart runs.
infraurl="https://infrastructure.fedoraproject.org"
# suck down a root ssh key from our central location
mkdir -p /root/.ssh
chmod 700 /root/.ssh
curl -o /root/.ssh/authorized_keys $infraurl/infra/ssh/admin.pub
#
# setup our sshd_config
#
curl -o /etc/ssh/sshd_config $infraurl/infra/ssh/sshd_config.default
restorecon -Rv /etc/ssh
# we don't want /tmp tmpfs
systemctl mask tmp.mount
systemctl start postfix
echo "$HOSTNAME has just been [re]installed" |/bin/mail -s "$HOSTNAME - INSTALLED" -r admin@fedoraproject.org admin@fedoraproject.org
mkdir -p /etc/ansible/facts.d
date +%Y%m%d > /etc/ansible/facts.d/install_date.fact