ansible-software/git/templates/git.sh.j2

8 lines
333 B
Django/Jinja

if [ $UID -gt 999 ] && [ "`/usr/bin/id -gn`" = "`/usr/bin/id -un`" ]; then
if [ -z "$(git config user.name)" ]; then
git config --global user.name "$(getent passwd "$USER" | cut -d : -f 5)"
fi
if [ -z "$(git config user.email)" ]; then
git config --global user.email "${USER}@{{ mail_domain }}"
fi
fi