I have an ansible playbook which has a task included in it as below : 

```
- hosts: hosts
  serial: 1
  tasks:
   - include: tasks/webapps.yaml warfiles={{ item }}
     with_items:
      - test1.war
      - test2.war

```

and the tasks file is : 

```
---
   - name: Check war files in release
     local_action: stat path="/home/ansible/rel/{{ RELEASE }}/webapps/{{ warfiles}}"
     register: result
   - name: Copy war files from release
     synchronize:
       src: /home/ansible/rel/{{ RELEASE }}/webapps/{{ warfiles }}
       dest: /destination/
       checksum: yes
       archive: no
     when: result.stat.exists

```

When I run the playbook I get this output : 
 TASK [Check war files in release] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
 ok: [1.1.1.1 -> localhost]

```
TASK [Copy war files from release] *********************************************
changed: [1.1.1.1]
<fcsT...... test1.war

TASK [Check war files in release] **********************************************
ok: [1.1.1.1.1 -> localhost]

TASK [Copy war files from release] *********************************************
changed: [1.1.1.1]
<fcsT...... test2.war

```

Desired output: 
 TASK [Check war files in release] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
 ok: [1.1.1.1.1 -> localhost]

```
TASK [Copy war files from release] *********************************************
changed: [1.1.1.1]
<fcsT...... test1.war
<fcsT...... test2.war

```

I am trying to make the playbook to first check if the files exists and after to do the copy task so it will all show nicely. Is there a way to do it without having to have another task that I have to include. I would like to be able to "register: result" as an array and store if the files exist and after to extract the files from the array. I am new to ansible. Thank you