invoke ansible script from Bamboo

How to invoke ansible script from bamboo ? I have a Bamboo server and Ansible server separately. Do I need to have a Bamboo agent on my Ansible server ?
I’m doing the below, but not sure if this is the right way ?

su --session-command=“ssh -i /home/devops/privatekey.pem user@hostname”
ansible-playbook callDiscoveryserver1.yml -u devops --sudo --vault-password-file=vault.txt --extra-vars “version=release/1.0.1.0_18”

I just found the answer myself. All you have to do is use an ‘SSH Task’ to invoke your ansible playbooks !