Skip to content

Instantly share code, notes, and snippets.

View Daemoen's full-sized avatar

Marc Mercer Daemoen

View GitHub Profile

Keybase proof

I hereby claim:

  • I am daemoen on github.
  • I am daemoen (https://keybase.io/daemoen) on keybase.
  • I have a public key ASBF31JnKd55hO0qc6no_tBgDnyVj_JESnnyIcM6yaXSIgo

To claim this, I am signing this object:

@Daemoen
Daemoen / yubikey.gpg
Last active December 21, 2015 21:59
GPG PubKey
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQINBFZ4aawBEACsq6wbRACSFrW8I38HaIhv07O7x+wLIpchgQ0fZ2t7vbfBvx0m
5pRizEF9NNTrekxy7MhD+yXPci55kw2VRCr+mT3fLhkw1NGwb0fXV2CQP9SKNzNh
HoRrWDdS0BjBxlNXGMSmcVL5iKG/2DGc3lnGucXpQ9u+CBY29Uhi5AhUhajKowDs
yUsD5Sqv5o1IV6SzdzCmrRYqU640IO6Vdg0m3C/JLVX8ymG+IimQUVujMGYo4CCh
sfjs0XuLuRhw0F7eWgBZvKqjQeS7A8UQveHQAkYg89+ICxhyOVjYHgX/fzaoASyD
2XONEPfIUjQO6e+552qOtSccu0eHSsNQZ2QC01dUMXcT8OcANuv/mb/rQ+biNS9e
jnBDjBu5FOK9HMW145g1ZHQbNgRBwtyuQXAYsI4jLTXbTxlpx6oOJET63r8KBihM
@Daemoen
Daemoen / Vagrantfile
Last active October 18, 2018 18:13
Vagrantfile template that is extremely flexible and includes dynamic definitions, ansible playbook usage, and dynamic ansible logging
required_plugins = %w(vagrant-s3auth vagrant-vbguest)
plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }
if not plugins_to_install.empty?
puts "Installing plugins: #{plugins_to_install.join(' ')}"
if system "vagrant plugin install #{plugins_to_install.join(' ')}"
exec "vagrant #{ARGV.join(' ')}"
else
abort "Installation of one or more plugins has failed. Aborting."
end
@Daemoen
Daemoen / vbox-drv-resign.sh
Created December 7, 2016 21:43
Virtualbox Driver Signing Script
#!/usr/bin/env bash
for drv in vboxdrv vboxnetflt vboxnetadp vboxpci
do
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n $drv)
modprobe $drv
done
@Daemoen
Daemoen / example.yml
Created November 2, 2018 19:10
Simplify the steps
---
- name: Collect facts about deployed api-gateway
command: "aws apigateway --profile {{ aws_profile }} --region {{ region }} get-rest-apis"
register: get_apis
@Daemoen
Daemoen / example.yml
Created November 29, 2018 20:46
Strange design choice
- apt:
name: "{{ item }}"
loop: "{{ somelist }}"
somelist:
- a
- b
- c
- apt:
@Daemoen
Daemoen / example_dataset
Last active December 5, 2018 22:23
Stumped
"example_dataset": [
{
"curr_Name": "aws-example-vpca",
"curr_block": "172.123.48.0/20",
"curr_id": "vpc-05978ed5a4",
"curr_region": "us-east-1"
},
{
"curr_Name": "aws-example-vpcb",
"curr_block": "172.123.64.0/20",
@Daemoen
Daemoen / vars.yml
Created December 6, 2018 01:09
new stumped issue
provider_network_map:
aws:
basenet: 50
region_basenet:
us-east-1: 0
us-east-2: 1
us-west-1: 2
regions:
us-east-1:
- a
@Daemoen
Daemoen / subelement.yml
Created December 8, 2018 00:23
subelement?
---
proviver_subnet_map:
- name: aws
region_azs:
- us-east-1:
- a
- c
- us-east-2:
- a
- d
@Daemoen
Daemoen / subnet.yml
Created December 8, 2018 00:37
Fully dynamic network design
---
# tasks file for role_network_architecture
- name: Create AWS network subnets in defined azs
block:
- name: Test design of network topology
debug:
msg: "
name: {{ item.1.name }}-{{ item.3.key }}-{{ item.2 }}
cidr_block: {{ item.3.value|regex_replace('xxx', (item.1.basenet + item.1.region_basenet[item.2])|string ) }} # This will extend
# to use the other