Skip to content
Snippets Groups Projects
Commit 695b05a3 authored by nimrod's avatar nimrod
Browse files

- Added hook to verify vaulted files.

parent d8351dd2
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
set -eu
for filename in $@
do
grep -q ANSIBLE_VAULT "$filename" || \
(echo "$filename is not vaulted." && exit 1)
done
--- ---
- id: ansible-pre-commit - id: ansible-syntax-check
name: Check Ansible playbooks name: Check Ansible playbooks
description: Check Ansible playbooks for syntax errors. description: Check Ansible playbooks for syntax errors.
language: script language: script
entry: ansible-syntax-check entry: ansible-syntax-check
files: playbook.yml files: playbook.yml
- id: ansible-vault-check
name: Verify vaulted files
description: Verify that Ansible Vault files are vaulted.
language: script
entry: ansible-vault-check
files: vault
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment