Пример #1
0
def module_result_changed(request):
    return ModuleResult(
        **{
            'changed': True,
            'end': '2016-06-17 21:32:54.877597',
            '_ansible_no_log': False,
            'stdout': 'Fri Jun 17 21:32:54 EDT 2016',
            'cmd': ['date'],
            'rc': 0,
            'start': '2016-06-17 21:32:54.873429',
            'stderr': '',
            'delta': '0:00:00.004168',
            'invocation': {
                'module_name': 'command',
                'module_args': {
                    'creates': None,
                    'executable': None,
                    '_uses_shell': False,
                    '_raw_params': 'date',
                    'removes': None,
                    'warn': True,
                    'chdir': None
                }
            },
            'stdout_lines': ['Fri Jun 17 21:32:54 EDT 2016'],
            'warnings': []
        })
Пример #2
0
def module_result_failed():
    return ModuleResult(
        **{
            'invocation': {
                'module_name': u'fail',
                'module_args': {}
            },
            'failed': True,
            'changed': False,
            '_ansible_no_log': False,
            'msg': u'Failed as requested from task'
        })
Пример #3
0
def module_result_ok(request):
    return ModuleResult(
        **{
            'invocation': {
                'module_name': u'debug',
                'module_args': {
                    'msg': u'testing'
                }
            },
            'msg': u'testing',
            'changed': False,
            '_ansible_verbose_always': True,
            '_ansible_no_log': False
        })