mndhr
mndhr

Reputation: 1499

How to run ansible playbook with Bamboo or jenkins

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 ?

Upvotes: 0

Views: 4279

Answers (3)

mndhr
mndhr

Reputation: 1499

thank you for your ansewers , i used a simple solution :

from Bamboo or jenkins i used the sshpass package to execute my playbook .

sshpass -p 'mypassword' ansible-playbook myplaybook.yml --ask-pass -c paramiko -vvvv

Upvotes: 0

jil
jil

Reputation: 2691

In Jenkins you can use SSH Agent Plugin to serve the credentials to Ansible.

Upvotes: 0

vvchik
vvchik

Reputation: 1455

You should use key authentication and private_key_file option in ansible config file

Upvotes: 1

Related Questions