Skip to content

Instantly share code, notes, and snippets.

@cniesen
cniesen / .git_hooks_pre-commit
Last active December 29, 2021 09:26 — forked from leucos/.git_hooks_pre-commit
ansible-vault pre-commit hook
#!/bin/bash
###
# Pre-commit hook that verifies if all files containing 'vault' in the name # are encrypted.
# If not, commit will fail with an error message
#
# Original author: @ralovely
# https://www.reinteractive.net/posts/167-ansible-real-life-good-practices
#
# File should be .git/hooks/pre-commit and executable
###