|
|
@ -35,7 +35,8 @@ import re
|
|
|
|
import stat
|
|
|
|
import stat
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
import threading
|
|
|
|
import threading
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
|
|
import mitogen.core
|
|
|
|
|
|
|
|
|
|
|
|
# Prevent accidental import of an Ansible module from hanging on stdin read.
|
|
|
|
# Prevent accidental import of an Ansible module from hanging on stdin read.
|
|
|
|
import ansible.module_utils.basic
|
|
|
|
import ansible.module_utils.basic
|
|
|
@ -76,7 +77,10 @@ def monkey_exit_json(self, **kwargs):
|
|
|
|
kwargs.setdefault('invocation', {
|
|
|
|
kwargs.setdefault('invocation', {
|
|
|
|
'module_args': self.params
|
|
|
|
'module_args': self.params
|
|
|
|
})
|
|
|
|
})
|
|
|
|
kwargs = ansible.module_utils.basic.remove_values(kwargs, self.no_log_values)
|
|
|
|
kwargs = ansible.module_utils.basic.remove_values(
|
|
|
|
|
|
|
|
kwargs,
|
|
|
|
|
|
|
|
self.no_log_values
|
|
|
|
|
|
|
|
)
|
|
|
|
self.do_cleanup_files()
|
|
|
|
self.do_cleanup_files()
|
|
|
|
raise Exit(kwargs)
|
|
|
|
raise Exit(kwargs)
|
|
|
|
|
|
|
|
|
|
|
@ -91,7 +95,10 @@ def monkey_fail_json(self, **kwargs):
|
|
|
|
kwargs.setdefault('invocation', {
|
|
|
|
kwargs.setdefault('invocation', {
|
|
|
|
'module_args': self.params
|
|
|
|
'module_args': self.params
|
|
|
|
})
|
|
|
|
})
|
|
|
|
kwargs = ansible.module_utils.basic.remove_values(kwargs, self.no_log_values)
|
|
|
|
kwargs = ansible.module_utils.basic.remove_values(
|
|
|
|
|
|
|
|
kwargs,
|
|
|
|
|
|
|
|
self.no_log_values
|
|
|
|
|
|
|
|
)
|
|
|
|
self.do_cleanup_files()
|
|
|
|
self.do_cleanup_files()
|
|
|
|
raise ModuleError(kwargs.get('msg'), kwargs)
|
|
|
|
raise ModuleError(kwargs.get('msg'), kwargs)
|
|
|
|
|
|
|
|
|
|
|
|