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 -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c8bd55d3-ab1a-42c6-9646-99d539821a12%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
