2016-03-17 73 views
0

我對於ansible很新穎。我能夠創建可安裝的腳本來安裝rpm和deb包。但是我沒有找到任何示例來運行和安裝.bin文件 這個想法是觸發安裝在本地下載文件夾中的.bin文件。在linux中運行使用ansible的.bin可執行文件

這可能嗎? 我已經試過這樣

- file: path=$HOME/Downloads/Xplorer-6.0.1-linux-installer.bin state=touch mode="u=rwx,g=rx,o=rx" 

- expect: 
    command: $HOME/Downloads/Xplorer-6.0.1-linux-installer.bin 
    responses: 
     Question: Do you accept this license? [y/n] 
     - response: y 
+0

@ydaetskcoR:用我試過的東西更新了我的問題。 – Ubuntuser

回答

0

我想你可以使用「script」模塊。它的工作原理是:

- script: /some/local/bin_file.bin --some-arguments 1234 creates=/the/created/file.txt

的創建參數是可選的,並且只用,如果你需要保證冪等

+0

謝謝。我已經更新了我的問題。我會嘗試你的方法 – Ubuntuser

相關問題