Hi,
I want to copy a file from network share to another network share in ansible.
But the problem is, i can able to pass credential for only one server using runas method.
Need suggestion on this issue. Below is my playbook
[root@ansible wincopy]# cat roles/wincopy/tasks/main.yml
- name: copy
win_copy:
src=“\\192.168.1.168\f\
test”
dest=“\\192.168.1.55\Soft\test”
remote_src=True
become: yes
become_method: runas
become_flags: logon_type=new_credentials logon_flags=netcredentials_only
vars:
ansible_become_user: Username2
ansible_become_pass: password2