# What is the difference between runing playbook on ansible host and from Jenkins

**URL:** <https://forum.ansible.com/t/what-is-the-difference-between-runing-playbook-on-ansible-host-and-from-jenkins/30061>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [April 4, 2019, 3:14pm UTC](https://forum.ansible.com/t/what-is-the-difference-between-runing-playbook-on-ansible-host-and-from-jenkins/30061 "2019-04-04T15:14:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jinna\_Balu](https://avatars.discourse-cdn.com/v4/letter/j/ee7513/32.png) [@Jinna\_Balu](https://forum.ansible.com/u/Jinna_Balu)\
**Post date:** [April 4, 2019, 3:14pm UTC](https://forum.ansible.com/t/what-is-the-difference-between-runing-playbook-on-ansible-host-and-from-jenkins/30061/1 "2019-04-04T15:14:54Z")

</div>

##### SUMMARY

**Failed to connect to the host via ssh: Host key verification failed**

I have set of EC2 instance, i want to do application automation through jenkins UI using ansible plugin.

##### ISSUE TYPE- Bug Report

I am able to run the playbooks from the ansible host, but not from the jenkins UI using ansible plugin.

##### COMPONENT NAME

jenkins ansible plugin, ec2 instance with pem file

##### ANSIBLE VERSION

```auto
ansible 2.7.9

```

##### CONFIGURATION

```auto

```

##### OS / ENVIRONMENT

Ubuntu 18.04

##### STEPS TO REPRODUCE

```auto
ansible -m shell -a "free -m" --private-key=/etc/ansible/pem/WSStaging.pem -u ubuntu staging-app

```

##### EXPECTED RESULTS

Both ansible host terminal and jenkins Ui need to work the same

##### ACTUAL RESULTS

I am able to ping or execute any command in ansible server  
[![image](https://us1.discourse-cdn.com/ansible/original/2X/e/e401e9785fe778785ece9ab551e4b08ee013d8d2.png)](https://forum.ansible.com/uploads/short-url/wx2Xv2Ej8RFUKGrlaMssu20WP6y.png)

But when I run the same command from the Jenkins using Ansible plugin i am unable to execute it successfully.  
Always the same error  
Failed to connect to the host via ssh: Host key verification failed.

[![image](https://us1.discourse-cdn.com/ansible/original/2X/7/7e5fe917573a672212576bc11260cdc0125ca982.png)](https://forum.ansible.com/uploads/short-url/i1XEddWHaR32l3AC0Fo3Lnouyt4.png)

Thanks in advance.
