Ansible 2.5 - New Network Modules

Ansible 2.5 just came out, and with it comes new network modules (and the network_cli and netconf connectivity methods). The new modules allow us to manage certain IOS configurations without always depending on the “ios_config” module, while the network_cli connectivity method means we don’t always need to configure a “provider” for every network playbook. These new modules and connectivity methods allow networking configuration management to look and feel similar to our server management playbooks, which is great for cross-functional teams and reusability. ...

March 26, 2018 · 3 min · Daniel Kuchenski

Ansible - BadHostKeyException

When executing an ansible playbook, you may get the following error: An exception occurred during task execution. To see the full traceback, use -vvv. The error was: paramiko.BadHostKeyException: Host key for server switch-name does not match! This probably happened after you changed the name of your network device, and generated new RSA keys. Or, if you are using DNS device names in ansible, resolve the name of your network device from your ansible server and verify the DNS resolution is correct. To fix the issue, edit your “known_hosts” file and remove the key associated with the network device throwing the error: ...

January 27, 2018 · 1 min · Daniel Kuchenski

Ansible - VLAN Provisioning

Note: There is a newer guide for VLAN provisioning with Ansible 2.5 Ansible is such a powerfull tool that it can be easy to get lost in all the possibilities. Running your “network infrastructure as code” with full configs auto-generated and checked into git is the dream, but we can start simple with automating time-consuming tasks. This post will focus on getting ansible up and running with a playbook to configure new vlans across your switches. ...

October 11, 2017 · 5 min · Daniel Kuchenski

Ansible Installation - Ubuntu 16.04

For network automation, I believe the best tool out there right now is Ansible. Ansible is open-source, agentless, has a large community, and is easy to get started quickly. For the major networking vendors, there are already pre-built modules making it simple to interface with their equipment. This post will focus on getting Ansible up and running on a Ubuntu 16.04 server (in three steps), and following posts will show how to use Ansible to automate network configuration. ...

July 23, 2017 · 1 min · Daniel Kuchenski