How to use sudo su - in ansible 1.9.4

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

read 2nd note http://docs.ansible.com/ansible/become.html, you can use
one or the other, but not both

Hi Rahul,

See this example, this will execute the command as a sudo user ‘vikas027’

`

  • name: A sudo task
    command: whoami
    become: yes
    become_user: vikas027
    `

Regards,
Vikas