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
148 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,480 points
216 views
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
434 views
0 votes
1 answer
0 votes
1 answer
+13 votes
2 answers
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
8 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.