diff --git a/action.yml b/action.yml index b11eac6..d30ddbf 100644 --- a/action.yml +++ b/action.yml @@ -32,10 +32,8 @@ inputs: description: Set to "true" if root is required for running your playbook required: false outputs: - stdout: - description: The captured output of stdout from the Ansible Playbook run - stderr: - description: The captured output of stderr from the Ansible Playbook run + output: + description: The captured output of both stdout and stderr from the Ansible Playbook run runs: using: node12 main: main.js diff --git a/main.js b/main.js index 8dec1ee..8779eb6 100644 --- a/main.js +++ b/main.js @@ -81,21 +81,19 @@ async function main() { process.env.ANSIBLE_FORCE_COLOR = "True" - let stdout = '' - let stderr = '' + let output = '' const execOptions = {} execOptions.listeners = { stdout: function(data) { - stdout += data.toString() + output += data.toString() }, stderr: function(data) { - stderr += data.toString() + output += data.toString() } } await exec.exec("ansible-playbook", cmd, execOptions) - core.setOutput('stdout', stdout) - core.setOutput('stderr', stderr) + core.setOutput('output', output) } catch (error) { core.setFailed(error.message) }