Skip to content

Instantly share code, notes, and snippets.

@yu81
Last active August 29, 2015 14:06
Show Gist options
  • Save yu81/632387373cf0fcd506b5 to your computer and use it in GitHub Desktop.
Save yu81/632387373cf0fcd506b5 to your computer and use it in GitHub Desktop.
Check version of bash each AWS EC2 instances written in /etc/hosts.
# Check version of bash each AWS EC2 instances written in /etc/hosts.
# As for tomahawk options, see http://tomahawk.readthedocs.org/en/latest/tomahawk.html
# logged in as a user which has the same password in each server.
echo YOUR_COMMON_PASSWORD |
# execute tomahawk.
# yarr is one of a utility command in OpenUsp-Tukubai (https://github.com/usp-engineers-community/Open-usp-Tukubai)
tomahawk --login-password-stdin -c -h -t 10 \
"$(awk '$0~/^(10|192|172)\./{print $1}' /etc/hosts|yarr|tr " " ",")" \
'echo ${HOSTNAME} $(LANG=C yum info bash|grep amzn1|head -1)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment