-
Notifications
You must be signed in to change notification settings - Fork 0
/
fedora.ks
37 lines (31 loc) · 1.13 KB
/
fedora.ks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
selinux --enforcing
firewall --enabled --service=mdns
services --enabled=sshd,NetworkManager,chronyd
network --bootproto=dhcp --device=link --activate --hostname=${hostname}
rootpw --plaintext vagrant
zerombr
bootloader --location=mbr
firstboot --disable
autopart
user --name=vagrant --groups=wheel --password=vagrant --plaintext
sshkey --username=vagrant "${trimspace(file("${path.root}/keys/vagrant.pub"))}"
reboot
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
%packages
@core
@standard
@hardware-support
@base-x
@gnome-desktop
@guest-desktop-agents
%end
%post
systemctl set-default graphical.target
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
echo "vagrant ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/vagrant
chmod 0440 /etc/sudoers.d/vagrant
sed -i -e "s/.*PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config
sed -i -e "s/.*PasswordAuthentication.*/PasswordAuthentication yes/g" /etc/ssh/sshd_config
dnf clean all -y
%end