Skip to content

Instantly share code, notes, and snippets.

View jdoss's full-sized avatar
😎
My hovercraft is full of eels

Joe Doss jdoss

😎
My hovercraft is full of eels
View GitHub Profile
@jdoss
jdoss / coreos_cis.yml
Created November 8, 2018 20:41
CIS CoreOS CL / Fedora CoreOS config
storage:
disks:
- device: /dev/sda
wipe_table: true
partitions:
# 1.1.6 Ensure separate partition exists for /var
- label: VAR
number: 1
size: 4MB
# 1.1.11 Ensure separate partition exists for /var/log
@jdoss
jdoss / Vagrantfile
Created September 26, 2018 14:47
An example libvirt Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.ssh.forward_agent = true
config.vm.define "fedora" do |fedora|
fedora.vm.box = "fedora/28-cloud-base"
fedora.vm.hostname = "f28.example.com"
@jdoss
jdoss / slack-repo.spec
Created June 13, 2018 15:52
RPM spec for shipping the Slack for Linux repository.
%global debug_package %{nil}
Name: slack-repo
Version: 0.0.1
Release: 1%{?dist}
Epoch: 1
URL: https://github.com/jdoss/slack-repo/
Summary: Fast, modern, secure VPN tunnel
License: MIT
Group: System Environment/Kernel
@jdoss
jdoss / wireguard-monitor.path
Created April 15, 2018 16:38
Reload systemd-networkd on WireGuard config change
[Path]
PathChanged=/etc/systemd/network/wg0.network
PathChanged=/etc/systemd/network/wg0.netdev
[Install]
WantedBy=multi-user.target
@jdoss
jdoss / bummer.txt
Created September 14, 2017 22:16
WireGuard 3.10.0-693.2.2.el7.x86_64 CentOS 7.4.1708 Error
[root@localhost ~]# dkms build -m wireguard -v 0.0.20170907
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j1 KERNELRELEASE=3.10.0-693.2.2.el7.x86_64 -C /lib/modules/3.10.0-693.2.2.el7.x86_64/build M=/var/lib/dkms/wireguard/0.0.20170907/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.10.0-693.2.2.el7.x86_64 (x86_64)
Consult /var/lib/dkms/wireguard/0.0.20170907/build/make.log for more information.
[root@localhost ~]# cat /var/lib/dkms/wireguard/0.0.20170907/build/make.log
@jdoss
jdoss / ec2.yml
Created February 7, 2017 16:47
List EC2 tags and set facts.
---
- name: Gather EC metadata facts
action: ec2_facts
- name: List tags on an instance
ec2_tag:
region: "{{ ansible_ec2_placement_region }}"
resource: "{{ ansible_ec2_instance_id }}"
state: list
register: instance
@jdoss
jdoss / fstab.awk
Created December 24, 2015 19:08
An attempt to use AWK to find and replace $1 based on line number.
awk '{ if (NR==1) {getroot = "blkid -s UUID /dev/fedora_server/root|cut -d: -f2"} {getroot |& getline root } {$1=root} \
if (NR==2) {close("getroot")}{getboot = "blkid -s UUID /dev/mmcblk0p1|cut -d: -f2"} {getboot |& getline boot} {$1=boot} {close("getboot")} \
if (NR==3) {close("getboot")}{getswap = "blkid -s UUID /dev/mmcblk0p2|cut -d: -f2"} {getswap |& getline swap} {$1=swap} } {close("getswap")}1' etc/fstab
@jdoss
jdoss / Vagrantfile
Created November 1, 2015 03:08
A Vagrantfile that works with Open vSwitch on :public_network
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.define :dev do |dev|
dev.vm.box = "centos/7"
dev.vm.hostname = "ansible"
dev.vm.network :public_network, :dev => "ovsbr0", :ovs => true
@jdoss
jdoss / ovs_libvirt.md
Created October 31, 2015 23:30
Configure Fedora Server with Open vSwitch and Libvirt

This will allow you to use Open vSwitch with Libvirt to put your VMs on the same network as the host and not use the default NAT based bridge.

Install Packages

dnf install -y virt-install libvirt openvswitch

Services Prep Work

Disable NetworkManager :(

@jdoss
jdoss / iwl7260-firmware_debug.txt
Last active August 29, 2015 14:28
iwl7260-firmware.noarch + Intel Corporation Wireless 7265 = crappy wifi party
# lspci |grep Wireless
04:00.0 Network controller: Intel Corporation Wireless 7265 (rev 59)
# uname -a
Linux 4.1.4-200.fc22.x86_64 #1 SMP Tue Aug 4 03:22:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
# /sbin/ethtool -i wlp4s0 |grep firm
firmware-version: 25.17.12.0