I have installed ansible, configured my shh and the hosts in /etc/ansible/hosts file. I tried executing this playybook
# Checks the hosts provisioned by midrange
---
- name: Test su connecting as current user
hosts: all
gather_facts: no
tasks:
- name: "sudo to configued user -- tstuser01"
#action: ping
command: /usr/bin/whoami
it threw me the following error:
Internal Error: this module does not support running commands via 'sudo'