This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ASPELL=$(which aspell) | |
if [ $? -ne 0 ]; then | |
echo "Aspell not installed - unable to check spelling" >&2 | |
exit | |
else | |
WORDS=$($ASPELL --mode=email --add-email-quote='#' list < "$1" | sort -u) | |
fi | |
if [ -n "$WORDS" ]; then | |
printf "\e[1;33m Possible spelling errors found in commit message:\n\e[0m\e[0;31m%s\n\e[0m\e[1;33m Use git commit --amend to change the message.\e[0m\n\n" "$WORDS" >&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Check current timezone | |
shell: "timedatectl | gawk -F'[: ]+' ' $2 ~ /Timezone/ {print $3}'" | |
register: current_zone | |
changed_when: False | |
- name: Set UTC timezone | |
file: src=/usr/share/zoneinfo/{{ timezone }} dest=/etc/localtime state=link force=yes | |
when: current_zone.stdout != '{{ timezone }}' |