Skip to content

Instantly share code, notes, and snippets.

Avatar

Tobias Wolter towo

View GitHub Profile
@towo
towo / README.md
Created Feb 2, 2022
Don't be inane and block boot on LVM
View README.md

How to get less annoyed when trying to install a sort of sane Debian setup on a Hetzner root server.

Steps

  1. cp -R /root/.oldroot/nfs/install .
  2. patch < hetzner-debian-sanity.diff
  3. $PWD/install/installimage

Due to the nature of the scripts (i.e. dirname $0) and me being too lazy to patch them entirely, take care to use the full path when calling the copied installimage.

@towo
towo / Puppet debug
Last active Dec 29, 2020
Looking for a good reason why the Puppet provider decides to remove the start and stop operations.
View Puppet debug
Debug: Cs_primitive[duncan_vip](provider=pcs): {
:primitive_class=>"ocf",
:primitive_type=>"IPaddr2",
:provided_by=>"heartbeat",
:name=>:duncan_vip,
:ensure=>:present,
:provider=>:pcs,
:parameters=>{
"cidr_netmask"=>"24",
"ip"=>"172.16.210.101"},
@towo
towo / README.md
Created Jul 22, 2020
MQTT event notification service
View README.md

Quick event notification thingie to respond to MQTT events; in my case, specifically for the doorbell so I can hear it with headphones on.

Should probably be easily adaptable to fit a more generalized need, and I'll probably do it at a later point.

@towo
towo / README.md
Last active Jul 9, 2020
Apt metrics systemd units for prometheus-node-exporter
View README.md

Simple service and timer for the apt.sh metrics script from the Prometheus community script collection. Used on a Debianite system with the Debian repository version of node-exporter, YMMV. puppet/prometheus uses node-exporter as the group by default, can be changed by setting prometheus::node_exporter::group via hiera/resource parameter. Alternative uses with ACLs are possible; one would have to investigate if the DynamicUser overlay would work for deleting files from a directory.

@towo
towo / journal output
Created Dec 12, 2018
puppetlabs-corosync with debian9
View journal output
Dec 12 22:26:38 debian9-64-1 systemd[1]: Starting Corosync Cluster Engine...
Dec 12 22:26:38 debian9-64-1 corosync[2812]: [MAIN ] Corosync Cluster Engine ('2.4.2'): started and ready to provide service.
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [MAIN ] Corosync Cluster Engine ('2.4.2'): started and ready to provide service.
Dec 12 22:26:39 debian9-64-1 corosync[2812]: info [MAIN ] Corosync built-in features: dbus rdma monitoring watchdog augeas systemd upstart xmlconf qdevices qnetd snmp pie relro b
indnow
Dec 12 22:26:38 debian9-64-1 corosync[2812]: [MAIN ] Corosync built-in features: dbus rdma monitoring watchdog augeas systemd upstart xmlconf qdevices qnetd snmp pie relro bindnow
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [TOTEM ] Initializing transport (UDP/IP Multicast).
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [TOTEM ] Initializing transmit/receive security (NSS) crypto: aes256 hash: sha1
Dec 12 22:26:39 debian9-64-1 corosync[2812]: [TOTEM ] Initializing transp
@towo
towo / Gemfile.lock
Last active Dec 11, 2018
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} BEAKER_destroy=no bundle exec rake beaker
View Gemfile.lock
GIT
remote: https://github.com/skywinder/github-changelog-generator
revision: 5d7f18bc415e9a2c27769b7ea0adb9bc18b285c0
specs:
github_changelog_generator (1.15.0.pre.rc)
activesupport
faraday-http-cache
multi_json
octokit (~> 4.6)
rainbow (>= 2.2.1)
@towo
towo / verify-ou.pl
Last active Sep 11, 2018
OU verification script for OpenVPN tls-verify.
View verify-ou.pl
#!/usr/bin/perl
## vim: set syn=on ts=4 sw=4 sts=0 et foldmethod=indent:
## purpose: check if value exists in multi-valued ou
## copyright: B1 Systems GmbH <info@b1-systems.de>, 2018.
## license: GPLv3+, http://www.gnu.org/licenses/gpl-3.0.html
## author: Tobias Wolter <tobias.wolter@b1-systems.de>, 2018.
## version: 1.0
## Source for this is the verify-cn sample from OpenVPN:
## https://github.com/OpenVPN/openvpn/blob/master/sample/sample-scripts/verify-cn
@towo
towo / gruvbox.theme
Created Apr 22, 2018
timewarrior gruvbox theme (needs terminal palette)
View gruvbox.theme
define theme:
description = "gruvbox.theme: A gruvbox-inspired theme"
colors:
exclusion = "color on color8"
today = "color208"
holiday = "color13"
label = "color243"
ids = "color4"
debug = "color14"
palette:
@towo
towo / default-os-trombik.yml
Last active May 16, 2019
OS-dependent default-precedence variables for ansible roles
View default-os-trombik.yml
# There's another method I spotted in trombik/ansible-role-dovecot. In the playbook, do this:
- name: Include OS-specific variables
include_vars: "{{ ansible_os_family }}.yml"
# In {{ ansible_os_family }}.yml:
__rolename_variable: some_value
# In defaults/main.yml:
rolename_variable: "{{ __rolename_variable }}"
View pkcs12
#!/bin/sh
set -e
EVENT_NAME="$1"
[ "$EVENT_NAME" = "live-updated" ] || exit 42
if [ ! -e "${ACME_STATE_DIR}" ]; then
exit 42
fi