Skip to content

Instantly share code, notes, and snippets.


Kevin Carter cloudnull

View GitHub Profile
cloudnull / tripleo-ansible-module-usage.yaml
Created Nov 16, 2021
All modules used across all tripleo repos
View tripleo-ansible-module-usage.yaml
- group
- groupname
type: list
- host
- hostname
cloudnull /
Last active Sep 1, 2021
testiing the performance pylibssh from the ansible team
from __future__ import print_function
import time
from pylibsshext.errors import LibsshSessionException
from pylibsshext.session import Session
host = ''
user = 'centos'
password = 'secrete'
key_file = "/home/centos/.ssh/id_rsa"
cloudnull / .zshrc
Created Jul 19, 2021
Alias used to start and stop webcam access. Assumes the kernel module `v4l2loopback` is loaded.
View .zshrc
# Make sure you load the v4l2 kernel module
# $ modprobe v4l2loopback exclusive_caps=1 max_buffer=2
alias m200-webcam='gphoto2 --set-config="/main/capturesettings/liveviewsize=Medium" --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -deinterlace -threads 0 -vf lut3d=${HOME}/Documents/GC_Cinestyle-Rec709.cube -f v4l2 $1'
cloudnull /
Last active Jul 27, 2021
quick and dirty tool to scan an ansible archive and return a complete list of modules used throughout the archive.
import argparse
import collections
import json
import os
import subprocess
import yaml
from yaml import scanner
View train-master-update.diff
diff --git a/ b/
new file mode 100644
index 0000000..e48d6ef
--- /dev/null
+++ b/
@@ -0,0 +1,44 @@
+# TripleO Deployment Templates
+These templates are used to deploy my home cloud environment which I use for
+development purposes. While this is a development cloud, and small, it does
View task-core+directord.rst

Unifying TripleO Orchestration with Task-Core and Directord

cloudnull /
Last active Jun 26, 2021
Showing a global dictionary not being shared across processes. Only passes the assertion.
import multiprocessing
ITEM_CONTAINER = dict(a=0, b=1,)
CONTROL_CONTAINER = dict(a=0, b=1, c=2, d=3, e=4, f=5)
def _acquire_in_thread_inheritance(test, d):
d[test] = len(d.keys())
print(d, type(d), id(d))
cloudnull /
Created Apr 10, 2021
Install the latest Unifi Controller on Debian 10
#!/usr/bin/env bash
# Install dependencies
apt install apt-transport-https ca-certificates wget dirmngr gnupg gnupg2 software-properties-common multiarch-support
# Install old mongo (requried).
wget -qO - | apt-key add -
echo "deb jessie/mongodb-org/3.4 main" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list
dpkg -i libssl1.0.0_1.0.1t-1+deb8u12_amd64.deb
cloudnull / heat-stack-delete.bash
Last active Feb 5, 2021
TripleO Manual heat delete
View heat-stack-delete.bash
export PW=$(sudo podman exec -ti $(sudo podman ps | awk '/heat_api$/ {print $1}') grep '^connection=mysql' /etc/heat/heat.conf | awk -F':' '{print $3}' | awk -F'@' '{print $1}')
export STACK=${STACK:-overcloud}
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from resource_data where resource_id in (select id from resource where stack_id in (select id from stack where name = '$STACK'));\""
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from resource where stack_id in (select id from stack where name = '$STACK);\""
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from event where stack_id in (select id from stack where name = '$STACK');\""
sudo podman exec -ti mysql bash -c "mysql -u heat -p${PW} heat -e \"delete from stack where name = '$STACK';\""
cloudnull /
Last active Sep 27, 2021
Create KVM VMs similar to OpenStack with cloud init, networking, and such.
set -ev
set -o pipefail
if [[ -f "/etc/default/vm-defaults" ]]; then
source /etc/default/vm-defaults
export NAME=${NAME:-TargetVM}