Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

Ansible playbook to wget a file

Asked by Al German Jul 1, 2021 1.6K views 1 answer
Share

About this question

 I'm trying to wget a file using an Ansible playbook. 

My playbook:

- hosts: all
  sudo: true
  tasks:
  - name: Prepare Install folder
    sudo: true
    action: shell sudo mkdir -p /tmp/my_install/mysql/ && cd /tmp/my_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

I get an error when I execute the following error ansible wget :

ansible-playbook my_3rparties.yml -l vsrv644 --extra-vars "repo_host=vsrv656" -K -f 10 
error:
Cannot write to `MySQL-5.6.15-1.el6.x86_64.rpm-bundle.tar' (Permission denied).
FATAL: all hosts have already failed -- aborting
PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/usr2/ihazan/vufroria_3rparties.retry
vsrv644                : ok=2 changed=1 unreachable=0    failed=1  

Why do I get this error and how do I solve it?

Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.