Callbacks¶
If the callback_url was set when making the original request, LSO will return the output of the Ansible playbook run
to this URL.
Code Documentation¶
lso.tasks.playbook_finished_handler_factory
playbook_finished_handler_factory(callback: str | None, job_id: str) -> Callable[[Runner], None] | None
Once Ansible runner is finished, it will call back to the specified URL in the original request.
Args: callback (str, optional): The callback URL that the Ansible runner should report to. job_id (str): The job ID of this playbook run, used for reporting.
Returns: A handler method that sends one request to the callback URL.
Raises: CallbackFailedError: If the callback to the external system has failed.
Source code in .venv/lib/python3.12/site-packages/lso/tasks.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | |