Ansbile enviroment:
- Two Ubuntu Linux machines (e.g., node-1, node-2 on Azure/AWS)
- SSH access with a user that has sudo privileges
Connect ssh to linux server
ssh -i <path pravite pem file> username@ipaddress
ssh -i C:\Users\admin\Downloads\ansible.pem ubuntu@3.81.212.140
Create Ansible user and allow sudo permissions
sudo adduser ansible
sudo adduser ansible sudo
sudo vi /etc/sudoers.d/ansible
ansible ALL=(ALL) NOPASSWD:ALL
sudo nano /etc/ssh/sshd_config.d/10-password-login-for-special-user.conf
Match User ansible
PasswordAuthentication yes
sudo systemctl restart ssh.service
