2016-03-17 75 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

相关问题