Ansible Output improvements

Using AnsibleOutput type, default type data will output 4 last lines,
while all lines would be available if needed.
This commit is contained in:
lksz 2021-05-09 23:45:23 -04:00
parent 92bd7ba69f
commit 9f0d669b4c
3 changed files with 7 additions and 4 deletions

View file

@ -4,7 +4,4 @@
[switch]$PassThruOnly
)
Invoke-ViaAnsible -Command "Update-OSz -Mode Auto" -Remotes:$($Remotes.ToLower()) -RawOutput:$RawOutput | ForEach-Object {
if( $PassThru ) { return $_ }
$_ | Select-Object Machine, RunTime, @{L='Output';E={$_.Output | Select-Object -last 4}}
}
Invoke-ViaAnsible -Command "Update-OSz -Mode Auto" -Remotes:$($Remotes.ToLower()) -RawOutput:$RawOutput