1

I have been working on python fabric module. Currently I have written a fabfile to invoke a remote bash script on a remote server. However id doesnt seem to work.

My fabfile looks like this:-

from fabric.api import *

env.hosts=['some-host']
env.user="root"

def deploy():
    run("/home/hduser/test.sh")

It executes test.sh on the remote host.The script is a simple bash script which looks like this

#!/bin/bash

echo "fabric works" >> out.txt

However even though fabric returns a 0 success code I cannot see out.txt file appended with fabric works

Am I missing something here.

1 Answer 1

1

I think you are looking in wrong directory, out.txt file is probably in the home directory of root.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.