Skip to content

Instantly share code, notes, and snippets.

View brianjwagner's full-sized avatar

Brian W brianjwagner

View GitHub Profile
### Keybase proof
I hereby claim:
* I am brianjwagner on github.
* I am honus (https://keybase.io/honus) on keybase.
* I have a public key whose fingerprint is 4AE2 B31C A363 FB08 1A4A A9D9 3410 B176 7288 1393
To claim this, I am signing this object:
@brianjwagner
brianjwagner / edgerouter.config
Last active April 16, 2023 05:26
EdgeRouter Lite Configuration
firewall {
all-ping enable
broadcast-ping disable
ipv6-receive-redirects disable
ipv6-src-route disable
ip-src-route disable
log-martians enable
name LAN_IN {
default-action accept
description "Wired network to other networks"
@brianjwagner
brianjwagner / gist:e49c3d98653182e1c864
Last active August 29, 2015 14:13
ansible-playbook-bitnami
---
- hosts: all
tasks:
- name: install jgit-cli (bitnami Ubuntu)
sudo: yes
apt: name=jgit-cli update_cache=yes
when: ansible_distribution == 'Ubuntu'
---
- hosts: [application,automation,development]
user: root
vars:
node_version: '0.10.3'
node_prefix: "node-v${node_version}-linux-x64"
node_tarball: "${node_prefix}.tar.gz"
node_path: /usr/local
tasks:
{% for host in groups['app_servers'] %}
{{ hostvars[host]['ansible_eth0']['ipv4']['address'] }}
{% endfor %}
up-tools-vm0:179> ansible all -m ping
up-tools-vm1.cisco.com | FAILED >> {
"failed": true,
"msg": "Traceback (most recent call last):\n File \"/users/briawagn/.ansible/tmp/ansible-1365098453.16-24118605211284/ping\", line 72, in ?\n import simplejson as json\n File \"/usr/local/lib/python2.7/site-packages/simplejson/__init__.py\", line 113\n from .scanner import JSONDecodeError\n ^\nSyntaxError: invalid syntax\n",
"parsed": false
}
up-tools-vm3.cisco.com | FAILED >> {
"failed": true,
"msg": "Traceback (most recent call last):\n File \"/users/briawagn/.ansible/tmp/ansible-1365098453.18-156434898899959/ping\", line 72, in ?\n import simplejson as json\n File \"/usr/local/lib/python2.7/site-packages/simplejson/__init__.py\", line 113\n from .scanner import JSONDecodeError\n ^\nSyntaxError: invalid syntax\n",
@brianjwagner
brianjwagner / mysql-backup.sh
Created February 13, 2013 14:41
MySQL backup script for your crontab pleasure.
#!/bin/sh
# usage:
# @daily $HOME/bin/mysql-backup.sh report_gen prod daily up-vm-eeh2.cisco.com
# @daily $HOME/bin/mysql-backup.sh tims prod daily up-vm-eeh2.cisco.com
# @monthly $HOME/bin/mysql-backup.sh report_gen prod monthly up-vm-eeh2.cisco.com
# @monthly $HOME/bin/mysql-backup.sh tims prod monthly up-vm-eeh2.cisco.com
DB_NAME="$1"
BACK_NAME="$2"