ansible.posix icon indicating copy to clipboard operation
ansible.posix copied to clipboard

Fix callback output to align header with roles, tasks and play RECAP

Open ansiblejunky opened this issue 2 years ago • 5 comments

SUMMARY

All three callback plugins (timer, roles, tasks) do not produce headers in the output that align with how we do "PLAY RECAP *********" that is generated by the "default" output callback. So these changes are provided to align the callback plugins and have a clean output that is much more readable.

Note, the asterisks are generated just as how they are for "PLAY RECAP", where it extends to the end of the terminal window.

I am considering this as a "bug" in that the output was never aligned, instead of a feature since this does not provide any new feature per-se.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ansible.posix.timer ansible.posix.profile_tasks ansible.posix.profile_roles

ADDITIONAL INFORMATION

The new output is shown below. You can see the headers are now all the same and broken down by PLAY, ROLE, TASKS, and PLAYBOOK RECAP.

PLAY RECAP ***************************************************************************************************************************************************************************************
localhost                  : ok=14   changed=2    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   


ROLE RECAP ***************************************************************************************************************************************************************************************
awx.awx.subscriptions --------------------------------------------------- 4.81s
users ------------------------------------------------------------------- 2.89s
labels ------------------------------------------------------------------ 2.86s
settings ---------------------------------------------------------------- 2.46s
credential_types -------------------------------------------------------- 2.27s
organizations ----------------------------------------------------------- 2.21s
teams ------------------------------------------------------------------- 2.21s
awx.awx.license --------------------------------------------------------- 1.49s
dispatch ---------------------------------------------------------------- 0.58s
credentials ------------------------------------------------------------- 0.03s
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
total ------------------------------------------------------------------ 21.80s

TASKS RECAP **************************************************************************************************************************************************************************************
Get subscriptions with a filter ----------------------------------------------------------------------------------------------------------------------------------------------------------- 4.81s
redhat_cop.controller_configuration.users : Configure Users | Wait for finish the Users creation ------------------------------------------------------------------------------------------ 1.93s
redhat_cop.controller_configuration.labels : Configure Labels | Wait for finish the Label creation ---------------------------------------------------------------------------------------- 1.91s
redhat_cop.controller_configuration.settings : Configure Settings | Wait for finish the Settings creation --------------------------------------------------------------------------------- 1.75s
redhat_cop.controller_configuration.teams : Configure Teams | Wait for finish the Teams creation ------------------------------------------------------------------------------------------ 1.63s
redhat_cop.controller_configuration.organizations : Configure Controller Organizations | Wait for finish the organization creation -------------------------------------------------------- 1.62s
Attach to a pool -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.49s
redhat_cop.controller_configuration.credential_types : Add Credential Types --------------------------------------------------------------------------------------------------------------- 1.32s
redhat_cop.controller_configuration.users : Add controller user --------------------------------------------------------------------------------------------------------------------------- 0.96s
redhat_cop.controller_configuration.labels : Add a label to Controller -------------------------------------------------------------------------------------------------------------------- 0.95s
redhat_cop.controller_configuration.credential_types : Configure Controller Credential Types | Wait for finish the credential types creation ---------------------------------------------- 0.94s
redhat_cop.controller_configuration.settings : Update Ansible Controller Settings from dictionary or list of dictionaries ----------------------------------------------------------------- 0.70s
redhat_cop.controller_configuration.organizations : Add organizations --------------------------------------------------------------------------------------------------------------------- 0.59s
redhat_cop.controller_configuration.teams : Create Ansible Controller Team ---------------------------------------------------------------------------------------------------------------- 0.58s
Run redhat_cop.controller_configuration.{{ __role.role }} role ---------------------------------------------------------------------------------------------------------------------------- 0.58s
redhat_cop.controller_configuration.credentials : Add Credentials ------------------------------------------------------------------------------------------------------------------------- 0.03s

PLAYBOOK RECAP ***********************************************************************************************************************************************************************************
Playbook run took 0 days, 0 hours, 0 minutes, 21 seconds

Current output (how it is today) for comparison:

PLAY RECAP ***************************************************************************************************************************************************************************************
localhost                  : ok=14   changed=2    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   

