Unable to copy any file from ansible to Juniper switch


I am trying to copy a file from my ansible server to Juniper Switch via below playbook. but getting below error.

Could you please tell me the right module if any to copy or any another way to resolve this issue.

Error: cfatal: []: FAILED! => {“changed”: false, “destination”: “/var/tmp/testing99.txt”, “msg”: “Exception received: ‘str’ object is not callable”}

Playbook is:
[root@lonsca01 juniperymls]# cat 1copy-ansible-to-switch.yml

  • hosts: junipernew
    gather_facts: no

    ansible_command_timeout: 65200
    ansible_connection: network_cli
    file1: testing99.txt


    • name: Copy ios image file to juniper switch
      src: “/var/lib/tftpboot/{{ file1 }}”
      dest: “/var/tmp/testing99.txt”
      [root@lonsca01 juniperymls]#

You should better use the dedicated junipernetworks.junos collection
using the scp_module to transfer file.