|
From: | Carlos García |
Subject: | Re: [Fab-user] problem with host_string/hosts (no hosts found) |
Date: | Fri, 3 Oct 2014 12:00:53 +0200 |
@hosts('localhost)def test():print "Hosts:", env['hosts']print "Host_string", env['host_string']run('uname -a')
Hi,
For quite a long time I've been using various fabric based scripts.
Recently I hit very strange problem. Following short script
illustrates my issue.
#!/usr/bin/env python
import fabric
from fabric.api import env, run
env.hosts = ['localhost']
def test():
print "Hosts:", env['hosts']
print "Host_string", env['host_string']
run('uname -a')
test()
And when I run It I got:
#>./fabric-min.py
Hosts: ['localhost']
Host_string None
No hosts found. Please specify (single) host string for connection: localhost
[localhost] run: uname -a
I copied content to fabfile.py and got the same:
#>fab test
Hosts: ['localhost']
Host_string None
No hosts found. Please specify (single) host string for connection: ^C
Stopped.
What do I do wrong?
I run my tests at Ubuntu 14.04 LTS with
Python 2.7.6
Fabric 1.8.2
Paramiko 1.10.1
Thanks,
Wawrzek
--
Dr Wawrzyniec Niewodniczański or Wawrzek for short
PhD in Quantum Chemistry & MSc in Molecular Engineering
WWW: http://wawrzek.name E-MAIL: address@hidden
Linux User #177124
_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user
[Prev in Thread] | Current Thread | [Next in Thread] |