mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
centralized TERM signal handling
This commit is contained in:
@@ -22,7 +22,6 @@ __metaclass__ = type
|
||||
import getpass
|
||||
import locale
|
||||
import os
|
||||
import signal
|
||||
import sys
|
||||
|
||||
from ansible.compat.six import string_types
|
||||
@@ -69,8 +68,6 @@ class PlaybookExecutor:
|
||||
may limit the runs to serialized groups, etc.
|
||||
'''
|
||||
|
||||
signal.signal(signal.SIGTERM, self._terminate)
|
||||
|
||||
result = 0
|
||||
entrylist = []
|
||||
entry = {}
|
||||
@@ -207,10 +204,6 @@ class PlaybookExecutor:
|
||||
|
||||
return result
|
||||
|
||||
def _terminate(self, signum=None, framenum=None):
|
||||
display.debug("Termination signal detected, shutting down gracefully")
|
||||
raise SystemExit
|
||||
|
||||
def _get_serialized_batches(self, play):
|
||||
'''
|
||||
Returns a list of hosts, subdivided into batches based on
|
||||
|
||||
Reference in New Issue
Block a user