1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

add the possibility to restart all supervisorctl programs and groups (#3598)

* add the possibility to restart all supervisorctl programs and groups

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update changelogs/fragments/3551-supervisor-all.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* add info about "all" in the name parameter description

Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>

* Update plugins/modules/web_infrastructure/supervisorctl.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
Thomas Sjögren 2021-10-31 18:36:12 +01:00 committed by GitHub
parent 96de25fc94
commit d6e14276c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
minor_changes:
- supervisorctl - add the possibility to restart all programs and program groups (https://github.com/ansible-collections/community.general/issues/3551).

View file

@ -21,6 +21,7 @@ options:
- The name of the supervisord program or group to manage.
- The name will be taken as group name when it ends with a colon I(:)
- Group support is only available in Ansible version 1.6 or later.
- If I(name=all), all programs and program groups will be managed.
required: true
config:
type: path
@ -92,6 +93,11 @@ EXAMPLES = '''
name: my_app
state: signalled
signal: USR1
- name: Restart all programs and program groups
community.general.supervisorctl:
name: all
state: restarted
'''
import os
@ -179,7 +185,7 @@ def main():
else:
continue
else:
if process_name != name:
if process_name != name and name != "all":
continue
matched.append((process_name, status))