Skip to content

Instantly share code, notes, and snippets.

@artyom
Created May 28, 2012 09:59
Show Gist options
  • Save artyom/2818249 to your computer and use it in GitHub Desktop.
Save artyom/2818249 to your computer and use it in GitHub Desktop.
MAKEFLAGS = -j -s
HOSTGROUP1 = host1 host2 host3 host4
HOSTGROUP2 = host10 host11 host12
default:
echo available targets: all, hostgroup1, hostgroup2
all: $(HOSTGROUP1) $(HOSTGROUP2)
hostgroup1: $(HOSTGROUP1)
hostgroup2: $(HOSTGROUP2)
$(HOSTGROUP1) $(HOSTGROUP2): job
echo doing $@
for script in $? ; \
do ssh -A $@ sh -e < $$script 2>&1 >> $@.log ; done
mv $@.log $@
.PHONY: clean all default hostgroup1 hostgroup2
clean:
rm -f $(HOSTGROUP1) $(HOSTGROUP2) *.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment