Debug output as copy source

Hi, all.

I want to use the output of debug as the source to then create backups of that source (eek, I understand that; hope everyone else does). Here’s the playbook relevant parts:

Btw, the error output from the above is:

fatal: [bed-test-9-dy2]: FAILED! => changed=false
msg: |-
Source /root/.ssh/known_hosts
/home/user1/.ssh/known_hosts
/home/user2/.ssh/known_hosts
/home/user3/.ssh/known_hosts
/home/user4/.ssh/known_hosts not found

fatal: [bed-test-9-dy5]: FAILED! => changed=false
msg: |-
Source /root/.ssh/known_hosts
/home/ user1/.ssh/known_hosts
/home/user2/.ssh/known_hosts
/home/user3/.ssh/known_hosts not found

Those files do exist.

[SOLVED] Answered my own question, and, to simple really. Hope it helps someone:

- name: Backup all known_hosts files
shell: cp -p {{ item }} {{ item }}.bak
loop: ‘{{ known.stdout_lines }}’
tags:
- known