how can we unarchive multiple different files using ansible-playbook i tried this yml file its getting error

0 votes
---
  - hosts: all
    become: yes
    vars:
    - path: /home/ansadmin
    tasks:
    - name: installing tools
      yum: name:{{item}}  state=latest
      with_items:
      - java
      - git
      - unzip

    - name: DownloadFiles
      get_url:  url={{item}} dest={{path}}
      with_items:
        -  http://mirrors.jenkins.io/war-stable/latest/jenkins.war
        -  http://apachemirror.wuchna.com/tomcat/tomcat-8/v8.5.43/bin/apache-tomcat-8.5.43.tar.gz
        -  https://binaries.sonarsource.com/Distribution/sonarqube/sonarqube-7.9.1.zip
        -  "http://mirrors.estointernet.in/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz"

    - name: Unarchive files
      unarchive:  src={{item.src}} dest={{item.dest}} remote_src: yes
      with_items:
      - {
          src: "/home/ansadmin/apache-maven-3.6.1-bin.tar.gz" ,
          dest: "/home/ansadmin"
        }
      -  {
          src: "/home/ansadmin/apache-tomcat-8.5.43.tar.gz" ,
          dest: "/home/ansadmin"
Aug 17, 2019 in Ansible by Rajendra
• 520 points
2,465 views
What error are you getting?

1 answer to this question.

0 votes
RAR file is used to store other files inside,it is a compressed folder if you want to open RAR files then you have to UNRAR it you need to download it from internet using free tool.<a href="/openfileextension.com/open-rar-file/"">open-rar-file</a>.
answered Oct 9, 2020 by jack miller
Hi@jack,

Can you share your playbook?

Related Questions In Ansible

0 votes
1 answer

How do I wget a file from web server using shell in the ansible playbook

Hey Ayaan, you could probably use this ...READ MORE

answered Jan 24, 2019 in Ansible by Anushri
2,237 views
0 votes
1 answer

How to add multiple lines in a file using Ansible playbook?

Hi@akhtar, You can update your file using lineinfile ...READ MORE

answered Sep 16, 2020 in Ansible by MD
• 95,160 points
3,200 views
0 votes
1 answer

How to copy multiple files to remote system using Ansible Playbook?

Hi@akhtar, You can use the copy module in ...READ MORE

answered Sep 16, 2020 in Ansible by MD
• 95,160 points
2,779 views
0 votes
1 answer

How can I create a new user using ansible ploybook?

You're switching from the root user. Root ...READ MORE

answered Mar 29, 2018 in Ansible by DareDev
• 6,890 points
317 views
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,064 views
+2 votes
1 answer