@ -28,6 +28,7 @@
from __future__ import absolute_import
from __future__ import absolute_import
import commands
import commands
import logging
import os
import os
import pwd
import pwd
import shutil
import shutil
@ -52,6 +53,9 @@ import ansible_mitogen.helpers
from ansible . module_utils . _text import to_text
from ansible . module_utils . _text import to_text
LOG = logging . getLogger ( __name__ )
def get_command_module_name ( module_name ) :
def get_command_module_name ( module_name ) :
"""
"""
Given the name of an Ansible command module , return its canonical module
Given the name of an Ansible command module , return its canonical module
@ -157,6 +161,7 @@ class ActionModuleMixin(ansible.plugins.action.ActionBase):
if stdout :
if stdout :
dct [ ' stdout ' ] = repr ( rc )
dct [ ' stdout ' ] = repr ( rc )
except mitogen . core . CallError :
except mitogen . core . CallError :
LOG . exception ( ' While emulating a shell command ' )
dct [ ' rc ' ] = 1
dct [ ' rc ' ] = 1
dct [ ' stderr ' ] = traceback . format_exc ( )
dct [ ' stderr ' ] = traceback . format_exc ( )