[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: |
Fri, 3 Oct 2014 13:32:58 +0100 |
Hi,
Based on page [1]
#!/usr/bin/env python
import fabric
from fabric.api import env, run, settings
env.hosts = ['localhost']
def test():
for host in env.hosts:
with settings(host_string=host):
run('uname -a')
test()
Now it works. Not exactly what I wanted, but it can give me new possibilities.
Wawrzek
[1]
http://stackoverflow.com/questions/6741523/using-python-fabric-without-the-command-line-tool-fab
--
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