Ansible display realtime shell stdout
Solution 1:
"Real time" or "streaming" output has not been merged to Ansible yet. The original issue was closed in 2014 as not feasible. A more recent proposal has no major updates since February 2018.
This is not available for users of Ansible. It will require serious hacking, and more importantly testing, on command and callback plugins to work as proposed.
Bonus playbook review: Your example command can be done by the apt module. This has more features than calling apt command line yourself.
- name: Only run "apt-get update" if the last one is more than 3600 seconds ago
apt:
update_cache: yes
cache_valid_time: 3600