Issue
I have an Ansible playbook which I use to configure repositories and upgrade packages. Since the package upgrade can take some time the task is hanging idle without providing any information.
How can I modify my playbook to provide an output when every time package upgrade completes successfully?
I have already tried to produce outputs using register variables but since it executes only after the upgrade task its not match with my requirement.
- name: Apply All Latest Upgrades
yum:
name: '*'
state: latest
register: shell_result
- debug:
var: shell_result
Solution
You shouldn't. It's running internally, you should just wait for it to complete. However, you can try this: How can I show progress for a long-running Ansible task?
Answered By - Kevin C Answer Checked By - Willingham (WPSolving Volunteer)