# invoke ansible script from Bamboo

**URL:** <https://forum.ansible.com/t/invoke-ansible-script-from-bamboo/25585>\
**Category:** Ansible Project\
**Created:** [September 25, 2017, 1:53am UTC](https://forum.ansible.com/t/invoke-ansible-script-from-bamboo/25585 "2017-09-25T01:53:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Byym\_Reddy](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@Byym\_Reddy](https://forum.ansible.com/u/Byym_Reddy)\
**Post date:** [September 25, 2017, 1:53am UTC](https://forum.ansible.com/t/invoke-ansible-script-from-bamboo/25585/1 "2017-09-25T01:53:41Z")

</div>

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”

---

<div class="post-metadata">

**Author:** ![Byym\_Reddy](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@Byym\_Reddy](https://forum.ansible.com/u/Byym_Reddy)\
**Post date:** [September 25, 2017, 5:20am UTC](https://forum.ansible.com/t/invoke-ansible-script-from-bamboo/25585/2 "2017-09-25T05:20:08Z")

</div>

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