Skip to content

Instantly share code, notes, and snippets.

View fungiboletus's full-sized avatar
🦆
Working

Antoine Pultier fungiboletus

🦆
Working
  • Oslo, Norway
  • 11:36 (UTC +02:00)
View GitHub Profile
@fungiboletus
fungiboletus / pre-commit.example
Created October 30, 2018 11:45 — forked from ralovely/pre-commit.example
Git pre-commit hook for Ansible Vault
#!/bin/sh
#
# Pre-commit hook that verifies if all files containing 'vault' in the name
# are encrypted.
# If not, commit will fail with an error message
#
# File should be .git/hooks/pre-commit and executable
FILES_PATTERN='.*(vault|secrets).*\.ya?ml$'
REQUIRED='ANSIBLE_VAULT'