Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19k points)

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?

1 Answer

0 votes
by (33.1k points)

Simply use this 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

Hope this answer helps you!

Browse Categories

...