Real-time display of the stdout shell

I want to see the real time shell stdout, instead of registerin a variable and then display once it's finished.

Example Playbook – test.yml

- name: test of the shell run command
hosts: localhost
connection: local

- name: Runnig Update
shell: apt update

Default output

$ ansible-playbook test.yml

TO PLAY [Testing RUN Shell Command] ************************************************** ************************************************ **

TASK [Gathering Facts] ************************************************** ************************************************ ** **********
D & # 39; agreement: [localhost]

TASK [Runnig Update] ************************************************** ************************************************ ** ************
amended: [localhost]

PLAY RECAP *********************************************** * ************************************************ ** *************************
localhost: ok = 2 changed = 1 inaccessible = 0 failure = 0   

But I want to see how it goes when we launch the apt update in the terminal

$ sudo apt update
Ign: 1 stable InRelease
Hit: 2 Stable version
Hit: 3 Bionic InRelease
Get: 4 Bionic-security InRelease [88.7 kB]                                                           
Hit: 6 InRelease Bionic
Hit: 7 Bionic InRelease
------ EXIT REMOVED ----------

I see that there are already discussions on github and that this is not possible.

Is there a trick to get the output in real time with help ansible callback?

How can I see the mysql status message in bash stdout on ssh?

If I pass a command to mysql in bash via ssh:

mysql --defaults-file = ~ / .my.cnf -e "SELECT orderdate FROM marketdata LIMIT 1;"

I see the following exit:

+ ------------ +
| order date |
+ ------------ +
| 2019-04-04 |
+ ------------ +

If I am directly connected to the server and I execute the command:
SELECT orderdate FROM marketdata LIMIT 1;
I see the following exit:

+ ------------ +
| order date |
+ ------------ +
| 2019-04-04 |
+ ------------ +
1 line in the set (0.00 sec)

How can I see the mysql status message displayed after each request?1 line in the set (0.00 sec)"When do I send commands via ssh too?

c – Is it possible to exchange programs displayed in stdout?

I would like to write a program in C that forks then execs three different processes.

Then two of the programs will be suspended and only one of the three will be broadcast to the public. stdout. It is possible to later suspend the running process on stdout, resume one of the other suspended processes and display it on stdout instead of?

How to tell my Apache server running in a Docker container to write logs on stdout

I've been trying to point my logs to / proc / 1 / fd / 1 but it's impossible to access the directory and if I'm using / proc / self / fd / 1 nothing is n / a written on my stdout