18 lines
326 B
Bash
Executable File
18 lines
326 B
Bash
Executable File
#! /bin/bash
|
|
# Verifies that files passed in are encrypted
|
|
set -e
|
|
|
|
has_error=0
|
|
for file in $@ ; do
|
|
head -1 "$file" | grep --quiet '^\$ANSIBLE_VAULT;' || {
|
|
echo "ERROR: $file is not encrypted"
|
|
has_error=1
|
|
}
|
|
done
|
|
|
|
if [ $has_error -eq 1 ] ; then
|
|
echo "To ignore, use --no-verify"
|
|
fi
|
|
|
|
exit $has_error
|