fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Populating env.hosts?


From: address@hidden
Subject: [Fab-user] Populating env.hosts?
Date: Mon, 7 Feb 2011 12:00:28 +0200

Hi

Anyone have any idea why this does not work? If I print env.hosts out,
all the ip's are there perfectly. For example : env.hosts
['192.168.1.1', '192.168.1.2', '192.168.1.3']

However when I run my fabric script, I get

No hosts found. Please specify (single) host string for connection:

def servers():

"""
servers()

Gets a list of servers to populate env.hosts.
"""

env.hosts = []

for server_name in config.options('Servers'):
    ip_address = config.get('Servers', server_name)
    env.hosts.append(ip_address)

print "env.hosts %s" % env.hosts
env.user = 'deployboy'
env.key_filename = [ './secret.pem' ]
run('hostname')

End - servers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]