Hi there, You'll also need to define env.host_string for each of your host. Fabric automatically populate it when called from command line but not within a python script.
Regards, Xavier. Le 7 févr. 2011 à 11:00, [email protected] a écrit : > 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 > > _______________________________________________ > Fab-user mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/fab-user _______________________________________________ Fab-user mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/fab-user
