# Issue in download file from FTP

**URL:** <https://forum.ansible.com/t/issue-in-download-file-from-ftp/31253>\
**Category:** Ansible Project\
**Created:** [September 11, 2019, 9:38am UTC](https://forum.ansible.com/t/issue-in-download-file-from-ftp/31253 "2019-09-11T09:38:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naeem\_Khan](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@Naeem\_Khan](https://forum.ansible.com/u/Naeem_Khan)\
**Post date:** [September 11, 2019, 9:38am UTC](https://forum.ansible.com/t/issue-in-download-file-from-ftp/31253/1 "2019-09-11T09:38:33Z")

</div>

Hi Everyone,  
I am facing issue in executing roles using some shell script.  
the task is

1. create one directory on remote host /installer/NAM
2. copy the installable from ftp (ip:172.19.54.10 username:-admin password abc123 ).
3. copy the installable at /installer/NAM
4. untar the installable
5. remove the installable file  
6.execute the install.sh  
below is the YAML please let me what is wrong in it i am unable to download file and subsequent steps.  
Kindly reply ASAP or if some one have any sample YAML to download from FTP please share with me.

–YAML Begin–

---

<div class="post-metadata">

**Author:** ![shivharsh.nec](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@shivharsh.nec](https://forum.ansible.com/u/shivharsh.nec)\
**Post date:** [September 12, 2019, 9:49am UTC](https://forum.ansible.com/t/issue-in-download-file-from-ftp/31253/2 "2019-09-12T09:49:50Z")

</div>

Hi Naeem,

The Syntax error thrown is due to incorrect indentation in below block of code.

> - name: Download File From FTP  
> get\_url:  
> url: ftp://admin:abc123@172.19.54.10:22/home/admin/TestFtp/AM\_431\_AccessManagerService\_Linux64.tar.gz dest:/installer/NAM/AM\_431\_AccessManagerService\_Linux64.tar.gz

Every “-” in YAML starts a new element and all the elements must be equally indented. In your YAML, there is an extra indent before “- name: Download File From FTP”.  
Also, the “url” key of get\_url module should be further indented to reflect correct mapping. This is why the “mapping values are not allowed in this context” error message was shown.

So the correct YAML code would be as shown below:

`

---

<div class="post-metadata">

**Author:** ![Naeem\_Khan](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@Naeem\_Khan](https://forum.ansible.com/u/Naeem_Khan)\
**Post date:** [September 18, 2019, 6:20am UTC](https://forum.ansible.com/t/issue-in-download-file-from-ftp/31253/3 "2019-09-18T06:20:46Z")

</div>

Hi Shivharsh,  
I tested the YAML syntax online it is showing correct.Kindly suggest the way to correct it  
here is YAML
