ansible_stdout_compact_logger icon indicating copy to clipboard operation
ansible_stdout_compact_logger copied to clipboard

Unable to one-line display

Open CremaLuca opened this issue 4 months ago • 0 comments

I am unable to obtain one-line display when running a playbook with only one target host.

My configuration:

# hosts.yml
[localhost]
localhost ansible_connection=local
# test.yml

- name: "Test"
  hosts: localhost
  tasks:
    - command: "sleep 1"
    - name: "Secret action"
      command: "sleep 1"
# ansible.cfg

[defaults]
callback_plugins = callbacks
stdout_callback = anstomlog

The output of test.yml is:

$ ansible-playbook -i hosts.yml -c ansible.cfg test1.yml

[12:56:22] Gathering Facts
↳  localhost | SUCCESS | 1.16s
[12:56:23] command
↳  localhost | CHANGED | 2.39s
[12:56:26] Secret action
↳  localhost | CHANGED | 1.26s
[12:56:27] system
-- Play recap --
localhost                  : ok=3    changed=2    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 

While I was expecting (and I could obtain, in a previous version of the library)

[12:56:22] Gathering Facts | localhost | SUCCESS | 1.16s
[12:56:23] command | localhost | CHANGED | 2.39s
[12:56:26] Secret action | localhost | CHANGED | 1.26s

Can I achieve one-line display (when a single host is used)? Reading the README.md ticked box "one-line display" and screenshot I suppose it could be done but I was not able to.

CremaLuca avatar Oct 08 '24 11:10 CremaLuca