fab-user
[Top][All Lists]
Advanced

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

Re: [Fab-user] Fabric question


From: Brandon Whaley
Subject: Re: [Fab-user] Fabric question
Date: Sat, 10 Sep 2016 18:40:33 +0000

Hi Bogdan, you have to have fabric on the remote system to import fabric from a python file.  If you don't want to do this globally on the system, just set up a virtualenv as your user.  There are plenty of tutorials for using virtualenv online.

On Sat, Sep 10, 2016 at 2:13 PM Carlos García <address@hidden> wrote:

Hi Bogdan

You should put the function in the fabfile.py. Anyway, if your script imports fabric, then you need to install fabric in the target machines, or refactor it. Take a look to virtualenv if you really need to install fabric on remote machines.

El 10/9/2016 7:01 p. m., "Bogdan" <address@hidden> escribió:

>

> where is this function located, do I need to add any additional files to my project, my project has only 1 file in it. Im sure I need to add fabric library to my project folder so i can run my script using fabric on different linux boxes.
>
> On Sat, Sep 10, 2016 at 9:55 AM, Carlos García <address@hidden> wrote:

>>

>> Hi, you can pass the contents of the script file as a parameter to this function
>>
>> def run_python(script):
>>    return run("echo -e '{contents}' | python".format(contents=script))
>>
>> Then you can call it like this:
>>
>> fab run_python:'$(cat script.py)' -H hostname
>>
>>
>> El 10/9/2016 6:09 p. m., "santosh kumar" <address@hidden> escribió:

>>>

>>> * U can use the put function to dump the Python file in all systems.
>>> * Later run in using another function.
>>>
>>> We don't need fabric on all nodes. Make sure ssh is enabled.
>>>
>>>
>>> On Sep 10, 2016 15:31, "bohdan kalytovskyy" <address@hidden> wrote:

>>>>

>>>> Need to run python  script with fabric on multiple computers with out installing fabric on all of them, how can I achieve that?
>>>>
>>>> Thank you.
>>>> _______________________________________________
>>>> Fab-user mailing list
>>>> address@hidden
>>>> https://lists.nongnu.org/mailman/listinfo/fab-user
>>>
>>>
>>>
>>> _______________________________________________
>>> Fab-user mailing list
>>> address@hidden
>>> https://lists.nongnu.org/mailman/listinfo/fab-user
>>>
>

_______________________________________________
Fab-user mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/fab-user

reply via email to

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