Playbook run took 0 days, 0 hours, 0 minutes, 23 seconds
Tuesday 20 September 2022  15:00:49 -0700 (0:00:00.038)       0:00:23.039 ***** 
=============================================================================== 
Get subscriptions with a filter ----------------------------------------------------------------------------------------------------------------------------------------------------------- 5.49s
redhat_cop.controller_configuration.labels : Configure Labels | Wait for finish the Label creation ---------------------------------------------------------------------------------------- 1.98s
redhat_cop.controller_configuration.users : Configure Users | Wait for finish the Users creation ------------------------------------------------------------------------------------------ 1.92s
redhat_cop.controller_configuration.organizations : Configure Controller Organizations | Wait for finish the organization creation -------------------------------------------------------- 1.84s
redhat_cop.controller_configuration.settings : Configure Settings | Wait for finish the Settings creation --------------------------------------------------------------------------------- 1.78s
redhat_cop.controller_configuration.teams : Configure Teams | Wait for finish the Teams creation ------------------------------------------------------------------------------------------ 1.61s
Attach to a pool -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1.53s
redhat_cop.controller_configuration.credential_types : Add Credential Types --------------------------------------------------------------------------------------------------------------- 1.35s
redhat_cop.controller_configuration.users : Add controller user --------------------------------------------------------------------------------------------------------------------------- 0.95s
redhat_cop.controller_configuration.labels : Add a label to Controller -------------------------------------------------------------------------------------------------------------------- 0.95s
redhat_cop.controller_configuration.credential_types : Configure Controller Credential Types | Wait for finish the credential types creation ---------------------------------------------- 0.94s
redhat_cop.controller_configuration.settings : Update Ansible Controller Settings from dictionary or list of dictionaries ----------------------------------------------------------------- 0.73s
Run redhat_cop.controller_configuration.{{ __role.role }} role ---------------------------------------------------------------------------------------------------------------------------- 0.63s
redhat_cop.controller_configuration.organizations : Add organizations --------------------------------------------------------------------------------------------------------------------- 0.61s
redhat_cop.controller_configuration.teams : Create Ansible Controller Team ---------------------------------------------------------------------------------------------------------------- 0.60s
redhat_cop.controller_configuration.credentials : Add Credentials ------------------------------------------------------------------------------------------------------------------------- 0.04s
Tuesday 20 September 2022  15:00:49 -0700 (0:00:00.043)       0:00:23.041 ***** 
=============================================================================== 
awx.awx.subscriptions --------------------------------------------------- 5.49s
labels ------------------------------------------------------------------ 2.93s
users ------------------------------------------------------------------- 2.88s
settings ---------------------------------------------------------------- 2.51s
organizations ----------------------------------------------------------- 2.45s
credential_types -------------------------------------------------------- 2.29s
teams ------------------------------------------------------------------- 2.21s
awx.awx.license --------------------------------------------------------- 1.53s
dispatch ---------------------------------------------------------------- 0.63s
credentials ------------------------------------------------------------- 0.04s
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
total ------------------------------------------------------------------ 22.95s

ansiblejunky avatar Sep 20 '22 21:09 ansiblejunky

Build failed.

:x: ansible-changelog-fragment FAILURE in 16s :x: ansible-test-sanity-docker-devel FAILURE in 8m 25s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 7m 06s :x: ansible-test-sanity-docker-stable-2.9 FAILURE in 11m 18s :x: ansible-test-sanity-docker-stable-2.10 FAILURE in 8m 23s :x: ansible-test-sanity-docker-stable-2.11 FAILURE in 10m 12s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 55s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 7m 07s :heavy_check_mark: ansible-test-units-posix-python39 SUCCESS in 6m 21s :heavy_check_mark: ansible-test-units-posix-python310 SUCCESS in 5m 46s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 08s :heavy_check_mark: build-ansible-collection SUCCESS in 3m 04s

2nded on this, would have loved the headers 3 years ago when using this for figuring out scaling and forks.

sean-m-sullivan avatar Sep 20 '22 23:09 sean-m-sullivan

Build failed.

:x: ansible-changelog-fragment FAILURE in 17s :x: ansible-test-sanity-docker-devel FAILURE in 8m 36s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 9m 25s :x: ansible-test-sanity-docker-stable-2.9 FAILURE in 10m 11s :x: ansible-test-sanity-docker-stable-2.10 FAILURE in 10m 02s :x: ansible-test-sanity-docker-stable-2.11 FAILURE in 9m 59s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 9m 34s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 7m 27s :heavy_check_mark: ansible-test-units-posix-python39 SUCCESS in 5m 56s :heavy_check_mark: ansible-test-units-posix-python310 SUCCESS in 6m 28s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 4m 05s :heavy_check_mark: build-ansible-collection SUCCESS in 3m 08s

recheck

saito-hideki avatar Mar 24 '23 07:03 saito-hideki

Build failed. https://ansible.softwarefactory-project.io/zuul/buildset/dcdbbd92cd7a4e6493236226782c5bdf

:x: ansible-changelog-fragment FAILURE in 12s :x: ansible-test-sanity-docker-devel FAILURE in 8m 40s (non-voting) :x: ansible-test-sanity-docker-milestone FAILURE in 9m 42s (non-voting) :x: ansible-test-sanity-docker-stable-2.9 FAILURE in 12m 00s :x: ansible-test-sanity-docker-stable-2.10 FAILURE in 9m 57s :x: ansible-test-sanity-docker-stable-2.11 FAILURE in 9m 33s :x: ansible-test-sanity-docker-stable-2.12 FAILURE in 8m 46s :x: ansible-test-sanity-docker-stable-2.13 FAILURE in 8m 41s :heavy_check_mark: ansible-test-units-posix-python39 SUCCESS in 4m 37s :heavy_check_mark: ansible-test-units-posix-python310 SUCCESS in 5m 33s :heavy_check_mark: ansible-galaxy-importer SUCCESS in 3m 21s :heavy_check_mark: build-ansible-collection SUCCESS in 6m 33s