How to run Ansible file in Jenkins using Ansible plugin Please look into this error trying to implement the deploy.yml file with ansible plugin which is installed in the jenkins.

In ansible console I can implement the app successfully to the target machine but while same deploy.yml file using in jenkins getting error .

Tried :


ssh connection from target and master machine able to connect
Add the rsa key/finger print key to the target machine as well as in master controller .
From terminal i can able to access target machine as well as can able to deploy any app to any VM but while switched to jenkins ansible plugin getting error.
Simple one.
You should either add ansible_ssh_extra_args="-o StrictHostKeyChecking=no" to inventory or disableHostKeyChecking: true into Jenkins pipeline script (inside ansiblePlaybook block).

Like this:

ansiblePlaybook(
  colorized: true,
  installation: 'ansible27'
  inventory: '[hostsfile]'
  playbook: '[playbook]'
  disableHostKeyChecking: true
)