Closed
Description
SUMMARY
host_key_auto_add doesn't work when using
ansible_connection=netconf` even when the documentation suggests it should:
ISSUE TYPE
- Bug Report
COMPONENT NAME
plugins/connection/netconf.py
ANSIBLE VERSION
ansible 2.7.6
config file = /home/verne/.ansible.cfg
configured module search path = [u'/home/verne/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/verne/venv-ansible/lib/python2.7/site-packages/ansible
executable location = /home/verne/venv-ansible/bin/ansible
python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
CONFIGURATION
< no output>
OS / ENVIRONMENT
CentOS 7.5
DEPENDENCY PROBLEMS
STEPS TO REPRODUCE
(venv-ansible) [verne@kef1c-cde-ucd0001 netconf]$ cat inventory
srx02 ansible_connection=netconf ansible_host=10.114.130.1
---
- name: test
hosts: srx02
gather_facts: false
tasks:
- debug:
msg: "hello"
EXPECTED RESULTS
To connect without an unknown host key error.
ACTUAL RESULTS
(venv-ansible) [test@kef1c-cde-ucd0001 netconf]$ ANSIBLE_HOST_KEY_AUTO_ADD=True ansible-playbook test.yml -i inventory
PLAY [test] **************************************************************************
TASK [debug] *************************************************************************
fatal: [srx02]: FAILED! => {"msg": "Unknown host key [46:3f:12:7f:10:f9:95:40:1a:86:78:33:66:2a:5d:a1] for [[10.114.130.1]:830]"}
to retry, use: --limit @/home/verne/will/netconf/test.retry
PLAY RECAP ***************************************************************************
srx02 : ok=0 changed=0 unreachable=0 failed=1