Is there a way to see output from `apply` function...
# bolt
v
Is there a way to see output from
apply
function call ? notice/notify/echo, all getting 'swallowed'
y
simple solution is to call with
--verbose
complex solution is to parse the ApplyResult and show the report.. that was a frequently discussed question here.. unfortunately I don’t remember any references to the existing report output functions here.. I guess I have one but it was not ideal enough
v
--verbose that only adds
Copy code
changed: 0, failed: 0, unchanged: 0 skipped: 0, noop: 0
y
Copy code
$apply_results.each |$r| {
    $r.report['logs'].each |$l| {
      out::message("${r.report['host']} ${l['source']}: ${l['message']}")
    }
  }
ah.. now I re-read your question 😄
I’m not 100% sure but I guess there is no way to see the notice/info/etc functions output as it’s not included in the ApplyResult.. though better to
out::message()
the
apply
result and re-check
v
k, weird though
y
raise a ticket 🙂
v
yeah, that's going nowhere
c
I mean,
--debug
is still valid on an apply, no?
bah. I'm in "bolt".
nevermind....
😁 1
how about bolt --log-level debug. ??!?
@vchepkov would that work?
v
It does produce lots of debug, but yeah, if you jq it, you might see the output
c
I got somewhat usable content just now, and that was on a command run. Not sure on an apply
v
I use apply in in a plan. and apply function has __noop option. but what good is that noop if it doesn't show anything in output :)
c
looks like some creative grepping and such might help out at least
with the debug, I mean
and you're 100% correct