Hi,
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: [10.160.110.193]: 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: novars:
ansible_command_timeout: 65200
ansible_connection: network_cli
file1: testing99.txttasks:
- name: Copy ios image file to juniper switch
ansible.netcommon.net_put:
src: “/var/lib/tftpboot/{{ file1 }}”
dest: “/var/tmp/testing99.txt”
[root@lonsca01 juniperymls]#
- name: Copy ios image file to juniper switch