USER=user
sudo usermod -aG wheel $USER
sudo echo "$USER ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$USER
sed -i 's/#PubkeyAuthentication\syes/PubkeyAuthentication yes/' /etc/ssh/sshd_config
sed -i 's/#AuthorizedKeysFile\s.ssh\/authorized_keys/AuthorizedKeysFile .ssh\/authorized_keys/' /etc/ssh/sshd_config
systemctl restart sshd
sudo dnf install -y epel-release
sudo dnf install -y ansible
ssh-keygen -t ed25519 -f ~/.ssh/id_ed25519
ssh-copy-id user@host
sudo tee -a /etc/ansible/hosts << EOF
[<hostgroup1>]
<host1>
[<hostgroup2>]
<host2>
<host3>
EOF
ansible all -m ping