On Amazon Linux
sudo yum update -y
sudo yum install ansible
On Amazon Linux 2
sudo yum update -y
sudo amazon-linux-extras install ansible2
Check the ansible
ansible --version
Configure 'sshd_config'
sudo vi /etc/ssh/sshd_config
PasswordAuthentication yes
Restart the 'sshd' service
sudo service sshd restart
OR
sudo systemctl restart sshd
Create a user for ansible
sudo useradd ansadmin
sudo passwd ansadmin
Add to sudo with NOPASSWD
sudo visudo
#add follwoing line
ansadmin ALL=(ALL) NOPASSWD: ALL