supervisorctl – Manage the state of a program or group of programs running via supervisord¶
Requirements¶
The below requirements are needed on the host that executes this module.
- supervisorctl
Parameters¶
Notes¶
Note
- When state= present, the module will callsupervisorctl rereadthensupervisorctl addif the program/group does not exist.
- When state= restarted, the module will callsupervisorctl updatethen callsupervisorctl restart.
- When state= absent, the module will callsupervisorctl rereadthensupervisorctl removeto remove the target program/group.
Examples¶
# 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
# Send a signal to my_app via supervisorctl
- supervisorctl:
    name: my_app
    state: signalled
    signal: USR1
Status¶
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors¶
- Matt Wright (@mattupstate)
- Aaron Wang (@inetfuture) <inetfuture@gmail.com>
Hint
If you notice any issues in this documentation, you can edit this document to improve it.
