I am trying to run following cli commands on remote host through ansible; I tried using different combinations but it is not working for me; probably I might be not using correct syntax; please help.
sudo su - user1
ls -l
Command I tired: ansible -i hosts all -m shell -a “ls -l” -b user1