Category: Programming

0

Git and GitHub Overview

Git is a free and open-source distributed version control system. Install git and create a GitHub account more about how to install git – here. There is a GUI option to use git, but I would recommend start (and probably stick with CLI) Create GitHub account here install git in Linux: Set your user name and email address every Git commit uses...

0

Linux on Windows, Python IDE, and VirtualEnv

Linux on Windows For some tasks, it is still easier to use Windows (Cisco IP Communicator, UCCX Script Editor, CUCM RTMT, etc.), but there is an option to include Linux into the workflow. Recently I discovered the WLS: Windows Subsystem for Linux (WSL), which allows us to install and run sort of Linux on Windows10 side-by-side. Go to Microsoft Store and...

0

Python: Script structure

I decided to make some Python notes. Since there is a ton of information about Python, these notes will be mostly for my reference but if they help anyone – it will be great. The best way to understand it – try it and make a note:) starting with the basic script structure: starting with the basic script structure: #!/usr/bin/env python:...

0

A little more Ansible

Templates There is a way to run playbook locally on the PC (generating some files, scripts or configs) using templates. Let’s say there is a template file (switch_template.j2): hostname {{ item.hostname }} ! interface loopback 0 ip address {{ item.loopback }} ! router eigrp 100 As a result of this playbook, 2 files will be generated: R1.txt and R2.txt Conditions Using...

0

Ansible with Cisco

Documentation A good point to start – Ansible User Guide. Network modules (ios/nxos/ios-xr, aci, junos etc) – Module Index – Network Modules IOS/NXOS Command Modules IOS NXOS IOS There is are a way to run multiple commands Very useful for debugging to show output in the terminal: – name: show output     debug:          var: output Some...

0

Ansible Intro

Automation is everywhere. I decided to take a quick look into Ansible Ansible is the simplest way to automate apps and IT infrastructure using SSH, with no agents to install on remote systems. Here is Intro to Ansible. Ansible – Open Source IT Automation Platform Notes: using SSH and does not require an agent written in Python push-based architecture Ansible Components...

0

Cisco ISE: Update HotSpot access-code Daily

Several times, I run into the question if there is an option to “automatically” change the guest HotSpot access code at a given interval (lets say daily) and I came up with the following solution: ISE API + Python + Task Scheduler Steps: Enable API on ISE Create Python Script Configure Task Scheduler Enable the ERS APIs The ERS APIs are...

0

Python: Simple Email Gmail

Sometimes it is very useful to have the script that sends notification, when finishes executing, has come to an error or just needs to send some data to you.This script is used to send a simple email from a gmail account (can be configured for other email servers). I was working on the task, that involved Cisco ISE, guest portal and...