fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] problem with host_string/hosts (no hosts found)


From: Wawrzek Niewodniczanski
Subject: Re: [Fab-user] problem with host_string/hosts (no hosts found)
Date: Thu, 20 Nov 2014 21:11:52 +0000

On 3 October 2014 10:37, Wawrzek Niewodniczanski <address@hidden> wrote:
> 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:
>
I found the bug.
The line:
test()

should be:
execute(test)

and everything is fine!!!

Cheers.
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



reply via email to

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