I will be building my Ansible instance on Debian 12.
apt install ansible -y
Create a new ansible user that will be used to run Ansible related tasks.
useradd -ms /usr/bin/bash service_ansible
Create a new directory to house your now Ansible project (inventory, playbooks, etc)
mkdir /opt/ansible/
Create a directory to store the new SSH keys
sudo -u service_ansible mkdir -p /home/service_ansible/.ssh/keys
Generate SSH keys to be used when Ansible connects to a Managed Node (with no passphrase)
cd /home/service_ansible/.ssh/keys/ && \
sudo -u service_ansible ssh-keygen -t rsa -b 8192 -f ansible