Skip to content

Instantly share code, notes, and snippets.

View codatory's full-sized avatar

Alex Conner codatory

View GitHub Profile
- name: Kubernetes LB Config
hosts: control
gather_facts: no
become: true
order: shuffle
tasks:
- name: Enable nonlocal bind
sysctl:
name: net.ipv4.ip_nonlocal_bind
value: 1
@codatory
codatory / hosts.yml
Last active November 21, 2022 15:57
Kubernetes host patching
all:
children:
control:
hosts:
10.8.0.11:
node_name: k-c-1
10.8.0.12:
node_name: k-c-2
10.8.0.13:
node_name: k-c-3
alertmanager:
enabled: false
grafana:
defaultDasboardsTimezone: "America/Indiana/Indianapolis"
persistence:
enabled: true
service:
type: "LoadBalancer"
initChownData:
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: l2-pool
namespace: metallb-system
spec:
addresses:
- 10.8.0.100-10.8.0.250
---
apiVersion: metallb.io/v1beta1
apiVersion: k0sctl.k0sproject.io/v1beta1
kind: Cluster
metadata:
name: k0s-cluster
spec:
hosts:
- ssh:
address: 10.8.0.11
user: codatory
port: 22
@codatory
codatory / firmware-update.yml
Created November 19, 2022 01:54
Kubernetes Host OS Bootstrap Playbook
- name: Applying OS Configuration Baseline
hosts: all
gather_facts: no
become: true
vars:
ansible_ssh_pipelining: true
tasks:
- name: Install fwupd
apt:
name: fwupd
version: "3"
services:
server:
image: openspeedtest/latest
container_name: openspeedtest
restart: always
ports:
- "80:8080"

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@codatory
codatory / update.rb
Created February 21, 2018 20:51
Build CIDR lists of bad hosts
#!/usr/local ruby
lists = {
blocklist_de: "https://lists.blocklist.de/lists/all.txt",
tor_exit: "https://www.dan.me.uk/torlist/?exit",
dshield: "http://feeds.dshield.org/block.txt",
spamhaus: "https://www.spamhaus.org/drop/drop.txt"
}
lists.each do |name,url|
#include <Adafruit_NeoPixel.h>
#include <DistanceGP2Y0A21YK.h>
const int numPixels = 8;
const int pixelPin = 6;
const int irPin = 0;
const int sonarPin = 1;
const int minThreshold = 30;
const int maxThreshold = 45;