option to show all playbook logs #2

Open
opened 2023-10-12 05:38:08 +02:00 by chukka · 4 comments

Hi,

I'm using ansible-parallel 2023.7.26 , Below is command I tried

ansible-parallel -vv a.yml b.yml c.yml d.yml e.yml -i hosts.ini
`

# Playbook a.yml, ran in 56s
a-1                 : ok=22   changed=13   unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
# Playbook b.yml, ran in 188s
b-1              : ok=38   changed=23   unreachable=0    failed=0    skipped=6    rescued=0    ignored=0   
# Playbook c.yml, ran in 378s
c-1             : ok=27   changed=15   unreachable=0    failed=0    skipped=3    rescued=0    ignored=1   
# Playbook d.yml, ran in 487s
d-1                  : ok=52   changed=34   unreachable=0    failed=0    skipped=3    rescued=0    ignored=1   
# Playbook e.yml, ran in 516s
e-1                     : ok=38   changed=18   unreachable=0    failed=0    skipped=16   rescued=0    ignored=1   

I'm trying get all logs at one place for above 5 playbook runs. is there any way I can get complete verbose (-vv) logs for debugging any issue using ansible-parallel . This will be much needed feature when you want to debug a playbook why it failed

Hi, I'm using ansible-parallel `2023.7.26` , Below is command I tried `ansible-parallel -vv a.yml b.yml c.yml d.yml e.yml -i hosts.ini` ` ``` # Playbook a.yml, ran in 56s a-1 : ok=22 changed=13 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 # Playbook b.yml, ran in 188s b-1 : ok=38 changed=23 unreachable=0 failed=0 skipped=6 rescued=0 ignored=0 # Playbook c.yml, ran in 378s c-1 : ok=27 changed=15 unreachable=0 failed=0 skipped=3 rescued=0 ignored=1 # Playbook d.yml, ran in 487s d-1 : ok=52 changed=34 unreachable=0 failed=0 skipped=3 rescued=0 ignored=1 # Playbook e.yml, ran in 516s e-1 : ok=38 changed=18 unreachable=0 failed=0 skipped=16 rescued=0 ignored=1 ``` I'm trying get all logs at one place for above 5 playbook runs. is there any way I can get complete verbose (-vv) logs for debugging any issue using ansible-parallel . This will be much needed feature when you want to debug a playbook why it failed
chukka changed title from option to show all stdout logs to option to show all playbook logs 2023-10-12 05:38:26 +02:00

Any update on the above request?

Any update on the above request?
Owner

PR welcome, I'm low in bandwidth those days.

I think it's an easy task: implement another show_progression to use when -vv is given, which prints all messages like:

        while True:
            result = await results.get()
            if not result:
                break
            msgtype, playbook, msg = result
            print(msg)

have not tried it though, it's midnight here and I really have to sleep :D

PR welcome, I'm low in bandwidth those days. I think it's an easy task: implement another `show_progression` to use when `-vv` is given, which prints all messages like: ```python while True: result = await results.get() if not result: break msgtype, playbook, msg = result print(msg) ``` have not tried it though, it's midnight here and I really have to sleep :D
Author

@mdk I raised a PR . Please review

@mdk I raised a [PR](https://git.afpy.org/mdk/ansible-parallel/pulls/3) . Please review
Author

@mdk Reminder !

@mdk Reminder !
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mdk/ansible-parallel#2
No description provided.