community.general.supervisorctl – Manage the state of a program or group of programs running via supervisord¶
Note
This plugin is part of the community.general collection (version 2.5.1).
To install it use: ansible-galaxy collection install community.general
.
To use it in a playbook, specify: community.general.supervisorctl
.
Requirements¶
The below requirements are needed on the host that executes this module.
supervisorctl
Parameters¶
Notes¶
Note
When
state
= present, the module will callsupervisorctl reread
thensupervisorctl add
if the program/group does not exist.When
state
= restarted, the module will callsupervisorctl update
then callsupervisorctl restart
.When
state
= absent, the module will callsupervisorctl reread
thensupervisorctl remove
to remove the target program/group.
Examples¶
- name: Manage the state of program to be in started state
community.general.supervisorctl:
name: my_app
state: started
- name: Manage the state of program group to be in started state
community.general.supervisorctl:
name: 'my_apps:'
state: started
- name: Restart my_app, reading supervisorctl configuration from a specified file
community.general.supervisorctl:
name: my_app
state: restarted
config: /var/opt/my_project/supervisord.conf
- name: Restart my_app, connecting to supervisord with credentials and server URL
community.general.supervisorctl:
name: my_app
state: restarted
username: test
password: testpass
server_url: http://localhost:9001
- name: Send a signal to my_app via supervisorctl
community.general.supervisorctl:
name: my_app
state: signalled
signal: USR1
Authors¶
Matt Wright (@mattupstate)
Aaron Wang (@inetfuture) <inetfuture@gmail.com>