Below is a snippet from a playbook. How can I print a message after the command is run for each loop item? Something like
image.pyc is now running for item1
image.pyc is now running for item2
and so on
- name: Image Server(s)
command: python3 image.pyc {{ item }} "{{ systemVersion }}"
register: async_out
async: 7200
poll: 0
with_items: "{{ hostinfo_input.hosts }}"
What I want is simply this
TASK [Image Server(s)] *************
changed: [localhost] => (item=8m007)
changed: [localhost] => (item=8m013)
Running image.pyc for 8m007
Running image.pyc for 8m013