in src/module_utils/get_cluster_status.py [0:0]
def _get_stonith_action(self) -> None:
"""
Retrieves the stonith action from the system.
"""
self.result["stonith_action"] = "unknown"
try:
stonith_action = self.execute_command_subprocess(STONITH_ACTION[self.ansible_os_family])
actions = [
"reboot",
"poweroff",
"off",
]
for action in actions:
if action in stonith_action:
self.result["stonith_action"] = action
break
except Exception as ex:
self.log(logging.WARNING, f"Failed to get stonith action: {str(ex)}")