Following my blog post about setting up a Proxmox cluster with GlusterFS, this script automates the settings needed for a gluster disk.
| #!/bin/bash | |
| AGENT="" | |
| TRY_WGET=1 | |
| TRY_CURL=1 | |
| if [ "$TRY_WGET" == "1" ] && command -v wget >/dev/null 2>&1 | |
| then | |
| AGENT=wget | |
| elif [ "$TRY_CURL" == "1" ] && command -v curl >/dev/null 2>&1 | |
| then |
| #!/bin/bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| cleanup() { | |
| trap - SIGINT SIGTERM ERR EXIT | |
| if [ -z "${KEEP:-}" ] && [ -n "${tempdir:-}" ] | |
| then | |
| rm -Rf "$tempdir" | |
| fi |
This is an Ansible Playbook to monitor a git repo for players to add (or remove) and then restart the relevant
docker containers using docker-compose. I use this to manage the players on a minecraft server I run.
In this repo, you'll find the actual ansible playbook (playbook.yml), the crontab-able run_playbook.sh (which
silences unchanged plays) and the template I'm using (templates=docker-compose.yml). There is also an example vars
file (host_vars=localhost=vars.yml) to show the basics of what this file would look like. Note that directory
structures in gists are not permitted, so I've replaced / with = in each filename.
| blueprint: | |
| name: Turn off Light after Time has elapsed | |
| description: Given a light entity, watch for it turning on, and then turn it off after a certain period of time. | |
| domain: automation | |
| input: | |
| light: | |
| name: Light | |
| description: Select the light to monitor and control | |
| selector: | |
| entity: |
| blueprint: | |
| name: Turn off Switch after Time has elapsed | |
| description: Given a switch entity, watch for it turning on, and then turn it off after a certain period of time. | |
| domain: automation | |
| input: | |
| switch: | |
| name: Switch | |
| description: Select the switch to monitor and control | |
| selector: | |
| entity: |
| blueprint: | |
| name: Turn off Light after Time has elapsed | |
| description: Given a light entity, watch for it turning on, and then turn it off after a certain period of time. | |
| domain: automation | |
| input: | |
| light: | |
| name: Light | |
| description: Select the light to monitor and control | |
| selector: | |
| entity: |
| blueprint: | |
| name: Turn off Switch after Time has elapsed | |
| description: Given a switch entity, watch for it turning on, and then turn it off after a certain period of time. | |
| domain: automation | |
| input: | |
| switch: | |
| name: Switch | |
| description: Select the switch to monitor and control | |
| selector: | |
| entity: |
This file should be imported into Karabiner, probably via the "Karabiner Complex Rules Generator".
This remaps the following keys:
` | " @ # ~ \ |