hook.sh.j2 347 B

12345678910111213141516
  1. #!/bin/sh
  2. {% if ansible_prolog %}
  3. {% from 'templates/ansible/prolog.j2' import prolog with context %}
  4. {{ prolog() }}
  5. {% endif %}
  6. hooks_dir="$(dirname "$(readlink -f "${0}")")/hooks"
  7. if [ -d "${hooks_dir}" ]; then
  8. find "${hooks_dir}" -type f -executable | \
  9. while read script ; do
  10. "${script}" "$@"
  11. done
  12. fi
  13. exit 0