[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] Remote fabfile
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] Remote fabfile |
Date: |
Wed, 1 Oct 2014 12:12:01 -0700 |
There's no way to do this built in (nor do I see it as necessarily
being worth the development effort offhand - feels like a niche use
case and prioritzation is unfortunately a thing), but the first thing
that springs to mind is using shell tools like zsh's temporary-file
support, e.g.:
$ fab -H <target> -f =(curl
https://raw.githubusercontent.com/<user>/<repo>/<ref>/fabfile.py)
task:<params>
Where '=(<command>)' creates a local temporary file containing the
stdout of <command>, then expands into that temporary filename.
Presumably bash 4 and other common shells also offer something like
this.
You could also use Python for this, though it'd be more work - e.g.
have a setup task that performs the download, calls __import__ on the
temp file, then hands the resulting module object to Fabric's CLI
functions.
On Tue, Sep 30, 2014 at 4:52 PM, Irving Rabin <address@hidden> wrote:
> Folks, I am new to Fabric and I have written quite a complicated fabfile.py
> script. It is used to install a product. The script resides along with a
> product on a Github. I don't want to clone the whole product to the local
> machine, so my question is simple - can I provide a network address of
> fabfile to fab command, something like this:
>
> fab -H <host-name> -f address@hidden:<my-repository>/<path>/<filename>
> task:<parms>
>
> Pretty much any elegant idea of getting just a single file should suffice.
> But providing a network path for this file would be probably the best
> solution.
>
> Thanks,
> Irv Rabin
>
> _______________________________________________
> Fab-user mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/fab-user
>
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org
- Re: [Fab-user] Remote fabfile,
Jeff Forcier <=