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 in Ansible by Ayaan
615 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 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,890 points
1,785 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 in Ansible by anonymous
876 views
0 votes
1 answer
+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
248 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 in Ansible by Yogesh
34 views