From cc7e0083b847c3a3f4aad9715c9188235bf6cd80 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 9 Nov 2025 09:52:45 +0100 Subject: [PATCH] [PR #11057/0d8521c7 backport][stable-10] supervisorctl: investigate integration tests (#11063) supervisorctl: investigate integration tests (#11057) * supervisorctl: investigate integration tests * wait for supervisord to complete stop * adjust in module (cherry picked from commit 0d8521c71836c4958f582e56f75de036e163f8cb) Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com> --- plugins/modules/supervisorctl.py | 3 ++- .../targets/supervisorctl/tasks/stop_supervisord.yml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/modules/supervisorctl.py b/plugins/modules/supervisorctl.py index 7df1674fea..c1c4417059 100644 --- a/plugins/modules/supervisorctl.py +++ b/plugins/modules/supervisorctl.py @@ -61,7 +61,7 @@ options: signal: type: str description: - - The signal to send to the program/group, when combined with the 'signalled' state. Required when l(state=signalled). + - The signal to send to the program/group, when combined with the V(signalled) state. Required when l(state=signalled). supervisorctl_path: type: path description: @@ -116,6 +116,7 @@ EXAMPLES = r""" state: restarted """ + import os from ansible.module_utils.basic import AnsibleModule, is_executable diff --git a/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml b/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml index 52e064d153..0464fcd0c3 100644 --- a/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml +++ b/tests/integration/targets/supervisorctl/tasks/stop_supervisord.yml @@ -5,3 +5,10 @@ - name: stop supervisord command: "supervisorctl -c {{ remote_dir }}/supervisord.conf {% if credentials.username %}-u {{ credentials.username }} -p {{ credentials.password }}{% endif %} shutdown" + +- name: wait_for supervisord to stop + ansible.builtin.wait_for: + port: 9001 + host: 127.0.0.1 + timeout: 15 + state: stopped