This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jinja2 Live Website: https://j2live.ttl255.com/ | |
--- | |
{ | |
"tenant": "Production", | |
"ap": "Prod_AP", | |
"epgs": [ | |
{ | |
"name": "10.75.1.0-24", | |
"mode": "regular", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$userdomain = "http://mydomain.com" | |
$organizationalunitpath = “ou=Politicians,ou=users,ou=company,dc=mydomain,dc=com” | |
$politicians = @( | |
("John","Adams"), | |
("Chester","Arthur"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: APIC - Fabric and tenant setup | |
hosts: all | |
gather_facts: no | |
vars: | |
aci_login: &aci_login | |
hostname: '{{ apic_host }}' | |
username: '{{ apic_username }}' | |
password: '{{ apic_password }}' | |
use_proxy: '{{ apic_use_proxy }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a list of lists called configs. Each element of configs is its own list. | |
configs = [ | |
['rtr1','10.1.1.1','cisco','cisco'], | |
['rtr2','10.1.1.2','cisco','cisco'], | |
['rtr3','10.1.1.3','cisco','cisco'] | |
] | |
# Iterate through the configs list. For each individual list, we then reference it as 'config'. Use an f-string notation to print it in the string. | |
for config in configs: | |
print(f'This hostname is {config[0]}, the IP address is {config[1]} and the passwords are {config[2]}/{config[3]}') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Quick and dirty MAC address to IP address lookup tool. Creates CSV compliant data. A total hack done in 15 minutes, saving HOURS of work. | |
In the mac_table.txt, have a list of mac addresses from 'show mac address-table'. Remove the headers. | |
192.168.148.31 00:08:17 0050.56b9.dddd Vlan128 | |
192.168.148.146 00:01:45 8c60.4f54.eeee Vlan128 | |
192.168.144.32 00:17:08 0050.56b9.ffff Vlan134 | |
192.168.144.21 00:00:41 0050.56bb.gggg Vlan104 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// Choose either "stable" for receiving highly polished, | |
// or "canary" for less polished but more frequent updates | |
updateChannel: 'stable', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
displayname | firstname | lastname | username | officephone | mobilephone | Title | OU | |
---|---|---|---|---|---|---|---|---|
A. Long Squirtz | A. Long | Squirtz | asquirtz | 4145551001 | 3810931303 | Gender Studies Professor | Executive | |
Abraham Von Cameltoe | Abraham | Von Cameltoe | avoncam | 4145551002 | 6517466052 | Theatrical Wardrobe Attendant | Employees | |
Allbutter Poundloaf | Allbutter | Poundloaf | apoundlo | 4145551003 | 7447930846 | Orderly | Employees | |
Anthony Panthony | Anthony | Panthony | apanthon | 4145551004 | 2675569213 | Concrete Smoother | Employees | |
Anyuk Nyuk | Anyuk | Nyuk | anyuk | 4145551005 | 7292727129 | X-Ray Technician | Employees | |
Arabian Nice | Arabian | Nice | anice | 4145551006 | 8041921427 | Reel System Operator | Employees | |
Aunt Tim | Aunt | Tim | atim | 4145551007 | 5978562770 | Assistant Corporation Counsel | Employees | |
Avocarter Phuks | Avocarter | Phuks | aphuks | 4145551008 | 2779684299 | Railroad Car Repair Supervisor | Employees | |
Beefy McWhatnow | Beefy | McWhatnow | bmcwhatn | 4145551009 | 4136900074 | Pedicab Driver | Employees |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import sys | |
import csv | |
import time | |
""" | |
PyCDR.py | |
Author: Steve Campbell, steven.d.campbell68@gmail.com, Github: https://github.com/sdcampbell/PyCDR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split_interface(interface): | |
num_index = interface.index(next(x for x in interface if x.isdigit())) | |
str_part = interface[:num_index] | |
num_part = interface[num_index:] | |
return [str_part,num_part] | |
def normalize_interface_names(non_norm_int): | |
tmp = split_interface(non_norm_int) | |
interface_type = tmp[0] | |
port = tmp[1] |
NewerOlder