I recently stumbled upon a problem: I wanted the stdout of a command task to be printed after execution, so I toggled the global -v flag. However, the service module is apparently verbose as shit and printed like a 100 lines and uhh… that’s a costly tradeoff O_o

Seems like a PR for a task-level verbosity keyword has been proposed, yet rejected.

I’m aware it’s possible to just register the stdout of the command and print it in a following debug task, but I wonder if there’s a prettier solution.

How would you go about this? Ever encountered such a feeling?

  • z3r0@lemmy.zip
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    Hi! After more than 6 years using Ansible I have not found a way to print the standard output of a program running under the command module, so I’m afraid the only way to achieve this is exactly what you suggest: using a debug task, something that has always seemed terribly ugly to me.