Wawrzek Niewodniczanski
2014-10-03 09:37:08 UTC
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
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: ***@wawrzek.name
Linux User #177124
Dr Wawrzyniec Niewodniczański or Wawrzek for short
PhD in Quantum Chemistry & MSc in Molecular Engineering
WWW: http://wawrzek.name E-MAIL: ***@wawrzek.name
Linux User #177124