fabric

    2熱度

    1回答

    我在a.py中有任務A,在b.py中是B,而任務B執行A,因此在b.py中有一個'import a'。 當我做'fab --list'時,我得到a.A,b.B和b.a.A.我怎樣才能避免fab列表中的b.a.A?謝謝。

    3熱度

    2回答

    我使用織物上的遠程窗口運行一些指令7系統執行遠程命令。而像我做了什麼: env.hosts=['192.168.91.235'] env.user='test' env.password='123456' def test_windows(): run("ifconfig",shell=False) pass 和它的作品爲「IPCONFIG」和輸出遠程系統的網絡IN

    1熱度

    1回答

    我想測試多個主機上的各種軟件包安裝。不同的主機有不同的密碼/ ssh-key。 我不想在我的fab文件中硬編碼主機名和它們的ssh-key。我怎樣才能通過終端命令行傳遞多個主機和他們的SSH密鑰。在我的晶圓廠文件 代碼看起來像 - from fabric.api import settings, run, env def test_installation(cmd): run

    0熱度

    1回答

    我使用fabric.tasks.execute在遠程服務器上執行命令,並且需要根據系統使用不同的shell。現在我的代碼是這樣的: def run_test(server_ip, server_shell): execute(test,server_ip,server_shell,host=server_ip) # host can be specified in execute arg

    2熱度

    1回答

    簡單的問題,但我找不到答案的任何地方,所有文章都是關於如何在結構腳本中運行cron。但是我怎樣才能在我的crontab上運行結構腳本?事情是這樣的: 00 00 * * * /project/folder/fab deploy

    5熱度

    3回答

    我正在使用Fabric並希望使用fexpect。我有以下Python腳本: from ilogue.fexpect import expect, expecting, run (...) def install_postgresql(profile): print("!!! Installing PostgreSQL...") print(' -> Doing pre-cleanup.

    7熱度

    2回答

    我知道通過使用-P switch或@parallel標籤,我可以在多臺主機上並行運行任務。 我想並聯同一主機上執行多長時間運行的任務: @task def task1(): # long running op @task def task2(): #long running op @task def task3(): #long running op

    1熱度

    1回答

    我試圖用布料「log_action」方法記載在這裏: http://docs.fabfile.org/en/1.6/usage/fab.html#per-task-arguments 但是看起來好像是「」 log_action」方法一直沒有執行。 面料1.8.2,1.12.3的paramiko from fabric.api import run from fabric.api import e

    9熱度

    1回答

    我有以下面料任務: def ssh_keygen(user, dir): env.user = user run("ssh-keygen %s" % dir) 我想打電話給它使用「執行」,但需要通過任務的參數。即用戶和dir execute(ssh_keygen('jbloggs', '/home/jbloggs'), hosts=["server1"]) 但是這不起作

    6熱度

    2回答

    我想用一些功能來擴展結構,並想以編程方式調用結構。 我想通過https://github.com/fabric/fabric/blob/master/fabric/main.py調用main()方法,但是我不能直接傳遞任何參數給函數,因爲它讀取函數中的參數。 任何想法以編程方式設置命令行參數和調用main()?