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

0 votes
I'm trying to wget a file from a web server and I want to do the same using shell in my Ansible playbook. How do I do it?
Jan 24, 2019 in Ansible by Ayaan
4,178 views

1 answer to this question.

0 votes

Hey Ayaan, you could probably use this sort of playbook

---
- hosts: all
  sudo: true
  tasks:
  - name: Install folder
    sudo: true
    action: shell sudo mkdir -p /tmp/install/mysql/ && cd /tmp/install/mysql/
  - name: Download MySql
    sudo: true
    action: shell sudo wget http://{{ repo_host }}/MySQL-5.6.15-1.el6.x86_64.rpm-bundle.tar
answered Jan 24, 2019 by Anushri

Related Questions In Ansible

0 votes
1 answer

How do I execute a shell script and then use the result in ansible

This can work out for you: - name: ...READ MORE

answered Apr 11, 2018 in Ansible by shubham
• 7,340 points
6,912 views
0 votes
1 answer

How to overwrite the content of a file in remote systems using Ansible playbook?

Hi@akhtar, You can find one argument in the ...READ MORE

answered Aug 2, 2020 in Ansible by MD
• 95,460 points
14,478 views
+1 vote
1 answer
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,460 points
26,713 views
+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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,059 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How do I enable sudo privileges in the playbook?

Hey @Kiran, to set enable mode for ...READ MORE

answered Mar 6, 2019 in Ansible by Yogesh
866 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP