Skip to content

Instantly share code, notes, and snippets.

View cloudnull's full-sized avatar

Kevin Carter cloudnull

View GitHub Profile
cloudnull /
Created July 7, 2024 15:25
Install openstack keystone on OSX
# This simple setup fixes the following error on MacOS.
# scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: 'openssl/aes.h' file not found
# #include <openssl/aes.h>
# ^~~~~~~~~~~~~~~
# 1 error generated.
# error: command '/usr/bin/clang' failed with exit code 1
# [end of output]
# note: This error originates from a subprocess, and is likely not a problem with pip.
cloudnull / flake.nix
Created April 6, 2024 06:16 — forked from voidus/flake.nix
Build a cloudinit image in nixos
description = "A nixos cloudinit base image without nixos-infect";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
outputs = { self, nixpkgs }:
system = "x86_64-linux";
cloudnull /
Last active November 24, 2023 21:04
RKE1 OpenStack
alias os='openstack --os-cloud rxt-mvp '
os network create osh1
os subnet create \
osh1-subnet \
--network osh1 \
--subnet-range \
cloudnull / ara.bash
Last active March 2, 2023 12:49
Using the ARA CLI Client, return unique hosts where a task is found and in a defined state.
function ara-task-uniq-hosts () {
# Scans across all tasks within 1 million records and returns all of the unique hosts where the task
# meets a certain state. Default state is "ok"
# When looking for the "changed" state the special CLI modifier is used.
if [ ${TASK_STATE} == "changed" ]; then
cloudnull / fig-up.rc
Last active August 4, 2023 15:58
compose omnibus protocol shell
function fig-up () {
function get_latest_release() {
curl $(curl --silent "" | jq ".url" -r) | jq -r .tag_name
function get_rpc_endpoint() {
curl --silent "$1/chain.json" | jq ".apis.rpc[0].address" -r
if ! command -v jq &> /dev/null; then
cloudnull / teleport-update-playbook.yml
Created November 10, 2022 14:28
Teleport upgrade playbook
# This playbook is used to upgrade teleport in place, it will deploy the apt repo using facts.
# Invocation,
# $ ansible-playbook -i ~/projects/ ~/projects/teleport-playbook.yml -e ansible_user=debian --limit '!teleport-server'
# NOTE: This playbook book exectuion is using dynamic inventory and a limit which is ensuring that the playbook is not executed against
# the teleport server. The playbook can be used on the teleport server, it just has to be done in isolation; a restart of the server
# will impact client connectivity.
- name: Teleport updates
import collections
import json
import re
import sys
GROUPS = dict()
HOSTS = dict()
PROTOS = dict()
R_WORDS = re.compile(r"\w+")
cloudnull / gist:c17c210f86364ba561b5848bd7d70fe3
Created October 28, 2022 17:15
Installing Nvidia's proprietary drivers from source
cat > /etc/modprobe.d/blacklist-nouveau.conf <<EOF
blacklist nouveau
options nouveau modeset=0
apt update
apt install -y wget linux-headers-$(uname -r) build-essential libglvnd-dev pkg-config dkms
# Required config
# $ export ANSIBLE_SCP_IF_SSH=False
# $ export ANSIBLE_SSH_ARGS="-F /home/USERNAME/.ssh/teleport.cfg"
- hosts: all
gather_facts: true
become: true
cloudnull /
Last active September 30, 2022 03:07
A simple dynamic Ansible inventory which uses node (server) information from teleport.
#!/usr/bin/env python3
"""Teleport Inventory Documentation.
Very simple inventory script which will use teleport as a dynamic inventory source.
The script assumes you've logged in and have access to the teleport service.
The script will read machines and return JSON information from teleport. Once the
return information is sourced, it will format the inventory using the node name
as the target host and the labels as hostvars and groups.