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
1,388 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
• 6,910 points
2,973 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 in Ansible by MD
• 42,300 points
26 views
+1 vote
1 answer
0 votes
2 answers

How do you stop Ansible from creating .retry files in the home directory?

[defaults] ... retry_files_enabled = True # Create them ...READ MORE

answered Apr 5, 2019 in Ansible by anonymous
1,355 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,420 points
602 views
0 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
62 views