Ansible for download the files from FTP

Viewed 9080

Currently, I'm using shell script to download the files from FTP server. Ansible will execute my script and continue other automated jobs.

Please let me know the best way to do this in Ansible playbook using "get_url" instead of "shell". The following syntax is working only to download the single file but my requirements are to download the multiple files and directories.

Appreciated your help.

- name: FTP Download
  get_url: url=ftp://username:password@ftp.server.com/2016/03/value/myfile dest=/home/user/03/myfile1
  register: get_url_result
2 Answers
Related