1
我正在尝试Matt Wright的Ansible Tutorial。我已经分叉并更新了最新的Ansible模块here。(无此过程),同时通过Ansible部署应用程序
但是我却越来越
msg: hello_flask: ERROR (no such process)
而在-name: start app
运行deploy.yml
。我在github上有一个开放的问题here。
为什么我得到这个错误?
我正在尝试Matt Wright的Ansible Tutorial。我已经分叉并更新了最新的Ansible模块here。(无此过程),同时通过Ansible部署应用程序
但是我却越来越
msg: hello_flask: ERROR (no such process)
而在-name: start app
运行deploy.yml
。我在github上有一个开放的问题here。
为什么我得到这个错误?
所以你看到的错误,因为supervisor没有找到hello_flask
应用程序。
这可能是因为你有一个supervisor的新配置,它不包括ini
文件。
如果你看看其中最新的/etc/supervisor/supervisor.conf
它实际上包含*.conf
文件而不是*.ini
文件。
[include]
files = /etc/supervisor/conf.d/*.conf
另外,如果你看看这个Ansible任务:
- name: create supervisor program config
action: template src=templates/supervisor.ini dest=/etc/supervisor/${app_name}.ini
notify:
- restart app
你可以看到,hello_flash
配置被/etc/supervisor/hello_flash.ini
下把所以确保无论您supervisor.conf
包括*.ini
文件。或者简单地将此步骤更改为:
- name: create supervisor program config
action: template src=templates/supervisor.ini dest=/etc/supervisor/conf.d/${app_name}.conf
notify:
- restart app
希望它有帮助。
在Ansible剧本的哪一点是失败?在发生错误之前运行了哪些任务 – Rico
@Rico我在问题中提到,而在名称上运行deploy.yml:start app –