For mass destruction (j/k I mean powerful data gathering)
-
Install Boto
-
Install GNU Parallel
function ec2 {
list_instances -f instance-state-name=running -r $1 -t -H Hostname
}
function job {
parallel --jobs 8 --tag --onall --sshloginfile - ::: $@
}
Using them together (example). NOTE: You need Boto's AWS ACCESS KEY & SECRET env vars setup first. Then you may call the boto function (like 'ec2' above) in your shell.
ec2 us-east-1|job uptime
function chef-version {
job "([[ -f /etc/chef/client.pem ]] && echo -n client,) || \
(which chef-solo>/dev/null && echo -n solo,) || \
echo -n MISSING,; \
(which chef-solo>/dev/null && chef-solo --version|cut -d' ' -f2) || \
echo MISSING;" \
| tr '\t' ','
}
Produce a CSV report of all the versions of chef we have out there.
ec2 us-east-1|chef-version|tee report.csv