I have several tasks in a playbook. I want to see -vvvv (highest verbose level) only for a single task in the playbook. So i don’t want to give -vvvv after ‘ansible-playbook sample.yaml’.
Is there any way to display -vvvv info only for a single task while running the playbook?
As a workaround you could run the whole play with no_log: true and add no_log: false explicitly to your task calling ec2 action. Then run the playbook with -v.
The problem with this approach is that it is hiding even the normal output (success/fail, etc) of each task when i don’t use -vvvv. So it is hiding output of each task that i would otherwise need to see. Thanks for replying though.
I tried this but it doesn’t exactly meet my requirements. I need to run only a single task with highest level verbosity. If i were to specify verbosity level as 4 as given in the article and if i were to run -vvvv, then all other tasks which have lower verbosity will also show debug info, not just the single task that i want shown.