HOSTS=nodes.txt ALIVES=alive.txt USER=irisaple_pacemaker2 SSH_CONFIG=ssh_config OPTIONS=-x "-F $(SSH_CONFIG)" FOPTIONS=$(OPTIONS) -h $(ALIVES) .PHONY: alive deploy clean pink nuke $(ALIVES) alive: pssh $(OPTIONS) -h $(HOSTS) 'python2 --version 2>&1 | grep -E "(2\.6|2\.7)"'\ | grep "\[SUCCESS\]"\ | awk '{print $$4}' > $(ALIVES) deploy_libs: requests deploy_client: lastfm.py process.py deploy_client deploy_libs: $(ALIVES) psshscp $(FOPTIONS) -r $(filter-out $(ALIVES), $+) /home/$(USER) touch $@ deploy: deploy_client deploy_libs clean: pssh $(OPTIONS) -h $(HOSTS) "rm -f *.txt; rm -f *.out" distclean: rm -f alive.txt deploy_client deploy_libs ping: $(ALIVES) pssh $(FOPTIONS) 'python2 --version 2>&1 | grep -E "(2\.6|2\.7)"' nuke: pnuke $(OPTIONS) -h $(HOSTS) "python"