2015-01-14 52 views

回答

1

Ansible本身不会让你这样做。但Ansible Tower(他们的商业产品)允许您执行各种与Ansible有关的任务,包括通过REST界面运行剧本等。

+0

您还可以将Ansible包装在系统中,如Rundeck,并使用该API来触发Ansible作业。如果有帮助的话,Rundeck是免费的;) – PhillipHolmes

0

You can see the source code here,这显示了剧本被假定为本地:

if not os.path.exists(playbook): 
    raise errors.AnsibleError("the playbook: %s could not be found" % playbook) 
if not (os.path.isfile(playbook) or stat.S_ISFIFO(os.stat(playbook).st_mode)): 
     raise errors.AnsibleError("the playbook: %s does not appear to be a file" % playbook) 

Here's the documentation on Python's os.path,可见是为本地文件。

相关问题