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-- --- # tasks file for ac.install - name: make a new directory for downloading the installer shell: mkdir -p /installer/NAM #shell: cd /installer/NAM #register: make_directory - 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 - args: #chdir: /installer/NAM/ #register: download_installer - name: untar the downloaded builds shell: cd /installer/NAM shell: tar -zxvf AM_431_AccessManagerService_Linux64.tar.gz args: chdir: /installer/NAM/ #register: extract_installer - name: removing the installer tar file shell: rm -r /installer/NAM/AM_431_AccessManagerService_Linux64.tar.gz - shell: sudo ls -d /installer/NAM/AM_431_AccessManagerService* #register: dir_name - name: run the install script shell: sudo printf "Y\n1\n\n\n\n\n\n\n\nY\nY\nY\n\nadmin\ninovell\nnovell\n" | ./install.sh args: chdir: "{{ dir_name.stdout }}" #register: run_installation - debug: var: run_installation ---YAML End--- Error is as follows:-- ansible-playbook 2.8.4 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible-playbook python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] Using /etc/ansible/ansible.cfg as config file setting up inventory plugins host_list declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method script declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method auto declined parsing /etc/ansible/hosts as it did not pass it's verify_file() method Parsed /etc/ansible/hosts inventory source with ini plugin ERROR! Syntax Error while loading YAML. mapping values are not allowed in this context The error appears to be in '/tmp/auto_install/ansible_install_script/roles/ac.install/tasks/main.yml': line 8, column 12, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: - name: Download File From FTP get_url: ^ here -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAFsm3f8zV6Vj%3D_%2B4jr-qtBq46pnCeV_ZLuHdB9qeuaX_Kky4sQ%40mail.gmail.com.