How to run ansible playbook with Bamboo or jenkins
1,050 views
Skip to first unread message
mondher khas
unread,
Apr 12, 2016, 10:49:35 AM4/12/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
I want to execute an ansible playbook using Bamboo or jenkins. However the build failed because i can't pass the ssh password .
Have you any idea please ?
anan...@googlemail.com
unread,
Apr 12, 2016, 11:58:23 AM4/12/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
There is an ansible plugin for jenkins, but there is no option to run on remote host ( I may be wrong) . I created jenkins role and was able to run ansible playbook via ssh-agent . Please check the readme file in my github and let me know your feedback
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ansible Project
We have ssh keys established between our Jenkins server and our Ansible server. Then in the Jenkins job, we have an Execute Shell command with an entry like so...
ssh ansible@ansible_server_address -C "cd ~ansible/playbooks;ansible-playbook -i hostsfile site.yml --extra-vars "whatever vars you want to pass" -vv"
We have the Jenkins job set to run periodically (i.e. cron'd)