Hi all,
Ansible version:
ansible 2.8.0
config file = /ansible/ansible.cfg
configured module search path = ['/.ansible/plugins/modules’, ‘/usr/share/ansible/plugins/modules’]
ansible python module location = */.virtualenvs/redfish/lib/python3.6/site-packages/ansible
executable location = */.virtualenvs/redfish/bin/ansible
python version = 3.6.9 (default, Oct 29 2019, 10:39:36) [GCC]
I have created few vm’s using ansible. I have to run few commands on those vm’s, as a different user. I am not able to switch to that user using any method. I think it might be some config issue, which I am missing.
Target OS: Rhel 7.6
My task inside my playbook is as follows: