From c448d8731b152f02bb26f784bc35a3711a7ef0a4 Mon Sep 17 00:00:00 2001 From: Samuel Clay Date: Fri, 23 Aug 2013 17:29:32 -0700 Subject: [PATCH] Fixing unknown host error on DO servers. --- fabfile.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fabfile.py b/fabfile.py index 64998e66a..90656a0b4 100644 --- a/fabfile.py +++ b/fabfile.py @@ -14,6 +14,7 @@ import os import time import sys import re + try: import dop.client except ImportError: @@ -439,6 +440,7 @@ def setup_supervisor(): @parallel def setup_hosts(): put(os.path.join(env.SECRETS_PATH, 'configs/hosts'), '/etc/hosts', use_sudo=True) + sudo('echo "\n\n127.0.0.1 `hostname`" >> /etc/hosts') def config_pgbouncer(): put('config/pgbouncer.conf', '/etc/pgbouncer/pgbouncer.ini', use_sudo=True)