0

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
SajithRu
  • 225
  • 1
  • 8
  • 24

1 Answers1

1

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?

Kevin C
  • 4,851
  • 8
  • 30
  • 64