The below requirements are needed on the host that executes this module.
Parameter | Choices/Defaults | Comments |
---|---|---|
config (added in 1.3) | The supervisor configuration file path | |
name required | 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) | password to use for authentication | |
server_url (added in 1.3) | URL on which supervisord server is listening | |
state required |
| The desired state of program/group. |
supervisorctl_path (added in 1.4) | path to supervisorctl executable | |
username (added in 1.3) | username to use for authentication |
Note
state
= present, the module will call supervisorctl reread
then supervisorctl add
if the program/group does not exist.state
= restarted, the module will call supervisorctl update
then call supervisorctl restart
.state
= absent, the module will call supervisorctl reread
then supervisorctl remove
to remove the target program/group.# 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
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/modules/supervisorctl_module.html