library: Separate debug and info logs from warnings

Logs are now separed by severity level. Warnings and failures are the only logs
that appear now on the output. All logs are saved into a new json parameter
called "stderr" that is later shown on a different task. In case of
failure, all logs are shown as output. Tests have been created and modified in
order to assure that this feature works.

Signed-off-by: Elvira Garcia Ruiz <elviragr@riseup.net>
This commit is contained in:
Elvira Garcia Ruiz 2020-04-26 02:19:25 +02:00 committed by Till Maas
parent b5fb076579
commit 4753c70c55
6 changed files with 46 additions and 14 deletions

View file

@ -64,6 +64,10 @@
ignore_errors: "{{ network_ignore_errors | default(omit) }}"
force_state_change: "{{ network_force_state_change | default(omit) }}"
connections: "{{ network_connections | default([]) }}"
register: __network_connections_result
- name: Show debug messages
debug: var=__network_connections_result
- name: Re-test connectivity
ping: