Following my blog post about setting up a Proxmox cluster with GlusterFS, this script automates the settings needed for a gluster disk.
#!/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:
` | " @ # ~ \ |
/---------------------------------------------------- Read the following file. Usually just the last 10 characters, but options | |
| follow. | |
| /---------------------------------------------- Follow the file, without stopping when it gets to the end of the "defined" | |
| | size to read. | |
| | /------------------------------------------- Define the number of lines to read. | |
| | | /----------------------------------------- Don't read any lines (-n 0) In this case because you might be following | |
| | | | binary files! | |
| | | | /--------------------------------------- $() executes the comand within the braces, and uses "STDOUT" as this value. | |
| | | | | /------------------------------------- Find lists all the files (or directories) which match the criteria. | |
| | | | | | /-------------------------------- The path to look for files in. All files |