*Hi Vladimir,* *with this code on the playbook:* --- - name: --------------- 1. Applying Layer 2 Configuration --------------- hosts: Snif_TEST connection: network_cli tasks: - include_vars: dir: /etc/ansible/roles/new_vlan/vars/ - include_role: name: new_vlan tasks_from: show_vlan.yml
*And on the vars file:* ansible_ssh_common_args: -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts ansible_user: ansible ansible_password: ansible *This is the result:* [ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml PLAY [--------------- 1. Applying Layer 2 Configuration ---------------] ************************************************************** TASK [Gathering Facts] ******************************************************************************************************************** fatal: [R-TEST-SNIF]: FAILED! => {"msg": "Unable to automatically determine host network os. Please manually configure ansible_network_os value for this host"} *With this code on the playbook:* --- - name: --------------- 1. Applying Layer 2 Configuration --------------- hosts: Snif_TEST tasks: - include_vars: dir: /etc/ansible/roles/new_vlan/vars/ - include_role: name: new_vlan tasks_from: show_vlan.yml *And on the vars file:* ansible_ssh_common_args: -o StrictHostKeyChecking=no -o UserKnownHostsFile=~/.ssh/known_hosts ansible_connection: network_cli ansible_network_os: ios ansible_user: ansible ansible_password: ansible *This is the result:* [ansible@Netauto-Dev new_vlan]$ ansible-playbook new_vlan_playbook.yml PLAY [--------------- 1. Applying Layer 2 Configuration ---------------] ************************************************************** TASK [Gathering Facts] ******************************************************************************************************************** fatal: [R-TEST-SNIF]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added 'r-test-snif,10.70.54.102' (RSA) to the list of known hosts.\r\nPermission denied (publickey,keyboard-interactive,password).", "unreachable": true} PLAY RECAP ******************************************************************************************************************************** R-TEST-SNIF : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0 *Keep in mind that in anytime I have no problem with sshing to the machine. example:* [image: Capture.PNG] *Also remember that I always can add the pubkey configuration to the router and run ansible successfuly.* *Have any idea what to do next?* -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/bb69793a-cf26-4db4-8e0d-20f58d00f087%40googlegroups.com.