Dev: Automating network using ansible

Dev: Automating network using ansible

This is going to be the last part of this series. As netconf uses a similar approach to restconf (using only xml) I decided that ansible would be be more interesting.

This post, assumes you have ansible already installed. I'll be using local configuration for ansible, overriding the default one. To accomplish this I'll be using the following files:

ansible.cfg > configuration file

hosts > inventory file

pynat_ansible.yml > playbook

group_vars/session_creds.yml > file storing credentials

Ansible structure and configuration is quite easy to understand. Let's look the content of each file:

ansible.cfg

No alt text provided for this image

hosts

No alt text provided for this image



group_vars/session_creds

No alt text provided for this image




pynat_ansible.yml

No alt text provided for this image
No alt text provided for this image




















Run the playbook

ansible-playbook pynat_ansible.yaml

No alt text provided for this image

I hope you enjoyed this post, leave your comments below and I'll see you on the next one.


要查看或添加评论,请登录

Silésio Carvalho的更多文章

  • The Power of Visualization

    The Power of Visualization

    I am Silésio Carvalho, CCIE #65745 and I passed the CCIE lab exam on November 30 2021. If you paid attention to the…

    8 条评论
  • ForticlientEMS fails connection with Fortihate

    ForticlientEMS fails connection with Fortihate

    For those trying to play with Fortigate ZTNA, if you're using Fortigate on evaluation mode, one of the restrictions…

  • Why you won't become a CCIE

    Why you won't become a CCIE

    I'm not the author for the text below but I wanted to share this with you, in case you're thinking about taking the…

    10 条评论
  • Trobleshoot SD-WAN – Part 2

    Trobleshoot SD-WAN – Part 2

    Hi there, in the last article we saw how to troubleshoot control connection failure on Cisco SD-WAN, caused by…

  • Trobleshoot SD-WAN – Part 1

    Trobleshoot SD-WAN – Part 1

    Hi there, While deploying Cisco SD-WAN you might face control connection errors related to certificate. Here are some…

  • Como eu come?aria de novo, em Networking (Redes)?

    Como eu come?aria de novo, em Networking (Redes)?

    Estou nesta jornada a mais de uma década e até a data, tem sido uma caminhada nada fácil (por op??o minha) mas muito…

    6 条评论
  • CCIE - The Plan

    CCIE - The Plan

    Hi there, first of all, I’d like thank everyone for the congratulations messages. As a thank you back, I’ll share with…

    20 条评论
  • How To's - Deploy Checkpoint Remote Access VPN

    How To's - Deploy Checkpoint Remote Access VPN

    Hi there, in this post we'll see how to deploy remote access using Checkpoint Remote Access VPN client. Some…

    3 条评论
  • How To’s – Deploy DMVPN Front Door VRF (automating with ansible)

    How To’s – Deploy DMVPN Front Door VRF (automating with ansible)

    Hi there, in this post we're going to deploy DMVPN Front Door VRF and using ansible. Basically, we'll be using DMVPN…

    1 条评论
  • How To’s – Deploy DMVPN Dual Hub Dual Cloud

    How To’s – Deploy DMVPN Dual Hub Dual Cloud

    Hi there, in this post we’ll see how to deploy DMVPN Dual Hub Dual Cloud. Basically it means we’ll have two or more…

社区洞察

其他会员也浏览了