On Wed, Oct 1, 2014 at 2:12 PM, Jeff Forcier <[email protected]> wrote:
> 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. > Bash does, though I can't recall offhand how to do it exactly. IIRC it's pretty similar to zsh, but my memory is notoriously faulty. > 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. > You might check out Plumbum: https://pypi.python.org/pypi/plumbum I think it would be fairly easy to rig something up with it. > > On Tue, Sep 30, 2014 at 4:52 PM, Irving Rabin <[email protected]> > 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 [email protected] > :<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 > > [email protected] > > https://lists.nongnu.org/mailman/listinfo/fab-user > > > > > > -- > Jeff Forcier > Unix sysadmin; Python/Ruby engineer > http://bitprophet.org > > _______________________________________________ > Fab-user mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/fab-user > -- -- Kevin Horn
_______________________________________________ Fab-user mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/fab-user
