Hosts file
[ansible_clients]
#192.168.52.121 ansible_ssh_pass=redhat ansible_ssh_user=root
202.181.14.35 ansible_ssh_pass=ansible ansible_ssh_user=ansible
ansible.cfg location is /etc/ansible/ansible.cfg
202.181.14.35
[all:vars]
ansilble_ssh_pass=ansible
ansible_become_pass=ansible
[defaults]
inventory = hosts
stdout_callback = debug
#ansible_python_interpreter="/bin/python3.8"
ansible_python_interpreter: /usr/bin/python3.8
Verify config
ansible all -u ansible -m ping user
base ssh access
user gets access with root privilege
Note; make sure and test manually