Skip to content

Instantly share code, notes, and snippets.

View madonius's full-sized avatar

Emmanouil Kampitakis madonius

View GitHub Profile
#!/bin/sh
if [ "${1}" == "post" ]; then
cat /sys/class/leds/tpacpi::kbd_backlight/brightness_hw_changed > /sys/class/leds/tpacpi::kbd_backlight/brightness
fi
@toke
toke / ansible-vault-pass.bash
Last active October 24, 2021 21:38
Small helper script for usage with ansible-vault and ansible-playbook together with pass https://www.passwordstore.org/ Two implementations: first in bash and anotger one in python, which should be better as the git config hack to get ini files may fail due to incompatibilities in git vs. ansible ini style. The bash version is kept for reference.
#!/usr/bin/env bash
set -e
#
# Written by Thomas Kerpe <toke@toke.de> - Public Domain
#
# Small helper script for usage with ansible-vault and ansible-playbook
# together with [pass](https://www.passwordstore.org/)
#
# Say you have stored the vault-password for the current ansible playbook in pass