@@ -0,0 +1,666 @@
+#!/usr/bin/env python%0A%0Aimport utils%0Aimport subprocess%0A%0Aprint %22Gathering internal & external IP addresses from Vagrant...%22%0A%0Ainstances = %5B%5D%0Afor n in range(1, 2):%0A    command = %22vagrant ssh-config node%25d 2%3E/dev/null %7Cgrep HostName%22 %25 (n,)%0A    result = subprocess.check_output(command, shell=True)%0A    externalIP = result.split()%5B1%5D%0A    result = utils.runSSH(externalIP, %5B%22ifconfig%22%5D)%0A    internalIP = result.split(%22%5Cn%22)%5B1%5D.split()%5B1%5D.split(%22:%22)%5B1%5D%0A    instances.append((externalIP, internalIP))%0A%0A# node1 is, according to the Vagrantfile, where the control service gets%0A# started%0AmasterExternal, masterInternal = instances%5B0%5D%0Autils.pushConfig(masterExternal, instances)%0A

save new file