Manage the state of a program or group of programs running via supervisord
- supervisorctl
| parameter | required | default | choices | comments |
|---|---|---|---|---|
| config (added in 1.3) |
no | The supervisor configuration file path | ||
| name |
yes | The name of the supervisord program or group to manage. The name will be taken as group name when it ends with a colon : Group support is only available in Ansible version 1.6 or later. | ||
| password (added in 1.3) |
no | password to use for authentication | ||
| server_url (added in 1.3) |
no | URL on which supervisord server is listening | ||
| state |
yes |
|
The desired state of program/group. | |
| supervisorctl_path (added in 1.4) |
no | path to supervisorctl executable | ||
| username (added in 1.3) |
no | username to use for authentication |
# 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
Note
When state = present, the module will call supervisorctl reread then supervisorctl add if the program/group does not exist.
Note
When state = restarted, the module will call supervisorctl update then call supervisorctl restart.
For more information on what this means please read Core Modules
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.