Skip to content

Instantly share code, notes, and snippets.

View trishnaguha's full-sized avatar
🎯

Trishna Guha trishnaguha

🎯
View GitHub Profile
@trishnaguha
trishnaguha / prefix_lists.json
Last active September 22, 2022 15:26
cisco iOS prefix lists return
{
"result": {
"commands": [
"no ip prefix-list 10",
"no ip prefix-list test",
"no ip prefix-list test_prefix",
"no ipv6 prefix-list test_ipv6"
],
"before": [
{
@trishnaguha
trishnaguha / nxos_lag_interfaces.yaml
Created July 16, 2019 14:21
Resource Module Sample Playbook
- hosts: nxos
connection: network_cli
gather_facts: no
tasks:
- name: nxos_facts
nxos_facts:
gather_subset: min
gather_network_resources: lag_interfaces
@trishnaguha
trishnaguha / nxos_lag_interfaces.yaml
Created July 16, 2019 14:21
Resource Module Sample Playbook
- hosts: nxos
connection: network_cli
gather_facts: no
tasks:
- name: nxos_facts
nxos_facts:
gather_subset: min
gather_network_resources: lag_interfaces
tags: facts
# https://github.com/gpakosz/.tmux
# (‑●‑●)> dual licensed under the WTFPL v2 license and the MIT license,
# without any warranty.
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/trishna/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
i .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
set syntax=on
set nocompatible
set smartindent
set shiftwidth=4
set backspace=indent,eol,start
set ruler
set number
set showcmd
set incsearch
@trishnaguha
trishnaguha / layout_resource_module
Last active March 28, 2019 15:09
Layout of Resource Module
├── library
│   └── <ansible_network_os>/<ansible_network_os>_<resource>.py
├── module_utils
│   ├── __init__.py
│   └── <ansible_network_os>
│   ├── argspec
│   │   ├── facts
│   │   │   ├── facts.py
│   │   │   └── __init__.py
│   │   ├── __init__.py
- name: trunk allowed vlan
pattern_match:
regex: " switchport trunk allowed vlan (.*)"
content: "{{ item }}"
match_all: yes
register: allowed_vlans
Return would be somewhat like
```
@trishnaguha
trishnaguha / ansible.cfg
Created February 5, 2019 14:47
Ansible 101
[defaults]
inventory=hosts