fab-user
[Top][All Lists]
Advanced

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

[Fab-user] can't populate env.hosts and env.user


From: chris templin
Subject: [Fab-user] can't populate env.hosts and env.user
Date: Mon, 20 Dec 2010 14:21:22 -0500

Hello,
I'm having a problem with populating the env variables. Here's my situation with some psuedo code. Help appreciated.

Current command-line which works fine:
> fab -f fab.py site_one deploy

Methods in fab.py:
def host_1():
    env.hosts.append('address@hidden')

def site_one():
    host_1()

deploy() is defined in a different file.

So far so good. Now, I'm trying to create a new method in fab.py that is equivalent to this command line:

def deploy_and_more():
    site_one()
    deploy()
    ...

When I run this:
> fab -f fab.py deploy_and_more
the username 'user' is not properly extracted from the env.host (since env.host = []) and therefore deploy fails.

Am I off base in my assumption that these two techniques should be equivalent?

thanks very much,
Chris   



reply via email to

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