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 in Ansible by Rajendra
• 280 points
31 views
What error are you getting?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Ansible

0 votes
1 answer
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,810 points
111 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do i set multiple authorized keys to my ansible playbook?

Try this: - name: Set up multiple authorized ...READ MORE

answered Feb 11 in Ansible by John
62 views
+13 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,380 points
152 views
0 votes
1 answer