Skip to content

Instantly share code, notes, and snippets.

View nunodio's full-sized avatar

Nuno Dio nunodio

  • Farfetch
  • Portugal
View GitHub Profile
@nunodio
nunodio / pre-commit.example
Created March 19, 2019 09:16 — 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.*\.yml$'
REQUIRED='ANSIBLE_VAULT'