fabric Questions

5

Solved

When I run this fabfile.py... from fabric.api import env, run, local, cd def setenv(foo): env.hosts = ['myhost'] def mycmd(foo): setenv(foo) print(env.hosts) run('ls') with this command fa...
Briant asked 31/1, 2012 at 6:30

3

Solved

I have been using fabric and recently got told about invoke, so I took a look at it's documentation: Like Ruby’s Rake tool and Invoke’s own predecessor Fabric 1.x, it provides a clean, high lev...
Orosco asked 20/2, 2014 at 1:19

1

I'm updating some code that previously ran on Fabric v1 and worked fine. However now I'm encountering a problem when trying to transfer a file ~200MB in size from local to remote (using, in fabric ...
Spur asked 11/12, 2019 at 17:3

3

Solved

I am trying to execute a script on a remote host using a detached screen session. I tried out the example Fabric gives and unfortunately couldn't get it to work. from fabric.api import run def ye...
Sororate asked 14/1, 2013 at 22:7

4

Solved

I have an app(django-compressor) that I only want to run on my local machine and not the server. I know about the try: from local_settings import * except ImportError: pass trick. But I was ...
Pella asked 22/2, 2012 at 9:54

5

Solved

I would like a way to update my password on a remote Ubuntu 10.4 box with fabric. I would expect my fabfile.py would look something like this: def update_password(old_pw, new_pw): # Connects ove...
Horvitz asked 20/6, 2010 at 19:11

5

Solved

Firstly I tried to get fabric working, but it kept asking me for a password. So I'm trying to reduce the problem. Perhaps it would be a good POC to just create a SSH connection from Python. I disc...
Dorthydortmund asked 23/3, 2012 at 17:29

4

Solved

I'm having an odd problem while deploying a Django site using Fabric. I've configured two servers to use key files for login. I can SSH into both without a password. I can run fab on one correctly,...
Indigested asked 11/4, 2012 at 6:41

2

Solved

I have a nat and it has various server So from my local server I want to go to nat and then from nat i have to ssh to other machines Local-->NAT(abcuser@publicIP with key 1)-->server1(xyzuser@loca...
Hayleyhayloft asked 18/12, 2013 at 12:58

5

Solved

How can I pass a parameter to a fabric task when calling "fab" from the command line? For example: def task(something=''): print "You said %s" % something $ fab task "hello" You said hello Don...
Ambuscade asked 22/1, 2012 at 11:40

4

Solved

The website says: Closing connections: Fabric’s connection cache never closes connections itself – it leaves this up to whatever is using it. The fab tool does this bookkeeping for you: it ...
Iggy asked 2/8, 2010 at 22:34

2

Solved

I have a fabfile (fabfile.py) with some tasks declared: # fabfile.py from fabric.api import * @task def start(): # code @task def stop(): # code Then when I try to call any of those tasks us...
Engaging asked 12/5, 2014 at 9:28

8

I have the following simple fabfile.py from the docs: from fabric.api import run def host_type(): run('uname -s') I try to run it using: fab -H 192.168.0.201 host_type But get the error: m...
Harrell asked 9/3, 2011 at 13:23

3

Solved

I have a directory on my local machine that I would like to copy to a remote machine (and rename it) using Fabric. I know I can copy file using put(), but what about a directory. I know it's easy e...
Demott asked 15/3, 2011 at 16:23

7

Solved

This question is about best practices. I'm running a deployment script with Fabric. My deployment user 'deploy' needs sudo to restart services. So I am using the sudo function from fabric to run th...
Kaliningrad asked 18/12, 2012 at 23:43

2

Solved

I'm wondering what is the difference between the function sudo() and the function run('sudo -u user smth') On the doc there is : sudo is identical in every way to run, except that it will alwa...
Louls asked 13/7, 2016 at 7:25

2

I'm trying to connect to host and run command with module Fabric 2 and have this error: Traceback (most recent call last): File "Utilities/fabfile.py", line 4, in <module> res.run('uname -...
Winona asked 5/6, 2018 at 23:8

2

Solved

Assuming I define a trivial task to list files on a remote server: from fabric.api import run, env env.use_ssh_config = True def list_files(): run('ls') And I execute it with: fab -H server ...
Millham asked 23/4, 2012 at 12:56

10

Solved

Through Fabric, I am trying to start a celerycam process using the below nohup command. Unfortunately, nothing is happening. Manually using the same command, I could start the process but not throu...
Elixir asked 8/1, 2012 at 5:26

5

I am trying to run some Django management commands via Fabric on my staging server. The problem is it seems Fabric is not able to activate the virtualenv and thus using system python/libs when ex...
Fulmar asked 9/5, 2011 at 8:33

3

Solved

I have to write test for deployment script which uploads files through SSH, but I'd like to have it not depending on external servers configuration. This is how i see it: Create 2 SSH daemons wit...
Disturbing asked 6/7, 2010 at 12:56

1

Solved

This is my fabric code: from fabric import Connection, task server = Connection(host="[email protected]:22", connect_kwargs={"password": "mypassword"}) @task def dostuff(somethingmustbehere...
Minda asked 15/10, 2018 at 18:42

2

I just installed Python 3.7 and Fabric. It works perfectly on my laptop, but not on my desktop. The error : Traceback (most recent call last): File "C:\Program Files (x86)\Python37-32\lib\runpy....
Paleolithic asked 16/10, 2018 at 19:14

1

Solved

After updated Fabric from 1.4 to 2.4, fab -f <file_path>.<fabfile>.py isn't working anymore. It always throws the error Can't find any collection named 'fabfile'! From fab --help, it st...
Lotte asked 28/9, 2018 at 0:49

2

Solved

So there are variants of this question - but none quite hit the nail on the head. I want to run spyder and do interactive analysis on a server. I have two servers , neither have spyder. They both h...
Bahia asked 11/9, 2018 at 20:9

© 2022 - 2024 — McMap. All rights reserved.