Based on the logs it seems you have not set the value of provider argument in the task.
junos_scp module requires the provider key to be set. More details refer the module documentation
https://docs.ansible.com/ansible/latest/modules/junos_scp_module.html
Thanks!
The provider has be deprecated since Ansible 2.5. In my case, Ansible server has NETCONF connection setup with password, but, it fails on junos_scp. If I replace juno_scp with junos_command, there are no this kinds of issue at all.
junos_scp module relies on junos-eznc library for file transfer to a JUNOS device, that’s the reason provider argument is required. The provider deprecation warning for junos_scp module is not correct and needs to be fixed. Please raise an issue on Github to track it.
junos_command module uses Ansible netconf connection type hence provider is no longer required for the junos_command module.
Also FYI you can use net_put and net_get modules in Ansible which should work with JUNOS device for file transfer and doesn’t require provider argument.