su -
yum install -y epel-release
yum install -y ansible
yum install -y tree git
ansible-doc -l
ansible-doc -l | wc -l
From Ansible machine's terminal
Once you have logged in as 'ansible' user, you may then switch to root user as shown below
su -
You may now paste the Ansible root user's public key into the /root/.ssh/authorized_keys
As root user, you may edit the file /etc/ssh/sshd_config
Look for PermitRootLogin prohibit-password, replace the prohibit-password with yes as shown below
PermitRootLogin yes
You may now edit /etc/ssh/sshd file and look for pattern "session required pam_loginuid.so" and replace with "session optional pam_loginuid.so"