mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 19:10:07 -03:30
Merge pull request #5572 from jaredevantabor/host-event-stdout
fixing module_name check and adding support for the debug module
This commit is contained in:
commit
d72c79fb26
@ -52,7 +52,7 @@
|
||||
// grab standard out & standard error if present from the host
|
||||
// event's "res" object, for things like Ansible modules
|
||||
try{
|
||||
$scope.module_name = hostEvent.event_data.res.invocation.module_name || hostEvent.event_data.res.task_action || "No result found";
|
||||
$scope.module_name = hostEvent.event_data.res.invocation.module_name || hostEvent.event_data.task_action || "No result found";
|
||||
$scope.stdout = hostEvent.event_data.res.stdout;
|
||||
$scope.stderr = hostEvent.event_data.res.stderr;
|
||||
$scope.json = hostEvent.event_data.res;
|
||||
@ -60,6 +60,11 @@
|
||||
catch(err){
|
||||
// do nothing, no stdout/stderr for this module
|
||||
}
|
||||
if($scope.module_name === "debug" &&
|
||||
hostEvent.event_data.res.hasOwnProperty('result') &&
|
||||
hostEvent.event_data.res.result.hasOwnProperty('stdout')){
|
||||
$scope.stdout = hostEvent.event_data.res.result.stdout;
|
||||
}
|
||||
if($scope.module_name === "yum" &&
|
||||
hostEvent.event_data.res.hasOwnProperty('results') &&
|
||||
_.isArray(hostEvent.event_data.res.results)){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user