多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
## [supervisorctl][1] ~~~ # Manage the state of program to be in 'started' state. - supervisorctl: name: my_app state: started # Manage the state of program group to be in 'started' state. - supervisorctl: name: 'my_apps:' state: started # Restart my_app, reading supervisorctl configuration from a specified file. - supervisorctl: name: my_app state: restarted config: /var/opt/my_project/supervisord.conf # Restart my_app, connecting to supervisord with credentials and server URL. - supervisorctl: name: my_app state: restarted username: test password: testpass server_url: http://localhost:9001 ~~~ ## state When state = present, the module will call supervisorctl reread then supervisorctl add if the program/group does not exist. When state = restarted, the module will call supervisorctl update then call supervisorctl restart. ~~~ present started stopped restarted absent ~~~ [1]:http://docs.ansible.com/ansible/latest/modules/supervisorctl_module.html#supervisorctl-module